- Dec 17, 2022
-
-
Christudasan Devadasan authored
We always assume the vector register is dead or killed while inserting the VGPR spills in the prolog. It is not always true. Used the entry block liveIn data while setting the flag. Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D124194
-
Christudasan Devadasan authored
The custom VGPR spills inserted during frame lowering maintain a separate list for WWM reserved registers. Added them into WWMSpills that already tracks such reserved registers. It unifies the spill insertion. Reviewed By: nhaehnle, arsenm Differential Revision: https://reviews.llvm.org/D124193
-
Christudasan Devadasan authored
Since the writelane instruction used for SGPR spills can modify inactive lanes, the callee must preserve the VGPR this instruction modifies even if it was marked Caller-saved. Reviewed By: arsenm, nhaehnle Differential Revision: https://reviews.llvm.org/D124192
-
Fangrui Song authored
std::optional::value() has undesired exception checking semantics and is unavailable in some older Xcode. The call sites block std::optional migration.
-
Fangrui Song authored
std::optional::value() has undesired exception checking semantics and is unavailable in some older Xcode. The call sites block std::optional migration.
-
Fangrui Song authored
std::optional::value() has undesired exception checking semantics and is unavailable in some older Xcode. The call sites block std::optional migration.
-
Fangrui Song authored
std::optional::value() has undesired exception checking semantics and is unavailable in some older Xcode. The call sites block std::optional migration.
-
ziqingluo-90 authored
Unsafe Buffer Usage analysis only warns unsafe buffer accesses but not pointer dereferences. An array subscript on a literal zero is equivalent to dereference a pointer thus we do not want to warn it. Reviewed By: NoQ Differential Revision: https://reviews.llvm.org/D138321
-
Fangrui Song authored
std::optional::value() has undesired exception checking semantics and is unavailable in some older Xcode. The call sites block std::optional migration.
-
Fangrui Song authored
std::optional::value() has undesired exception checking semantics and is unavailable in some older Xcode. The call sites block std::optional migration.
-
Fangrui Song authored
std::optional::value() has undesired exception checking semantics and is unavailable in some older Xcode. The call sites block std::optional migration.
-
ziqingluo-90 authored
Generalize the pointer expression AST matcher in Unsafe Buffer Usage analysis. Add test cases for various kinds of pointer usages. Reviewed By: NoQ, aaron.ballman, xazax.hun Differential Revision: https://reviews.llvm.org/D138318
-
Fangrui Song authored
value() has undesired exception checking semantics and calls __throw_bad_optional_access in libc++. Moreover, the API is unavailable without _LIBCPP_NO_EXCEPTIONS on older Mach-O platforms (see _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS).
-
Fangrui Song authored
-
Fangrui Song authored
-
Wenzel Jakob authored
This example shows how to use the newly added LLVMOrcCreateRTDyldObjectLinkingLayerWithMCJITMemoryManagerLikeCallbacks API.
-
Lang Hames authored
Adds a LLVMOrcCreateRTDyldObjectLinkingLayerWithMCJITMemoryManagerLikeCallbacks function that can be used to create an RTDyldObjectLinkingLayer using callbacks that are similar (but not identical) to those used in LLVMCreateSimpleMCJITMemoryManager. This is intended to ease the transition to ORC for MCJIT C-API clients. Differential Revision: https://reviews.llvm.org/D139393
-
Fangrui Song authored
value() has undesired exception checking semantics and calls __throw_bad_optional_access in libc++. Moreover, the API is unavailable without _LIBCPP_NO_EXCEPTIONS on older Mach-O platforms (see _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS). This fixes check-clang-tools.
-
Vy Nguyen authored
This reverts commit 52a118d0. New changes: Fix tests to dump both slices in the fat-archive because otool isn't deterministic about which slice it prints across different archs. (It printed x86 on x86 machines but arm64 on arm64, this was why the test failed on arm64) Differential Revision: https://reviews.llvm.org/D139572
-
Yingchi Long authored
Most of VP intrinsics are implemented in RISC-V backends, but vp.reduce.mul (element length > 1) does not yet. Legalizes vp.reduce.mul using ExpandVectorPredication Pass. Reviewed By: reames Differential Revision: https://reviews.llvm.org/D139721
-
Artem Dergachev authored
This patch adds more abstractions that we'll need later for emitting -Wunsafe-buffer-usage fixits. It doesn't emit any actual fixits, so no change is observed behavior, but it introduces a way to emit fixits, and existing tests now verify that the compiler still emits no fixits, despite knowing how to do so. The purpose of our code transformation analysis is to fix variable types in the code from raw pointer types to C++ standard collection/view types. The analysis has to decide on its own which specific type is the most appropriate for every variable. This patch introduces the Strategy class that maps variables to their most appropriate types. In D137348 we've introduced the Gadget abstraction, which describes a rigid AST pattern that the analysis "fully understands" and may need to fix. Which specific fix is actually necessary for a given Gadget, and whether it's necessary at all, and whether it's possible in the first place, depends on the Strategy. So, this patch adds a virtual method which every gadget can implement in order to teach the analysis how to fix that gadget: Gadget->getFixits(Strategy) However, even if the analysis knows how to fix every Gadget, doesn't necessarily mean it can fix the variable. Some uses of the variable may have never been covered by Gadgets, which corresponds to the situation that the analysis doesn't fully understand how the variable is used. This patch introduces a Tracker class that tracks all variable uses (i.e. DeclRefExprs) in the function. Additionally, each Gadget now provides a new virtual method Gadget->getClaimedVarUseSites() that the Tracker can call to see which DeclRefExprs are "claimed" by the Gadget. In order to fix the variable with a certain Strategy, the Tracker needs to confirm that there are no unclaimed uses, and every Gadget has to provide a fix for that Strategy. This "conservative" behavior guarantees that fixes emitted by our analysis are correct by construction. We can now be sure that the analysis won't attempt to emit a fix if it doesn't understand the code. Later, as we implement more getFixits() methods in individual Gadget classes, we'll start progressively emitting more and more fixits. Differential Revision: https://reviews.llvm.org/D138253
-
Benoit Jacob authored
The requirement that divisor>0 is not enforced here outside of the constant case, but how to enforce it? If I understand correctly, it is UB and while it is nice to be able to deterministically intercept UB, that isn't always feasible. Hopefully, keeping the existing enforcement in the constant case is enough. Differential Revision: https://reviews.llvm.org/D140079
-
Roman Lebedev authored
Reland "[SimplifyCFG] `FoldBranchToCommonDest()`: deal with mismatched IV's in PHI's in common successor block" This reverts commit 37b8f09a, and returns commit 1bd0b82e. The miscompile was in InstCombine, and it has been addressed. This tries to approach the problem noted by @arsenm: terrible codegen for `__builtin_fpclassify()`: https://godbolt.org/z/388zqdE37 Just because the PHI in the common successor happens to have different incoming values for these two blocks, doesn't mean we have to give up. It's quite easy to deal with this, we just need to produce a select: https://alive2.llvm.org/ce/z/000srb Now, the cost model for this transform is rather overly strict, so this will basically never fire. We tally all (over all preds) the selects needed to the NumBonusInsts Differential Revision: https://reviews.llvm.org/D139275
-
Roman Lebedev authored
This is consistent with how other commutative matchers operate, and i assumed that is how this one worked, alas it did not, and thus `foldNestedSelects()` was miscompiling stuff.
-
Roman Lebedev authored
-
Roman Lebedev authored
-
Peter Klausler authored
Nice try, but no, you can't initialize an instance of a derived type using a structure constructor that has a component corresponding to an allocatable component. Differential Revision: https://reviews.llvm.org/D140144
-
Fangrui Song authored
-
Mitch Phillips authored
This reverts commit cc9d9df7. Reason: This change is dependent on a commit that needs to be rolled back because it broke the ASan buildbot. See https://reviews.llvm.org/rGfc21f2d7bae2e0be630470cc7ca9323ed5859892 for more information.
-
Mitch Phillips authored
This reverts commit fc21f2d7. This patch broke the ASan buildbot. See https://reviews.llvm.org/rGfc21f2d7bae2e0be630470cc7ca9323ed5859892 for more information.
-
Mitch Phillips authored
This reverts commit 07c37534. Reason: This change is dependent on a commit that needs to be rolled back because it broke the ASan buildbot. See https://reviews.llvm.org/rGfc21f2d7bae2e0be630470cc7ca9323ed5859892 for more information.
-
Mitch Phillips authored
This reverts commit 4a5d0d87. Reason: This change is dependent on a commit that needs to be rolled back because it broke the ASan buildbot. See https://reviews.llvm.org/rGfc21f2d7bae2e0be630470cc7ca9323ed5859892 for more information.
-
Mitch Phillips authored
This reverts commit 2ac37df5. Reason: This change is dependent on a commit that needs to be rolled back because it broke the ASan buildbot. See https://reviews.llvm.org/rGfc21f2d7bae2e0be630470cc7ca9323ed5859892 for more information.
-
Mitch Phillips authored
This reverts commit 88f9b525. Reason: This change is dependent on a commit that needs to be rolled back because it broke the ASan buildbot. See https://reviews.llvm.org/rGfc21f2d7bae2e0be630470cc7ca9323ed5859892 for more information.
-
Mitch Phillips authored
This reverts commit 88db516a. Reason: This change is dependent on a commit that needs to be rolled back because it broke the ASan buildbot. See https://reviews.llvm.org/rGfc21f2d7bae2e0be630470cc7ca9323ed5859892 for more information.
-
Mitch Phillips authored
This reverts commit 12696d30. Reason: This change is dependent on a commit that needs to be rolled back because it broke the ASan buildbot. See https://reviews.llvm.org/rGfc21f2d7bae2e0be630470cc7ca9323ed5859892 for more information.
-
Mitch Phillips authored
This reverts commit 179ed887. Reason: This change is dependent on a commit that needs to be rolled back because it broke the ASan buildbot. See https://reviews.llvm.org/rGfc21f2d7bae2e0be630470cc7ca9323ed5859892 for more information.
-
Fangrui Song authored
value() has undesired exception checking semantics and calls __throw_bad_optional_access in libc++. Moreover, the API is unavailable without _LIBCPP_NO_EXCEPTIONS on older Mach-O platforms (see _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS). This fixes check-llvm.
-
ziqingluo-90 authored
Add an unsafe Gadget in the Unsafe Buffer Usage anslysis to represent (and search (via matchers) for) unsafe buffer-accessing array subscript operations. Reviewed By: NoQ, jkorous, aaron.ballman, xazax.hun Differential Revision: https://reviews.llvm.org/D137379
-
Nico Weber authored
-