- Jan 05, 2023
-
-
Nikita Popov authored
-
Guillaume Chatelet authored
I'm surprised that clang accepts the current code. It seems odd to me to specialize templated static member variables. GCC rejects them: https://godbolt.org/z/3ecE9Ps7T This patch is in the context of https://github.com/llvm/llvm-project/issues/59368 Differential Revision: https://reviews.llvm.org/D140981
-
Mehdi Amini authored
Apply clang-tidy fixes for performance-unnecessary-value-param in AffineCanonicalizationUtils.cpp (NFC)
-
Nikita Popov authored
-
Nikita Popov authored
-
Nikita Popov authored
The LoopWithScalableTypes test is removed, because it is testing a situation that cannot occur with opaque pointers. If we convert this test to opaque pointers, it will not contain any scalable types at all.
-
Brad Smith authored
Define __GCC_HAVE_SYNC_COMPARE_AND_SWAP macros Reviewed By: kparzysz, aheejin, MaskRay Differential Revision: https://reviews.llvm.org/D140757
-
Dawid Jurczak authored
Assuming that collecting frame allocas doesn't modify CFG we can safely move DominatorTree construction outside loop and avoid expensive computations. Differential Revision: https://reviews.llvm.org/D140818
-
Diana Picus authored
Add G_BUILD_VECTOR and G_BUILD_VECTOR_TRUNC to the list of opcodes in `shouldCSEOpc`. This simplifies the code generated for vector splats. Differential Revision: https://reviews.llvm.org/D140965
-
Diana Picus authored
At the moment, `MachineIRBuilder::buildInstr` may build an instruction with a different opcode than the one passed in as parameter. This may cause confusion for its consumers, such as `CSEMIRBuilder`, which will memoize the instruction based on the new opcode, but will search through the memoized instructions based on the original one (resulting in missed CSE opportunities). This is all the more unpleasant since buildInstr is virtual and may call itself recursively both directly and via buildCast, so it's not always easy to follow what's going on. This patch simplifies the API of `MachineIRBuilder` so that the `buildInstr` method does the least surprising thing (i.e. builds an instruction with the specified opcode) and only the convenience `buildX` methods (`buildMerge` etc) are allowed freedom over which opcode to use. This can still be confusing (e.g. one might write a unit test using `buildBuildVectorTrunc` but instead get a plain `G_BUILD_VECTOR`), but at least it's explained in the comments. In practice, this boils down to 3 changes: * `buildInstr(G_MERGE_VALUES)` will no longer call itself with `G_BUILD_VECTOR` or `G_CONCAT_VECTORS`; this functionality is moved to `buildMerge` and replaced with an assert; * `buildInstr(G_BUILD_VECTOR_TRUNC)` will no longer call itself with `G_BUILD_VECTOR`; this functionality is moved to `buildBuildVectorTrunc` and replaced with an assert; * `buildInstr(G_MERGE_VALUES)` will no longer call `buildCast` and will instead assert if we're trying to merge a single value; no change is needed in `buildMerge` since it was already asserting more than one source operand. This change is NFC for users of the `buildX` methods, but users that call `buildInstr` with relaxed parameters will have to update their code (such instances will hopefully be easy to find thanks to the asserts). Differential Revision: https://reviews.llvm.org/D140964
-
Diana Picus authored
Add a test for CSE-ing G_BUILD_VECTOR. This will be enabled in D140965.
-
Benjamin Chetioui authored
`frem x, {+,-}inf` must return x to match the specification of LLVM's frem. Reviewed By: tra Differential Revision: https://reviews.llvm.org/D140846 -
Johannes Doerfert authored
We can now dump the IR before and after JIT optimizations into the files passed via `LIBOMPTARGET_JIT_PRE_OPT_IR_MODULE` and `LIBOMPTARGET_JIT_POST_OPT_IR_MODULE`, respectively. Similarly, users can set `LIBOMPTARGET_JIT_REPLACEMENT_MODULE` to replace the IR in the image with a custom IR module in a file. All options take file paths, documentation was added. Reviewed by: tianshilei1992 Differential revision: https://reviews.llvm.org/D140945
-
Joshua Cao authored
Fixes https://github.com/llvm/llvm-project/issues/58565 The previous implementation visits operands in pre-order, but this does not guarantee an instruction is visited before its uses. This can cause instructions to be copied in the incorrect order. For example: ``` a = ... b = add a, 1 c = add a, b d = add b, a ``` Pre-order visits does not guarantee the order in which `a` and `b` are visited. LoopUnrollAndJam may incorrectly insert `b` before `a`. This patch implements post-order visits. By visiting dependencies first, we guarantee that an instruction's dependencies are visited first. Differential Revision: https://reviews.llvm.org/D140255
-
Chen Zheng authored
2: minor fix for the comments
-
Chen Zheng authored
This patch also includes: 1: CRRegBank support 2: Some workarounds in PPC table gen for anyext/setcc patterns selection. Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D140878
-
luxufan authored
-
luxufan authored
-
Fangrui Song authored
-
Akira Hatanaka authored
If the second value passed to relatedSelect is a select, check whether neither arm of the select is related to the first value.
-
chenglin.bi authored
(C & X) | ~(C | Y) -> C ? X : ~Y https://alive2.llvm.org/ce/z/4yLh_i Reviewed By: spatel Differential Revision: https://reviews.llvm.org/D139080
-
Joshua Cao authored
Fixes https://github.com/llvm/llvm-project/issues/58454 Scalar evolution dispositions need to be forgotten to pass verification. We do not need to forget the subloop since it is automatically forgotten when forgetting the parent loop. Differential Revision: https://reviews.llvm.org/D140953
-
Piyou Chen authored
Note: Support Svnapot extension in https://reviews.llvm.org/D136570 Reviewed By: kito-cheng Differential Revision: https://reviews.llvm.org/D136816
-
Craig Topper authored
This was implemented for scalars in D140750.
-
bixia1 authored
Use an array of structures to represent the indices for the tailing COO region of a sparse tensor. Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D140870
-
Nico Weber authored
This reverts commit 19956353. f29cfab5 was reverted in c6c54132.
-
Matt Arsenault authored
The header now prints a warning if you include hsa.h telling you to include hsa/hsa.h
-
Matt Arsenault authored
-
Michael Spencer authored
This avoids basically guaranteed crashes when the check fails.
-
Ziqing Luo authored
Revert "[-Wunsafe-buffer-usage] Add a new `forEachDescendant` matcher that skips callable declarations" This reverts commit b2ac5fd7.
-
Ziqing Luo authored
For -Wunsafe-buffer-usage diagnostics, we want to warn about pointer arithmetics since resulting pointers can be used to access buffers. Therefore, I add an `UnsafeGadget` representing general pointer arithmetic operations. Reviewed by: NoQ Differential revision: https://reviews.llvm.org/D139233
-
Jason Molenda authored
As a last resort, with a Mach-O corefile, lldb will iterate through all memory segments looking for a dyld binary (for a userland process core dump) or an xnu kernel binary (kernel coredump). We often have metadata via LC_NOTEs so this final search mechanism is not needed. During the rewrite in https://reviews.llvm.org/D133680 I did not handle the case of finding the xnu kernel by exhaustive search correctly. rdar://103813200
-
Ziqing Luo authored
Note this is a change local to -Wunsafe-buffer-usage checks. Add a new matcher `forEveryDescendant` that recursively matches descendants of a `Stmt` but skips nested callable definitions. This matcher has same effect as using `forEachDescendant` and skipping `forCallable` explicitly but does not require the AST construction to be complete. Reviewed by: NoQ, xazax.hun Differential revision: https://reviews.llvm.org/D138329
-
Owen Anderson authored
Switch simplification could sometimes fail to notice when an intermediate case removal caused the switch condition to become constant. This would cause the switch to be simplified into a conditional branch rather than a direct branch. Most of the time this didn't matter, except that occasionally downstream parts of SimplifyCFG expect tautological branches to already have been eliminated. The missed handling in switch simplification would cause an assertion failure in the downstream code. Triggering the assertion failure is fairly sensitive to the exact order of various simplifications. Fixes https://github.com/llvm/llvm-project/issues/59768 Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D140831
-
Casey Carter authored
The converting constructor is ill-formed, and `==` is missing. (I didn't implement `!=` since the test is C++20-and-later only; I'll let the compiler do it for us.) Drive-by: change 4-space indent on line 27 to 2-space indent to be consistent with the rest of the test. Differential Revision: https://reviews.llvm.org/D131079
-
Craig Topper authored
[Support][SelectionDAG][GlobalISel] Hoist PostShift adjustment for IsAdd into UnsignedDivideUsingMagic. Instead of doing the adjustment in 3 different places in the code base, do it inside UnsignedDivideUsingMagic::get. Differential Revision: https://reviews.llvm.org/D141014
-
mariecwhite authored
Reviewed By: rsuderman Differential Revision: https://reviews.llvm.org/D141015
-
Alan Zhao authored
This feature causes clang to crash when compiling Chrome - see https://crbug.com/1405031 and https://github.com/llvm/llvm-project/issues/59675 Revert "[clang] Fix a clang crash on invalid code in C++20 mode." This reverts commit 32d7aae0. Revert "[clang] Remove overly restrictive aggregate paren init logic" This reverts commit c77a91bb. Revert "[clang][C++20] P0960R3 and P1975R0: Allow initializing aggregates from a parenthesized list of values" This reverts commit 40c52159.
-
Jonas Devlieghere authored
The pruning property that's part of the DIE info is fully computing during the analyzeContextInfo phase, but can be updated during the lookForDIEsToKeep phase. // Keep a module forward declaration if there is no definition. if (!(isODRAttribute(AttrSpec.Attr) && Info.Ctxt && Info.Ctxt->hasCanonicalDIE())) Info.Prune = false; When the pruning property is updated during the lookForDIEsToKeep phase, it's not propagated to the parent, unlike during the analyzeContextInfo phase. This can result in an invalid keep chain with the child DIE being marked as kept while its parent is still marked as pruned and therefore never kept, a situation that's now caught by 1b79bed8. This patch fixes this issue by updating the pruning properties of the parent DIE during the parent walk. Differential revision: https://reviews.llvm.org/D140930
-