- Dec 10, 2021
-
-
Florian Hahn authored
This allows easier access to the induction descriptor from VPlan, without needing to go through Legal. VPReductionPHIRecipe already contains a RecurrenceDescriptor in a similar fashion. Reviewed By: Ayal Differential Revision: https://reviews.llvm.org/D115111
-
Alexander Potapenko authored
To ease the deployment of KMSAN, we need a way to apply __attribute__((no_sanitize("kernel-memory"))) to the whole source file. Passing -msan-disable-checks=1 to the compiler will make it treat every function in the file as if it was lacking the sanitize_memory attribute. Differential Revision: https://reviews.llvm.org/D115236
-
LLVM GN Syncbot authored
-
Sameer Sahasrabuddhe authored
Reverts 02940d6d. Fixes breakage in the modules build. LLVM loops cannot represent irreducible structures in the CFG. This change introduce the concept of cycles as a generalization of loops, along with a CycleInfo analysis that discovers a nested hierarchy of such cycles. This is based on Havlak (1997), Nesting of Reducible and Irreducible Loops. The cycle analysis is implemented as a generic template and then instatiated for LLVM IR and Machine IR. The template relies on a new GenericSSAContext template which must be specialized when used for each IR. This review is a restart of an older review request: https://reviews.llvm.org/D83094 Original implementation by Nicolai Hähnle <nicolai.haehnle@amd.com>, with recent refactoring by Sameer Sahasrabuddhe <sameer.sahasrabuddhe@amd.com> Differential Revision: https://reviews.llvm.org/D112696
-
Christudasan Devadasan authored
While enabling vector superclasses with D109301, the AV spills are converted into VGPR spills by introducing appropriate copies. The whole thing ended up adding two instructions per spill (a copy + vgpr spill pseudo) and caused an incorrect liverange update during inline spiller. This patch adds the pseudo instructions for all AV spills from 32b to 1024b and handles them in the way all other spills are lowered. Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D115439
-
Nikita Popov authored
This shows a case where deferred inlining produces an exponential result. The test case demonstrates the basic exponential behavior, but is nowhere close to the worst case. For example, the file at https://gist.github.com/nikic/1262b5f7d27278e1b34a190ae10947f5 currently gets expanded from <100 lines to nearly 500000 lines of IR by opt -inline.
-
Konstantin Schwarz authored
The existing code assumed fcmp to always be an Instruction, but it can also be a ConstExpr. Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D115450
-
Chuanqi Xu authored
The intention should be formatted in two lines instead of one.
-
eopXD authored
Originially there are two places that does parsing - `parseArchString` and `parseFeatures`, each with its code on dependency check and implication. This patch extracts common parts of the two as functions of `RISCVISAInfo` and let them 2 use it. Reviewed By: asb Differential Revision: https://reviews.llvm.org/D112359
-
eopXD authored
Current implementation can't parse extension names that contains digits correctly (e.g. `zvl128b`). This patch fixes it. Reviewed By: asb Differential Revision: https://reviews.llvm.org/D109215
-
Kazu Hirata authored
-
Amara Emerson authored
This results in a very minor improvement in most cases, generating stores of xzr instead of moving zero to a vector register. Differential Revision: https://reviews.llvm.org/D115479
-
Taewook Oh authored
A test for the new pass manager was missed from the original diff D115317. Reviewed By: browneee Differential Revision: https://reviews.llvm.org/D115477
-
Duncan P. N. Exon Smith authored
Update getMemoryBufferForStream() to use `resize_for_overwrite()` and `truncate()` instead of `reserve()` and `set_size()`. Differential Revision: https://reviews.llvm.org/D115384
-
Noah Shutty authored
Adds a fallback to use the debuginfod client library (386655) in `findDebugBinary`. Fixed a cast of Erorr::success() to Expected<> in debuginfod library. Added Debuginfod to Symbolize deps in gn. Updates compiler-rt/lib/sanitizer_common/symbolizer/scripts/build_symbolizer.sh to include Debuginfod library to fix sanitizer-x86_64-linux breakage. Reviewed By: jhenderson, vitalybuka Differential Revision: https://reviews.llvm.org/D113717
-
Phoebe Wang authored
D113096 solved the "undefined reference to xxx" issue by adding constraint *m for the global var. But it has strong side effect due to the symbol in the assembly being replaced with constraint variable. This leads to some lowering fails. https://godbolt.org/z/h3nWoerPe This patch fix the problem by use the constraint *m as place holder rather than real constraint. It has negligible effect for the existing code generation. Reviewed By: skan Differential Revision: https://reviews.llvm.org/D115225
-
Noah Shutty authored
This reverts commit e2ad4f17 because it does not correctly fix the sanitizer buildbot breakage.
-
Jon Chesterfield authored
-
Noah Shutty authored
Adds a fallback to use the debuginfod client library (386655) in `findDebugBinary`. Fixed a cast of Erorr::success() to Expected<> in debuginfod library. Added Debuginfod to Symbolize deps in gn. Adds new symbolizer symbols to `global_symbols.txt`. Reviewed By: jhenderson Differential Revision: https://reviews.llvm.org/D113717
-
- Dec 09, 2021
-
-
Rong Xu authored
Slightly changed the default option values. Also avoided some bogus output.
-
Hasyimi Bahrudin authored
Refer to https://llvm.org/PR52546. Simplifies the following cases: not(X) == 0 -> X != 0 -> X not(X) <=u 0 -> X >u 0 -> X not(X) >=s 0 -> X <s 0 -> X not(X) != 1 -> X == 1 -> X not(X) <=u 1 -> X >=u 1 -> X not(X) >s 1 -> X <=s -1 -> X Differential Revision: https://reviews.llvm.org/D114666
-
Arthur Eubanks authored
getAlignment() is deprecated.
-
LLVM GN Syncbot authored
-
Jessica Paquette authored
These always use FPRs only. Differential Revision: https://reviews.llvm.org/D115376
-
Craig Topper authored
There are two signatures of setSpecialOperandAttr in TargetInstrInfo. One of them is only called from PPCInstrInfo which has an override of it. Remove it from TargetInstrInfo and make it a non-virtual method in PPCInstrInfo. Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D115404
-
Daniel Thornburgh authored
G_PTR_ADD takes arguments of two different types, so it probably shouldn't be considered commutative just on that basis. A recent G_PTR_ADD reassociation optimization (https://reviews.llvm.org/D109528) can emit erroneous code if the pattern matcher commutes the arguments; this can happen when the base pointer was created by G_INTTOPTR of a G_CONSTANT and the offset register is variable. This was discovered on the llvm-mos fork, but I added a failing test case that should apply to AArch64 (and more generally). Differential Revision: https://reviews.llvm.org/D114655
-
Haowei Wu authored
This change adds options to llvm-ifs to allow it to generate multiple types of stub files at a single invocation. Differential Revision: https://reviews.llvm.org/D115024
-
Jessica Paquette authored
Necessary for implementing some combines on floating point selects. Differential Revision: https://reviews.llvm.org/D115372
-
Alexey Bataev authored
The comparator for the sort functions should provide strict weak ordering relation between parameters. Current solution causes compiler crash with some standard c++ library implementations, because it does not meet this criteria. Tried to fix it + it improves the iverall vectorization result. Differential Revision: https://reviews.llvm.org/D115268
-
Philip Reames authored
The code claimed to handle nsw/nuw, but those aren't passed via builder state and the explicit IR construction just above never sets them. The only case this bit of code is actually relevant for is FMF flags. However, dropPoisonGeneratingFlags currently doesn't know about FMF at all, so this was a noop. It's also unneeded, as the caller explicitly configures the flags on the builder before this call, and the flags on the individual ops should be controled by the intrinsic flags anyways. If any of the flags aren't safe to propagate, the caller needs to make that change.
-
Ellis Hoag authored
Just a simple typo fix that allows me to test landing a commit now that I have commit access. Reviewed By: xgupta Differential Revision: https://reviews.llvm.org/D115414
-
Philip Reames authored
The recurrence lowering code has handling which claims to be about flag intersection, but all the callers pass empty arrays to the arguments. The sole exception is a caller of a method which has the argument, but no implementation. I don't know what the intent was here, but it certaintly doesn't actually do anything today.
-
Philip Reames authored
This reorders existing transforms to put demanded elements last. The reasoning here is that when we have an example which can be scalarized or handled via demanded bits, we should prefer scalarization as that doesn't require dropping flags on arithmetic instructions. This doesn't show major changes in the tests today, but once I add support for fast math flags to dropPoisonGeneratingFlags this becomes glaringly obvious. Differential Revision: https://reviews.llvm.org/D115394
-
Philip Reames authored
This change allows us to estimate trip count from profile metadata for all multiple exit loops. We still do the estimate only from the latch, but that's fine as it causes us to over estimate the trip count at worst. Reviewing the uses of the API, all but one are cases where we restrict a loop transformation (unroll, and vectorize respectively) when we know the trip count is short enough. So, as a result, the change makes these passes strictly less aggressive. The test change illustrates a case where we'd previously have runtime unrolled a loop which ran fewer iterations than the unroll factor. This is definitely unprofitable. The one case where an upper bound on estimate trip count could drive a more aggressive transform is peeling, and I duplicated the logic being removed from the generic estimation there to keep it the same. The resulting heuristic makes no sense and should probably be immediately removed, but we can do that in a separate change. This was noticed when analyzing regressions on D113939. I plan to come back and incorporate estimated trip counts from other exits, but that's a minor improvement which can follow separately. Differential Revision: https://reviews.llvm.org/D115362
-
Stanislav Mekhanoshin authored
Transform ``` (~a & b & c) | ~(a | b | c) -> ~(a | (b ^ c)) ``` And swapped case: ``` (~a | b | c) & ~(a & b & c) -> ~a | (b ^ c) ``` ``` ---------------------------------------- define i4 @src(i4 %a, i4 %b, i4 %c) { %0: %or1 = or i4 %b, %a %or2 = or i4 %or1, %c %not1 = xor i4 %or2, 15 %not2 = xor i4 %a, 15 %and1 = and i4 %b, %not2 %and2 = and i4 %and1, %c %or3 = or i4 %and2, %not1 ret i4 %or3 } => define i4 @tgt(i4 %a, i4 %b, i4 %c) { %0: %1 = xor i4 %c, %b %2 = or i4 %1, %a %or3 = xor i4 %2, 15 ret i4 %or3 } Transformation seems to be correct! ``` ``` ---------------------------------------- define i4 @src(i4 %a, i4 %b, i4 %c) { %0: %and1 = and i4 %b, %a %and2 = and i4 %and1, %c %not1 = xor i4 %and2, 15 %not2 = xor i4 %a, 15 %or1 = or i4 %not2, %b %or2 = or i4 %or1, %c %and3 = and i4 %or2, %not1 ret i4 %and3 } => define i4 @tgt(i4 %a, i4 %b, i4 %c) { %0: %xor = xor i4 %b, %c %not = xor i4 %a, 15 %or = or i4 %xor, %not ret i4 %or } Transformation seems to be correct! ``` Differential Revision: https://reviews.llvm.org/D112966
-
Kazu Hirata authored
-
Craig Topper authored
D113805 improved handling of i32 divu/remu on RV64. The basic idea from that can be extended to (mul (and X, C2), C1) where C2 is any mask constant. We can replace the and with an SLLI by shifting by the number of leading zeros in C2 if we also shift C1 left by XLen - lzcnt(C1) bits. This will give the full product XLen additional trailing zeros, putting the result in the output of MULHU. If we can't use ANDI, ZEXT.H, or ZEXT.W, this will avoid materializing C2 in a register. The downside is it make take 1 additional instruction to create C1. But since that's not on the critical path, it can hopefully be interleaved with other operations. The previous tablegen pattern is replaced by custom isel code. Reviewed By: asb Differential Revision: https://reviews.llvm.org/D115310
-
Jon Chesterfield authored
-
Arthur Eubanks authored
Reviewed By: gchatelet Differential Revision: https://reviews.llvm.org/D115370
-
Craig Topper authored
-Remove feq, fle, flt tests from *-arith.ll in favor of *-fcmp.ll which tests all predicates. Reviewed By: asb Differential Revision: https://reviews.llvm.org/D113703
-