- Dec 17, 2022
-
-
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
-
Peter Klausler authored
When an ELEMENTAL subroutine is erroneously declared with alternate return arguments, don't crash when checking the ranks of the actual arguments. Differential Revision: https://reviews.llvm.org/D140143
-
Kevin Sala authored
This patch applies the clang-format to the recent changes on OMPGridValues introduced by commit 2e9c3fe6.
-
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 clang.
-
Kevin Sala authored
Differential Revision: https://reviews.llvm.org/D140174
-
Siva Chandra Reddy authored
-
Mircea Trofin authored
This reverts commit a00aaf2b. Example failures: https://lab.llvm.org/buildbot#builders/68/builds/44933 https://lab.llvm.org/buildbot#builders/230/builds/6938
-
ibricchi authored
Adds the ability to load InlineAdvisors as plugins. This allows developing and distributing inlining heuristics outside of tree. The PluginInlineAdvisorAnalysis class serves as the entry point for dynamic advisors. Plugins must register instances of this class to provide their own InliningAdvisor. Reviewed By: mtrofin Differential Revision: https://reviews.llvm.org/D139644
-
Mircea Trofin authored
Snatched from D139644, but because it'd also need a fix in Passes/CMakeLists.txt, decided to peel it off.
-
Fangrui Song authored
-
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 LLVMMIRParser, LLVMGlobalISel, LLVMAsmPrinter, LLVMSelectionDAG.
-
David Blaikie authored
-
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).
-
David Blaikie authored
These were inconsistent (one `touch` line listed all the files in a single `touch` invocation, but the other listed them as separate commands with `&&`) and incorrect (one `&&` was missing, causing `touch` to try to touch a file called `touch` in the cwd, which might not be accessible/relevant to test execution) So make them consistent and simpler by using the "list all the files on a line in a single `touch` invocation" reducing the visual noise/clutter/etc.
-
Arthur Eubanks authored
-
Murali Vijayaraghavan authored
This is mostly going to be used for linalg transformations - to make pooling ops similar to convolution ops. Differential Revision: https://reviews.llvm.org/D140186
-
Peter Klausler authored
Extend the descriptor creation function for components to allow unlimited polymorphic components (CLASS(*)) and to also properly set the attributes of the established descriptors. Differential Revision: https://reviews.llvm.org/D140141
-
Artem Dergachev authored
This patch introduces a hierarchy of Gadget classes, which are going to be the core concept in the somewhat sophisticated machine behind the upcoming -Wunsafe-buffer-usage fix-it hints. A gadget is a rigid code pattern that constitutes an operation that the fixit machine "understands" well enough to work with. A gadget may be "unsafe" (i.e., constitute a raw buffer access) or "safe" (constitute a use of a pointer or array variable that isn't unsafe per se, but may need fixing if the participating variable changes type to a safe container/view). We'll be able to make decisions about how to fix the code depending on the set of gadgets that we've enumerated. Basically, in order to fix a type of a variable, each use of that variable has to participate in a gadget, and each such gadget has to consent to fixing itself according to the variable's new type. Differential Revision: https://reviews.llvm.org/D137348
-
Kevin Sala authored
This commit adds the AMDGPU NextGen plugin inheriting from PluginInterface's classes. It also implements the asynchronous behavior in the plugin operations: kernel launches and memory transfers. To this end, it implements the concept of streams of asynchronous operations. The streams are implemented using the HSA signals to define input and output dependencies between asynchronous operations. Missing features: - Retrieve the maximum number of threads per group that a kernel can run. This requires reading the image. - Implement __tgt_rtl_sync_event, not used on the libomptarget side. Differential Revision: https://reviews.llvm.org/D138389 -
Kevin Sala authored
This patch prepares for the new AMDGPU NextGen plugin. Differential Revision: https://reviews.llvm.org/D140213
-