- Dec 17, 2022
-
-
Matt Arsenault authored
Try to respect IgnoreLLVMUsed if the function was addrspacecasted to match llvm.used's type.
-
Paul Robinson authored
Part of the project to eliminate special handling for triples in lit expressions.
-
David Goldblatt authored
This operand bundle on an assume informs alias analysis that the arguments point to regions of memory that were allocated separately (i.e. different heap allocations, different allocas, or different globals). As a safety measure, we leave the analysis flag-disabled by default. Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D136514
-
Paul Robinson authored
Part of the project to eliminate special handling for triples in lit expressions.
-
Sprite authored
Just found some typos while reading the llvm/circt project. compliment -> complement emitsd -> emits
-
Peter Klausler authored
The ProcInterface structure is used only by ProcEntityDetails; it represents what a program might have put in parentheses in a procedure-declaration-stmt, either the name of a procedure interface or a declaration-type-spec. If a procedure entity has an implicit interface, the function result type (if any) can be kept in EntityDetails::type_, which already exists and is currently redundant for ProcEntityDetails symbols. All that is really needed is a nullable Symbol pointer in ProcEntityDetails to point to the procedure's explicit interface, when it has one. Also, catch the case where a procedure has an explicit interface and a program attempts to also give it a type. Differential Revision: https://reviews.llvm.org/D140134
-
Paul Robinson authored
Part of the project to eliminate special handling for triples in lit expressions.
-
Peiming Liu authored
When concat along dim 0, and all inputs/outputs are ordered with identity dimension ordering, the concatenated coordinates will be yield in lexOrder, thus no need to sort. Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D140228
-
Vasileios Porpodas authored
[IR][NFC] Cleanup: Remove non-const block iterators to force all updates go through an interface function Differential Revision: https://reviews.llvm.org/D140154
-
Peter Klausler authored
When a defined object is an array with a vector subscript, and it has a finalizable type, it may have a final subroutine with a matching or assumed rank dummy argument that cannot be called. Unless there is also a suitable elemental final subroutine, diagnose such a case with an error message. Differential Revision: https://reviews.llvm.org/D140131
-
Florian Hahn authored
Add a VP_CLASSOF_IMPL macro to define common classof implementations for recipes. This reduces duplication and also adds missing implementations to existing recipes.
-
Paul Robinson authored
Using std::optional in Support/TypeTraitsTest.cpp causes gcc 7.5 to complain. No public bots run a gcc that old, but we have internal bots that do. /home/probinson/projects/llvm-org/llvm-project/llvm/unittests/Support/TypeTraitsTest.cpp: In instantiation of ‘void {anonymous}::triviality::TrivialityTester() [with T = std::optional<int>; bool IsTriviallyCopyConstructible = true; bool IsTriviallyMoveConstructible = true]’: /home/probinson/projects/llvm-org/llvm-project/llvm/unittests/Support/TypeTraitsTest.cpp:121:52: required from here /home/probinson/projects/llvm-org/llvm-project/llvm/unittests/Support/TypeTraitsTest.cpp:29:3: error: static assertion failed: Mismatch in expected trivial copy construction! static_assert(llvm::is_trivially_copy_constructible<T>::value == ^~~~~~~~~~~~~ /home/probinson/projects/llvm-org/llvm-project/llvm/unittests/Support/TypeTraitsTest.cpp:32:3: error: static assertion failed: Mismatch in expected trivial move construction! static_assert(llvm::is_trivially_move_constructible<T>::value == ^~~~~~~~~~~~~ -
Matt Arsenault authored
The constructor should not depend on the MachineFunction
-
Roman Lebedev authored
The test was passing for me locally, but fails on bots: https://lab.llvm.org/buildbot/#/builders/98/builds/29290/steps/10/logs/stdio
-
https://reviews.llvm.org/D139275#4001580Roman Lebedev authored
SimplifyCFG change is correct and not at fault here. The actual miscompile appears to be happening in InstCombine. ``` $ /builddirs/llvm-project/build-Clang15/bin/opt -load /repositories/alive2/build-Clang-release/tv/tv.so -load-pass-plugin /repositories/alive2/build-Clang-release/tv/tv.so -passes='tv,instcombine,tv' -o /dev/null /repositories/llvm-project/llvm/test/Transforms/InstCombine/D139275_c4001580.ll ---------------------------------------- define float @D139275_c4001580(float %arg) { %0: %i = fcmp ugt float %arg, 0.000000 %i1 = fcmp ult float %arg, 1.000000 %i2 = and i1 %i, %i1 %i3 = fcmp uge float %arg, 0.100000 %i4 = xor i1 %i, %i2 %i5 = select i1 %i4, float 0.100000, float 0.000000 %i6 = and i1 %i3, %i2 %i7 = fadd float %arg, -0.100000 %i8 = select i1 %i6, float %i7, float %i5 ret float %i8 } => define float @D139275_c4001580(float %arg) { %0: %i = fcmp ugt float %arg, 0.000000 %i1 = fcmp ult float %arg, 1.000000 %i2 = and i1 %i, %i1 %i3 = fcmp uge float %arg, 0.100000 %i7 = fadd float %arg, -0.100000 %i5 = select i1 %i3, float %i7, float 0.100000 %i8 = select i1 %i2, float %i5, float 0.000000 ret float %i8 } Transformation doesn't verify! (unsound) ERROR: Value mismatch Example: float %arg = #x3dcbb820 (0.099472284317?) Source: i1 %i = #x1 (1) i1 %i1 = #x1 (1) i1 %i2 = #x1 (1) i1 %i3 = #x0 (0) i1 %i4 = #x0 (0) float %i5 = #x00000000 (+0.0) i1 %i6 = #x0 (0) float %i7 = #xba0a5680 (-0.000527717173?) float %i8 = #x00000000 (+0.0) Target: i1 %i = #x1 (1) i1 %i1 = #x1 (1) i1 %i2 = #x1 (1) i1 %i3 = #x0 (0) float %i7 = #xba0a5680 (-0.000527717173?) float %i5 = #x3dcccccd (0.100000001490?) float %i8 = #x3dcccccd (0.100000001490?) Source value: #x00000000 (+0.0) Target value: #x3dcccccd (0.100000001490?) Pass: (anonymous namespace)::TVPass Command line: '/builddirs/llvm-project/build-Clang15/bin/opt' '-load' '/repositories/alive2/build-Clang-release/tv/tv.so' '-load-pass-plugin' '/repositories/alive2/build-Clang-release/tv/tv.so' '-passes=tv,instcombine,tv' '-o' '/dev/null' '/repositories/llvm-project/llvm/test/Transforms/InstCombine/D139275_c4001580.ll' Alive2: Transform doesn't verify! ``` -
Florian Hahn authored
This fixes a build failure with libc++ (`error: no matching function for call to 'max')`
-
Paul Robinson authored
Part of the project to eliminate special handling for triples in lit expressions.
-
Peter Klausler authored
Most attributes apply to only object or only procedure entities, and attempts to apply them to other kinds of symbol table entries are caught in name resolution when ConvertToObjectEntity() or ConvertToProcEntity() fails. However, the POINTER attribute can be applied to both, and name resolution can't perform that conversion yet, and as a result we don't catch many kinds of silly errors. Fix by ensuring that the symbol is of a type that could eventually become an object or procedure entity if it is not one already. Differential Revision: https://reviews.llvm.org/D140137
-
LLVM GN Syncbot authored
-
Hongtao Yu authored
This change introduces a missing frame inferrer aiming at fixing missing frames. It current only handles missing frames due to the compiler tail call elimination (TCE) but could also be extended to supporting other scenarios like frame pointer omission. When a tail called function is sampled, the caller frame will be missing from the call chain because the caller frame is reused for the callee frame. While TCE is beneficial to both perf and reducing stack overflow, a workaround being made in this change aims to find back the missing frames as much as possible. The idea behind this work is to build a dynamic call graph that consists of only tail call edges constructed from LBR samples and DFS-search for a unique path for a given source frame and target frame on the graph. The unique path will be used to fill in the missing frames between the source and target. Note that only a unique path counts. Multiple paths are treated unreachable since we don't want to overcount for any particular possible path. A switch --infer-missing-frame is introduced and defaults to be on. Some testing results: - 0.4% perf win according to three internal benchmarks. - About 2/3 of the missing tail call frames can be recovered, according to an internal benchmark. - 10% more profile generation time. Reviewed By: wenlei Differential Revision: https://reviews.llvm.org/D139367
-
Kai Nacke authored
Change: negtive -> negative is -> are Thanks to tschuett for finding these.
-
Roman Lebedev authored
* This is a recommit of 3c4d2a03, * which was reverted in 25f01d59, because it exposed a miscompile in PPC backend, which was resolved in https://reviews.llvm.org/D140089 / cb3f415c. * which was a recommit of cf624b23, * which was reverted in 5cfc22ca, because the cut-off on the number of vector elements was not low enough, and it triggered both SDAG SDNode operand number assertions, 5and caused compile time explosions in some cases. Let's try with something really *REALLY* conservative first, just to get somewhere, and try to bump it later. FIXME: should this respect TTI reg width * num vec regs? Original commit message: Now, there's a big caveat here - these bytes are abstract bytes, not the i8 we have in LLVM, so strictly speaking this is not exactly legal, see e.g. https://github.com/AliveToolkit/alive2/issues/860 ^ the "bytes" "could" have been a pointer, and loading it as an integer inserts an implicit ptrtoint. But at the same time, InstCombine's `InstCombinerImpl::SimplifyAnyMemTransfer()` would expand a memtransfer of 1/2/4/8 bytes into integer-typed load+store, so this isn't exactly a new problem. Note that in memory, poison is byte-wise, so we really can't widen elements, but SROA seems to be inconsistent here. Fixes #59116.
-
Alexander Kornienko authored
Revert "[SimplifyCFG] `FoldBranchToCommonDest()`: deal with mismatched IV's in PHI's in common successor block" This reverts commit 1bd0b82e, since it leads to miscompiles. See https://reviews.llvm.org/D139275#3993229 and https://reviews.llvm.org/D139275#4001580.
-
Roy Sundahl authored
This change is breaking internal builds. We use the -Xfoo pattern but can now no longer manage whether we allow an unused -Xfoo option to pass as a warning or promote it to an error. This reverts commit 98615fd3. Reviewed By: davide Differential Revision: https://reviews.llvm.org/D139717
-
- Dec 16, 2022
-
-
Nikolas Klauser authored
The clang-tidy checks can't be properly implemented before LLVM16 because the Clang CMake files don't provide the version before. Reviewed By: Mordante, #libc Spies: libcxx-commits, arichardson Differential Revision: https://reviews.llvm.org/D140071
-
Sjoerd Meijer authored
Opaque ptr types have a size in bits of 0. The legalised type is an i64 or vector of i64s, which do have a size. Because of this difference in size, target hook getMemoryOpCost modelled stores of ptr types as extending/truncating load/stores. Now we just check for opaque ptr types and return the legalised cost. This makes stores of pointers cheaper, and as a result we now SLP vectorise the changed test case. Differential Revision: https://reviews.llvm.org/D140193
-
Lorenzo Chelini authored
Use op separator to improve code navigation. Reviewed By: hanchung Differential Revision: https://reviews.llvm.org/D139917
-
Sjoerd Meijer authored
-
HanSheng Zhang authored
When promoting a phi in a catchswitch block to memory, we cannot insert load/store instruction in that block, and need to insert them inside all successors instead. Fixes https://github.com/llvm/llvm-project/issues/59185. Differential Revision: https://reviews.llvm.org/D138641
-
Nikita Popov authored
Currently InstCombine folds using the `return replaceInstUsesWith(V, Builder.CreateFoo())` pattern do not preserve the original name of the instruction. To preserve the name, you either have to use something like `return FooInst::Create(...)` which is usually less nice, or go out of the way to preserve the name with takeName(). We often don't do that. This patch instead preserves the name in replaceInstUsesWith() when replacing a named instruction with an unnamed instruction. To be conservative, I also added a zero-use check, which is a proxy for the case where the instruction was just created, rather than an existing one reused. Possibly we could drop that part. As InstCombine tests are robust against renames this does not cause any test diffs, so I regenerated a random test to show the effects. Differential Revision: https://reviews.llvm.org/D140192
-
Nemanja Ivanovic authored
The combiner for BUILD_VECTOR that merges consecutive loads into a wide load had two issues: - It didn't check that the input loads all have the same input chain - It didn't update nodes that are chained to the original loads to be chained to the new load This caused issues with bootstrap when 3c4d2a03 was committed. This patch fixes the issue so it can unblock this commit. Differential revision: https://reviews.llvm.org/D140046
-
Nikita Popov authored
Add an operands() method on SCEV, which forwards to the operands() method of individual SCEV expressions.
-
Archibald Elliott authored
This change: - Modifies the ACLE code to allow the new SLC value (3) for the prefetch target. - Introduces a new intrinsic, @llvm.aarch64.prefetch which matches the PRFM family instructions much more closely, and can represent all values for the PRFM immediate. The target-independent @llvm.prefetch intrinsic does not have enough information for us to be able to lower to it from the ACLE intrinsics correctly. - Lowers the acle calls to the new intrinsic on aarch64 (the ARM lowering is unchanged). - Implements code generation for the new intrinsic in both SelectionDAG and GlobalISel. We specifically choose to continue to support lowering the target-independent @llvm.prefetch intrinsic so that other frontends can continue to use it. Differential Revision: https://reviews.llvm.org/D139443
-
Dani Ferreira Franco Moura authored
Reviewed By: krasimir Differential Revision: https://reviews.llvm.org/D140211
-
Archibald Elliott authored
This feature adds upstream support for FEAT_RASv2 and FEAT_PFAR. Both are system-register-only, but FEAT_RAS is behind the command-line extension "+ras", so FEAT_RASv2 is behind "+rasv2". This patch includes support for ID_AA64MMFR4_EL1. This is an ID system register so it is not behind any feature flags. Differential Revision: https://reviews.llvm.org/D139936
-
Michael Buch authored
The `clang::TypePrinter` has recently been changed to suppress defaulted integral template parameters in D139986. Differential Revision: https://reviews.llvm.org/D139986
-
Nikita Popov authored
Use a consistent type for the operands() methods of different SCEV types. Also make the API consistent by only providing operands(), rather than also providin op_begin() and op_end() for some of them.
-
serge-sans-paille authored
And sneak in a small storage optimization of OptTable::PrefixChars
-
Backl1ght authored
Reviewed By: HazardyKnusperkeks, MyDeveloperDay Differential Revision: https://reviews.llvm.org/D140105
-
Nikita Popov authored
-