- Jul 09, 2021
-
-
Roman Lebedev authored
This reverts commit 4e413e16, which landed almost 10 months ago under premise that the original behavior didn't match reality and was breaking users, even though it was correct as per the LangRef. But the LangRef change still hasn't appeared, which might suggest that the affected parties aren't really worried about this problem. Please refer to discussion in: * https://reviews.llvm.org/D87399 (`Revert "[InstCombine] erase instructions leading up to unreachable"`) * https://reviews.llvm.org/D53184 (`[LangRef] Clarify semantics of volatile operations.`) * https://reviews.llvm.org/D87149 (`[InstCombine] erase instructions leading up to unreachable`) clang has `-Wnull-dereference` which will diagnose the obvious cases of null dereference, it was adjusted in f4877c78, but it will only catch the cases where the pointer is a null literal, it will not catch the cases where an arbitrary store is expected to trap. Differential Revision: https://reviews.llvm.org/D105338
-
Roman Lebedev authored
-
Simon Pilgrim authored
-
Simon Pilgrim authored
[X86] ReplaceNodeResults - fp_to_sint/uint - manually widen v2i32 results to let us add AssertSext/AssertZext Its proving tricky to move this to the generic legalizer code, so manually insert the v2i32 subvector into v4i32, insert the AssertSext/AssertZext node, then extract the subvector again. This avoids masks in the truncation/pack code, which means we avoid a PSHUFB in the fp_to_sint/uint code for sub-128 bit types (specific targets can still combine the packs to a pshufb if they have fast variable per-lane shuffles). This was noticed when I was trying to improve fp_to_sint/uint costs with D103695 (and some targets had very high fp_to_sint costs due to the PSHUFB), so we can then update the fp_to_uint codegen from D89697.
-
Max Kazantsev authored
Added check for switch-terminated blocks in loops. Now if a block is terminated with a switch, we try to find out which of the cases is taken on 1st iteration and mark corresponding edge from the block to the case successor as live. Patch by Dmitry Makogon! Differential Revision: https://reviews.llvm.org/D105688 Reviewed By: nikic, mkazantsev
-
David Green authored
This patch removes the IsPairwiseForm flag from the Reduction Cost TTI hooks, along with some accompanying code for pattern matching reductions from trees starting at extract elements. IsPairWise is now assumed to be false, which was the predominant way that the value was used from both the Loop and SLP vectorizers. Since the adjustments such as D93860, the SLP vectorizer has not relied upon this distinction between paiwise and non-pairwise reductions. This also removes some code that was detecting reductions trees starting from extract elements inside the costmodel. This case was double-counting costs though, adding the individual costs on the individual instruction _and_ the total cost of the reduction. Removing it changes the costs in llvm/test/Analysis/CostModel/X86/reduction.ll to not double count. The cost of reduction intrinsics is still tested through the various tests in llvm/test/Analysis/CostModel/X86/reduce-xyz.ll. Differential Revision: https://reviews.llvm.org/D105484
-
Roman Lebedev authored
Speculatively adjust gtest's UnitTest::AddTestPartResult() to not rely on volatile store to null trapping This fallback path is used at least on PPC. If this doesn't work on some compilers that take this path, then this will have to be changed to either abort, or partitioned to do different things based on the compiler. Please refer to https://reviews.llvm.org/D105338.
-
Roman Lebedev authored
-
patacca authored
This is needed because the functions `isl_union_{set,map}_get_{set,map}_list` have been exposed to the C++ interface -
Bjorn Pettersson authored
This is a follow up to D105628 (commit 1db2551c). I had missed to replace 'unswitch' by 'simple-loop-unswitch' in one place.
-
Roman Lebedev authored
Please refer to https://reviews.llvm.org/D105338, such store will not trap, it will be removed.
-
Haojian Wu authored
See https://bugs.llvm.org/show_bug.cgi?id=50797#c6 Differential Revision: https://reviews.llvm.org/D105533
-
Roman Lebedev authored
* Drop any mention of `volatile`. Please refer to https://reviews.llvm.org/D105338 * Drop address space check - it really doesn't affect the behavior, the store will still be dropped: https://godbolt.org/z/dP8fevxG4
-
Whisperity authored
A change in the API happened as per http://reviews.llvm.org/D89463 (latest related commit b9e2b596) but the RST documentation was not updated to match this at that time.
-
Alex Richardson authored
Since D100490 this case is diagnosed for -z rel. This commit implements R_AARCH64_TLSDESC cases for AArch64::getImplicitAddend() and AArch64::relocate(). However, there are probably further relocation types that need to be handled for full support of -z rel. Fixes https://bugs.llvm.org/show_bug.cgi?id=47009 Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D100544
-
Alex Richardson authored
This allows checking dynamic relocation addends for -z rel and --apply-dynamic-relocs output. Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D101455
-
Alex Richardson authored
I found this missing case with the new --check-dynamic-relocation flag while running the lld tests with --apply-dynamic-relocs enabled by default. This is the same as D101452 just for RISC-V Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D101454
-
Alex Richardson authored
I found this missing case with the new --check-dynamic-relocation flag while running the lld tests with --apply-dynamic-relocs enabled by default. This also fixes a broken CHECK in lld/test/ELF/x86-64-gotpc-relax.s: The test wasn't using CHECK-NEXT, so it was passing despite the output actually containing relocations. I am not sure when this changed, but I think this behaviour is correct. Found with D101450 + enabling --apply-dynamic-relocs by default. Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D101452
-
Alex Richardson authored
This allows checking dynamic relocation addends for -z rel and --apply-dynamic-relocs output. Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D101451
-
Alex Richardson authored
There used to be many cases where addends for Elf_Rel were not emitted in the final object file (mostly when building for MIPS64 since the input .o files use RELA but the output uses REL). These cases have been fixed since, but this patch adds a check to ensure that the written values are correct. It is based on a previous patch that I added to the CHERI fork of LLD since we were using MIPS64 as a baseline. The work has now almost entirely shifted to RISC-V and Arm Morello (which use Elf_Rela), but I thought it would be useful to upstream our local changes anyway. This patch adds a (hidden) command line flag --check-dynamic-relocations that can be used to enable these checks. It is also on by default in assertions builds for targets that handle all dynamic relocations kinds that LLD can emit in Target::getImplicitAddend(). Currently this is enabled for ARM, MIPS, and I386. Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D101450
-
Alex Richardson authored
This patch changes the DynamicReloc class to store an enum instead of the overloaded useSymVA member to make it easier to understand and fix incorrect addends being written in some corner cases. The change is motivated by a follow-up review that checks the value of implicit Elf_Rel addends written to the output file. This patch fixes an incorrect output when using `-z rela` for i386 files with R_386_GOT32 relocations (not that this really matters since it's an unsupported configuration). Storing the relocation expression kind also addresses an incorrect addend FIXME in ppc64-abs64-dyn.s introduced in D63383. DynamicReloc now also has a special case for the MIPS TLS relocations (DynamicReloc::AgainstSymbolWithTargetVA) since the R_MIPS_TLS_TPREL{32/64} the symbol VA to the GOT for preemptible symbols. I'm not sure if the symbol value actually should be written for R_MIPS_TLS_TPREL32, but this patch does not attempt to change that behaviour. Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D100490 -
Tim Northover authored
FreeBSD's condvar.h (included by user.h in Threading.inc) uses a "struct thread" that conflicts with llvm::thread if both are visible when it's included. So this moves our #include after the FreeBSD code.
-
Dawid Jurczak authored
After this change DSE can eliminate malloc + memset and emit calloc. It's https://reviews.llvm.org/D101440 follow-up. Differential Revision: https://reviews.llvm.org/D103009
-
Bjorn Pettersson authored
It is confusing to have two ways of specifying the same pass ('simple-loop-unswitch' and 'unswitch'). This patch replaces 'unswitch' by 'simple-loop-unswitch' to get a unique identifier. Using 'simple-loop-unswitch' instead of 'unswitch' also has the advantage of matching how the pass is named in DEBUG_TYPE etc. So this makes it a bit more consistent how we refer to the pass in options such as -passes, -print-after and -debug-only. Reviewed By: aeubanks Differential Revision: https://reviews.llvm.org/D105628 -
Bjorn Pettersson authored
There was an alias between 'simplifycfg' and 'simplify-cfg' in the PassRegistry. That was the original reason for this patch, which effectively removes the alias. This patch also replaces all occurrances of 'simplify-cfg' by 'simplifycfg'. Reason for choosing that form for the name is that it matches the DEBUG_TYPE for the pass, and the legacy PM name and also how it is spelled out in other passes such as 'loop-simplifycfg', and in other options such as 'simplifycfg-merge-cond-stores'. I for some reason the name should be changed to 'simplify-cfg' in the future, then I think such a renaming should be more widely done and not only impacting the PassRegistry. Reviewed By: aeubanks Differential Revision: https://reviews.llvm.org/D105627
-
Bjorn Pettersson authored
To support options like -print-before=<pass> and -print-after=<pass> the PassBuilder will register PassInstrumentation callbacks as well as a mapping between internal pass class names and the pass names used in those options (and other cmd line interfaces). But for some reason all the passes that takes options where missing in those maps, so for example "-print-after=loop-vectorize" didn't work. This patch will add the missing entries by also taking care of function and loop passes with params when setting up the class to pass name maps. One might notice that even with this patch it might be tricky to know what pass name to use in options such as -print-after. This because there only is a single mapping from class name to pass name, while the PassRegistry currently is a bit messy as it sometimes reuses the same class for different pass names (without using the "pass with params" scheme, or the pass-name<variant> syntax). It gets extra messy in some situations. For example the MemorySanitizerPass can run like this (with debug and print-after) opt -passes='kmsan' -print-after=msan-module -debug-only=msan The 'kmsan' alias for 'msan<kernel>' is just confusing as one might think that 'kmsan' is a separate pass (but the DEBUG_TYPE is still just 'msan'). And since the module pass version of the pass adds a mapping from 'MemorySanitizerPass' to 'msan-module' one need to use 'msan-module' in the print-before and print-after options. Reviewed By: ychen Differential Revision: https://reviews.llvm.org/D105006
-
jacquesguan authored
Add extension macro __riscv_zvlsseg to enable Zvlsseg builtins only with target feature Zvlsseg. Reviewed By: HsiangKai Differential Revision: https://reviews.llvm.org/D105626
-
Haruki Imai authored
`-fno-semantic-interposition` was added for GCC in D102453, but some MLIR tests on SystemZ failed with GCC<10.3 due to a bug. Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D105453
-
Kai Luo authored
When the instruction has imm form and fed by LI, we can remove the redundat LI instruction. Below is an example: ``` renamable $x5 = LI8 2 renamable $x4 = exact SRD killed renamable $x4, killed renamable $r5, implicit $x5 ``` will be converted to: ``` renamable $x5 = LI8 2 renamable $x4 = exact RLDICL killed renamable $x4, 62, 2, implicit killed $x5 ``` But when we do this optimization, we forget to remove implicit killed $x5 This bug has caused a lnt case error. This patch is to fix above bug. Reviewed By: #powerpc, shchenz Differential Revision: https://reviews.llvm.org/D85288 -
Eric Christopher authored
-
Muhammad Omair Javaid authored
This reverts commit 458c230b. This broke LLDB buildbot testcase where breakpoint set at start of loop failed to hit. https://lab.llvm.org/buildbot/#/builders/96/builds/9404 https://github.com/llvm/llvm-project/blob/main/lldb/test/API/commands/process/attach/main.cpp#L15 Differential Revision: https://reviews.llvm.org/D105238
-
Reshabh Sharma authored
This patch explicitly sets the shadow offset for AMDGPU to match that of X86 on Linux. Reviewed By: vitalybuka https://reviews.llvm.org/D105282
-
Ben Shi authored
This patch will show the following optimization by future patches. (mul x imm) -> (SH1ADD x, (SLLI x, bits)) when imm = 2^n + 2. (mul x imm) -> (SH2ADD x, (SLLI x, bits)) when imm = 2^n + 4. (mul x imm) -> (SH3ADD x, (SLLI x, bits)) when imm = 2^n + 8. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D105614
-
Mehdi Amini authored
This reverts commit 0d0cff3a. The build is broken with GCC 5.4
-
Eli Friedman authored
In preparation for D104075. Some NFC cleanup, and some test coverage for planned changes.
-
Chia-hung Duan authored
Reviewed By: jpienaar Differential Revision: https://reviews.llvm.org/D105623
-
Kevin Athey authored
for issue: https://github.com/google/sanitizers/issues/1394 Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D104155
-
Yuanfang Chen authored
AddDiscriminatorsPass is in Legacy PM's O0 pipeline. This patch did the same for NPM O0 pipeline. Reviewed By: aeubanks, MaskRay Differential Revision: https://reviews.llvm.org/D105650
-
Gus Smith authored
We opt to use unit tests rather than check tests as the lattice/merger code is a small C++ component with a well-defined API. Testing this API via check tests would be far less direct and readable. In addition, as the check tests will only be able to test the API indirectly, the tests may break based on unrelated changes; e.g. changes in linalg. Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D104956
-
Stanislav Mekhanoshin authored
The rest of the SOP instructions implicitly set SCC and not suitable for the rematerialization. Differential Revision: https://reviews.llvm.org/D105670
-