- Aug 28, 2020
-
-
Roman Lebedev authored
As pointed out in post-commit review, this can legally be called on instructions that are not inserted into basic blocks, so don't blindly assume that there is basic block.
-
Christopher Tetreault authored
Reviewed By: tejohnson Differential Revision: https://reviews.llvm.org/D86727
-
Yang Fan authored
Parameters were in a different order in the header and in the implementation. Fix surrounding comments a bit. Differential Revision: https://reviews.llvm.org/D86691
-
Yang Fan authored
There's no need to remind people about that when clang *is* built with asserts. Differential Revision: https://reviews.llvm.org/D86334
-
Adam Balogh authored
llvm::isa<>() and llvm::isa_and_not_null<>() template functions recently became variadic. Unfortunately this causes crashes in case of isa_and_not_null<>() and incorrect behavior in isa<>(). This patch fixes this issue. Differential Revision: https://reviews.llvm.org/D85728
-
Adam Balogh authored
The successfulness of a dynamic cast depends only on the C++ class, not the pointer or reference. Thus if *A is a *B, then &A is a &B, const *A is a const *B etc. This patch changes DynamicCastInfo to store and check the cast between the unqualified pointed/referenced types. It also removes e.g. SubstTemplateTypeParmType from both the pointer and the pointed type. Differential Revision: https://reviews.llvm.org/D85752
-
Dokyung Song authored
value-profile-load.test needs adjustment with a mutator change in bb54bcf8, which reverted as of now, but will be recommitted after landing this patch. This patch makes value-profile-load.test more friendly to (and aware of) the current value profiling strategy, which is based on the hamming as well as the absolute distance. To this end, this patch adjusts the set of input values that trigger an expected crash. More specifically, this patch now uses a single value 0x01effffe as a crashing input, because this value is close to values like {0x1ffffff, 0xffffff, ...}, which are very likely to be added to the corpus per the current hamming- and absolute-distance-based value profiling strategy. Note that previously the crashing input values were {1234567 * {1, 2, ...}, s.t. < INT_MAX}. Every byte in the chosen value 0x01effeef is intentionally different; this was to make it harder to find the value without the intermediate inputs added to the corpus by the value profiling strategy. Also note that LoadTest.cpp now uses a narrower condition (Size != 8) for initial pruning of inputs, effectively preventing libFuzzer from generating inputs longer than necessary and spending time on mutating such long inputs in the corpus - a functionality not meant to be tested by this specific test. Differential Revision: https://reviews.llvm.org/D86247
-
Haojian Wu authored
Differential Revision: https://reviews.llvm.org/D86685
-
Shinji Okumura authored
If we query an AA with `Attributor::getAAFor` in `AbstractAttribute::manifest`, the AA may be updated. This patch makes use of the phase flag in Attributor, and handle `getAAFor` behavior according to the flag. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D86635
-
Vincent Zhao authored
The prior diff that introduced `addAffineIfOpDomain` missed appending constraints from the ifOp domain. This revision fixes this problem. Differential Revision: https://reviews.llvm.org/D86421
-
Christopher Tetreault authored
Reviewed By: spatel Differential Revision: https://reviews.llvm.org/D82056
-
Saiyedul Islam authored
Many OpenMP Clang tests do not RUN for version 4.5 and the default version. This second patch in the series handles test cases which require updation in CHECK lines along with adding RUN lines for the default version. It involves updating line number of pragmas. Reviewed By: ABataev Differential Revision: https://reviews.llvm.org/D85150
-
Kiran Chandramohan authored
Adding a conversion pattern for the parallel Operation. This will help the conversion of parallel operation with standard dialect to parallel operation with llvm dialect. The type conversion of the block arguments in a parallel region are controlled by the pattern for the parallel Operation. Without this pattern, a parallel Operation with block arguments cannot be converted from standard to LLVM dialect. Other OpenMP operations without regions are marked as legal. When translation of OpenMP operations with regions are added then patterns for these operations can also be added. Also uses all the standard to llvm patterns. Patterns of other dialects can be added later if needed. Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D86273
-
Jez Ng authored
It seems to be failing on some Google Buildbots. This diff also includes a minor fix for the install name of one of libSystem's re-exports. I don't think it's the cause of the test failure, though. The wrong install name just meant that the symbol lookup failure would still happen, but it would have been caused by the re-export not being found, instead of the arch failing to match. Differential Revision: https://reviews.llvm.org/D86728
-
Louis Dionne authored
This fixes a mismatched visibility attribute on the call operator in addition to making the code clearer. Given this is a simple lambda in essence, the intent has always been to give it inline visibility.
-
Christopher Tetreault authored
Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D81500
-
Matt Arsenault authored
Avoid repeating for zero and one
-
Matt Arsenault authored
-
Mikhail Maltsev authored
Add bitcode files which got truncated to 0 length in phabricator. Differential Revision: https://reviews.llvm.org/D86146
-
Matt Arsenault authored
The global-isel feature has been required for a long time and was removed in c9455d3c, so this was causing all tests to be skipped.
-
Mikhail Maltsev authored
This patch adjusts the following ARM/AArch64 LLVM IR intrinsics: - neon_bfmmla - neon_bfmlalb - neon_bfmlalt so that they take and return bf16 and float types. Previously these intrinsics used <8 x i8> and <4 x i8> vectors (a rudiment from implementation lacking bf16 IR type). The neon_vbfdot[q] intrinsics are adjusted similarly. This change required some additional selection patterns for vbfdot itself and also for vector shuffles (in a previous patch) because of SelectionDAG transformations kicking in and mangling the original code. This patch makes the generated IR cleaner (less useless bitcasts are produced), but it does not affect the final assembly. Reviewed By: dmgreen Differential Revision: https://reviews.llvm.org/D86146
-
Craig Topper authored
[X86] Don't call hasFnAttribute and getFnAttribute for 'prefer-vector-width' and 'min-legal-vector-width' in getSubtargetImpl We only need to call getFnAttribute and then check if the Attribute is None or not.
-
Owen Anderson authored
Original Commit Message: After the commit r368987 (rG643adb55) was landed, the frame record (FP and LR register) may be placed in the middle of a stack frame if a function has both callee-saved general-purpose registers and floating point registers. This will break the stack unwinders that simply walk through the frame records (based on the guarantee from AAPCS64 "The Frame Pointer" section). This commit fixes the problem by adding the frame record offset. Patch By: logan Differential Revision: D70800
-
Teresa Johnson authored
Fix bot failure from 7ed8124d: http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-ubuntu/builds/8533 Since we are always using dynamic shadow, insertDynamicShadowAtFunctionEntry should always return true for modifying the function.
-
LLVM GN Syncbot authored
-
Arthur Eubanks authored
-
Arthur Eubanks authored
The NPM doesn't support call-site alwaysinline as described in the comments. Also make NPM runs more similar to legacy PM runs. Reviewed By: ychen, asbirlea Differential Revision: https://reviews.llvm.org/D86663
-
Aditya Nandakumar authored
https://reviews.llvm.org/D83833 Patch adds two new GICombinerRules for G_SELECT. The rules include: combining selects with undef comparisons into their first selectee value, and to combine away selects with constant comparisons. Patch additionally adds a new combiner test for the AArch64 target to test these new G_SELECT combiner rules and the existing select_same_val combiner rule. Patch by mkitzan
-
Jonas Devlieghere authored
Always make lldb-argdumper a dependency of liblldb. Currently it is only a dependency of the python swig target because of the relative symlink in the python resource directory. That means that the dependency won't be there when LLDB_ENABLE_PYTHON is disabled. Differential revision: https://reviews.llvm.org/D86722
-
Jonas Devlieghere authored
Move the construction of the triple out of getArchCFlags in the DarwinBuilder.
-
Arthur Eubanks authored
After https://reviews.llvm.org/D85159.
-
Simon Moll authored
-
Shinji Okumura authored
Add a new flag that indicates which stage in the process we are in. This flag is introduced for handling behavior of `getAAFor` according to the stage. (discussed in D86635) Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D86678
-
Aditya Nandakumar authored
https://reviews.llvm.org/D86676 Sometimes we can have the following code x:gpr(s32) = G_OP Say we build G_OP2 to the same x and then delete the previous instruction. Using something like Register X = ...; auto NewMIB = CSEBuilder.buildOp2(X, ... args); Currently there's a mismatch in how NewMIB is profiled and inserted into the CSEMap (ie it doesn't consider register bank/register class along with type).Unify the profiling by refactoring and calling the common method. This was found by turning on the CSEInfo::verify in at the end of each of our GISel passes which turns inconsistent state/non determinism in CSEing into crashes which likely usually indicates missing calls to Observer on mutations (the most common case). Here non determinism usually means not cseing sometimes, but almost never about producing incorrect code. Also this patch adds this verification at the end of the combiners as well.
-
Lucas Prates authored
When joining the legal parts of vector arguments into its original value during the lower of Formal Arguments in SelectionDAGBuilder, the Calling Convention information was not being propagated for the handling of each individual parts. The same did not happen when lowering calls, causing a mismatch. This patch fixes the issue by properly propagating the Calling Convention details. This fixes Bugzilla #47001. Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D86715
-
- Aug 27, 2020
-
-
Benjamin Kramer authored
-
Teresa Johnson authored
See RFC for background: http://lists.llvm.org/pipermail/llvm-dev/2020-June/142744.html Note that the runtime changes will be sent separately (hopefully this week, need to add some tests). This patch includes the LLVM pass to instrument memory accesses with either inline sequences to increment the access count in the shadow location, or alternatively to call into the runtime. It also changes calls to memset/memcpy/memmove to the equivalent runtime version. The pass is modeled on the address sanitizer pass. The clang changes add the driver option to invoke the new pass, and to link with the upcoming heap profiling runtime libraries. Currently there is no attempt to optimize the instrumentation, e.g. to aggregate updates to the same memory allocation. That will be implemented as follow on work. Differential Revision: https://reviews.llvm.org/D85948
-
Mikhail Maltsev authored
This reverts commit 3b71f915. The commit is breaking some build bots.
-
Roman Lebedev authored
Apparently, we don't do this, neither in EarlyCSE, nor in InstSimplify, nor in (old) GVN, but do in NewGVN and SimplifyCFG of all places.. While i could teach EarlyCSE how to hash PHI nodes, we can't really do much (anything?) even if we find two identical PHI nodes in different basic blocks, same-BB case is the interesting one, and if we teach InstSimplify about it (which is what i wanted originally, https://reviews.llvm.org/D86530), we get EarlyCSE support for free. So i would think this is pretty uncontroversial. On vanilla llvm test-suite + RawSpeed, this has the following effects: ``` | statistic name | baseline | proposed | Δ | % | \|%\| | |----------------------------------------------------|-----------|-----------|-------:|---------:|---------:| | instsimplify.NumPHICSE | 0 | 23779 | 23779 | 0.00% | 0.00% | | asm-printer.EmittedInsts | 7942328 | 7942392 | 64 | 0.00% | 0.00% | | assembler.ObjectBytes | 273069192 | 273084704 | 15512 | 0.01% | 0.01% | | correlated-value-propagation.NumPhis | 18412 | 18539 | 127 | 0.69% | 0.69% | | early-cse.NumCSE | 2183283 | 2183227 | -56 | 0.00% | 0.00% | | early-cse.NumSimplify | 550105 | 542090 | -8015 | -1.46% | 1.46% | | instcombine.NumAggregateReconstructionsSimplified | 73 | 4506 | 4433 | 6072.60% | 6072.60% | | instcombine.NumCombined | 3640264 | 3664769 | 24505 | 0.67% | 0.67% | | instcombine.NumDeadInst | 1778193 | 1783183 | 4990 | 0.28% | 0.28% | | instcount.NumCallInst | 1758401 | 1758799 | 398 | 0.02% | 0.02% | | instcount.NumInvokeInst | 59478 | 59502 | 24 | 0.04% | 0.04% | | instcount.NumPHIInst | 330557 | 330533 | -24 | -0.01% | 0.01% | | instcount.TotalInsts | 8831952 | 8832286 | 334 | 0.00% | 0.00% | | simplifycfg.NumInvokes | 4300 | 4410 | 110 | 2.56% | 2.56% | | simplifycfg.NumSimpl | 1019808 | 999607 | -20201 | -1.98% | 1.98% | ``` I.e. it fires ~24k times, causes +110 (+2.56%) more `invoke` -> `call` transforms, and counter-intuitively results in *more* instructions total. That being said, the PHI count doesn't decrease that much, and looking at some examples, it seems at least some of them were previously getting PHI CSE'd in SimplifyCFG of all places.. I'm adjusting `Instruction::isIdenticalToWhenDefined()` at the same time. As a comment in `InstCombinerImpl::visitPHINode()` already stated, there are no guarantees on the ordering of the operands of a PHI node, so if we just naively compare them, we may false-negatively say that the nodes are not equal when the only difference is operand order, which is especially important since the fold is in InstSimplify, so we can't rely on InstCombine sorting them beforehand. Fixing this for the general case is costly (geomean +0.02%), and does not appear to catch anything in test-suite, but for the same-BB case, it's trivial, so let's fix at least that. As per http://llvm-compile-time-tracker.com/compare.php?from=04879086b44348cad600a0a1ccbe1f7776cc3cf9&to=82bdedb888b945df1e9f130dd3ac4dd3c96e2925&stat=instructions this appears to cause geomean +0.03% compile time increase (regression), but geomean -0.01%..-0.04% code size decrease (improvement).
-
Roman Lebedev authored
PHI nodes depend on the block they're in, so we can only deal with the most basic case of same-BB PHI's.
-