- May 27, 2022
-
-
Mike Rice authored
Refactor the code that handles the align clause of 'omp allocate' so it can be used with globals as well as local variables. Differential Revision: https://reviews.llvm.org/D126426
-
Owen Anderson authored
This reverts commit 1e911498. Pending further discussion.
-
Philip Reames authored
This change reorganizes the majority of frame index resolution into a two strep process. Step 1 - Select which base register we're going to use. Step 2 - Compute the offset from that base register. The key point is that this allows us to share the step 2 logic for the SP case. This reduces the code duplication, and (I think) makes the code much easier to follow. I also went ahead and added assertions into phase 2 to catch errors where we select an illegal base pointer. In general, we can't index from a base register to a stack location if that requires crossing a variable and unknown region. In practice, we have two such cases: dynamic stack realign and var sized objects. Note that crossing the scalable region is fine since while variable, it's a known variability which can be expressed in the offset. Differential Revision: https://reviews.llvm.org/D126403 -
Shoaib Meenai authored
This reverts commit ec10ac75. See https://discourse.llvm.org/t/cmake-regeneration-is-broken/62788. This change caused Ninja's CMake regeneration to depend on the build, which prevented CMake regeneration from functioning properly and caused spurious build failures on incremental builds when a CMake change occurred.
-
Shoaib Meenai authored
We've observed segfaults in libunwind when attempting to check for the Linux aarch64 sigreturn frame, presumably because of bad unwind info leading to an incorrect PC that we attempt to read from. Use process_vm_readv to read the memory safely instead. The s390x code path should likely follow suit, but I don't have the hardware to be able to test that, so I didn't modify it here either. Reviewed By: MaskRay, rprichard, #libunwind Differential Revision: https://reviews.llvm.org/D126343
-
Shoaib Meenai authored
Create a macro for this instead of duplicating the architecture checks everywhere. (It's a little redundant to use it when we're checking for a specific architecture, but I'm also applying it there for consistency.) Reviewed By: rprichard, MaskRay, #libunwind Differential Revision: https://reviews.llvm.org/D126342
-
Nikita Popov authored
Use logical instead of bitwise and to combine conditions, to avoid propagating poison from a later condition if an earlier one is already false. This avoids introducing branch on poison. Differential Revision: https://reviews.llvm.org/D125898
-
- May 26, 2022
-
-
Philip Reames authored
During insertion of VSETVLI, we have two related bits of code which decide whether we can reuse a previous vsetvli result. As was pointed out in the original review, these cases can allow any prior state for which we know that VL is the same for any value of AVL. This was originally separated out of a desire for separate tests and review. As it turns out, finding a test case for this has been quite challenging. Most of the cases I tried, we manage to already get through other chains of logic. We do have one correct test change, but that only exercises one of the two changes. Differential Revision: https://reviews.llvm.org/D126400
-
Alexey Bataev authored
Patch improves compile time. For function calls, which cannot be vectorized, create a unique group for each such a call instead of subgroup. It prevents them from being grouped by a subgroups and attempts for their vectorization. Also, looks through casts operand to try to check their groups/subgroups. Reduces number of vectorization attempts. No changes in the statistics for SPEC2017/2006/llvm-test-suite. Differential Revision: https://reviews.llvm.org/D126476
-
Alexey Bataev authored
Need to handle a corner case correctly, if all elements are Undefs/Poisons, need to emit actual values, not just poisons. Differential Revision: https://reviews.llvm.org/D126298
-
Alex Zhikhartsev authored
Responding to a feature request from the Rust community: https://github.com/rust-lang/rust/issues/80630 void foo(X) { for (...) switch (X) case A X = B case B X = C } Even though the initial switch value is non-constant, the switch statement can still be threaded: the initial value will hit the switch statement but the rest of the state changes will proceed by jumping unconditionally. The early predictability check is relaxed to allow unpredictable values anywhere, but later, after the paths through the switch statement have been enumerated, no non-constant state values are allowed along the paths. Any state value not along a path will be an initial switch value, which can be safely ignored. Differential Revision: https://reviews.llvm.org/D124394
-
Florian Hahn authored
Show a missed case where the AND is currently blocks applying the information from the assume.
-
Krzysztof Parzyszek authored
The default implementations will perform a shallow copy instead of a deep copy, causing some internal data structures to be shared between different objects. Disable these operations so they don't get accidentally used. Differential Revision: https://reviews.llvm.org/D126401
-
Anastasia Stulova authored
-
LLVM GN Syncbot authored
-
Nikolas Klauser authored
Reviewed By: ldionne, var-const, #libc Spies: libcxx-commits, mgorny Differential Revision: https://reviews.llvm.org/D123016
-
Simon Pilgrim authored
-
Stefan Pintilie authored
On Power PC we have ISA3.0 for Power 9, ISA3.1 for Power 10. This patchs adds an ISA for mcpu=future. The idea is to have a placeholder ISA for work that is experimental and may not be supported by existing ISAs. Reviewed By: lei Differential Revision: https://reviews.llvm.org/D126075
-
Paul Robinson authored
-
Tyler Chatow authored
Fixes https://github.com/llvm/llvm-project/issues/55457 Ensures that attributes in the enum declaration are interpreted correctly, for instance: ``` enum class [[nodiscard]] E { a, b }; ``` Reviewed By: MyDeveloperDay, curdeius Differential Revision: https://reviews.llvm.org/D125848
-
Nathan Sidwell authored
CoreturnStmt needs to keep the operand value distinct from its use in any return_value call, so that instantiation may rebuild the latter. But it also needs to keep the operand value separate in the case of calling return_void. Code generation checks the operand value form to determine whether it is a distincte entity to the promise call. This adds the same logic to CFG generation. Reviewed By: bruno Differential Revision: https://reviews.llvm.org/D126399
-
NAKAMURA Takumi authored
-
Louis Dionne authored
If you are broken by this change, you should remove your CMake cache and re-run the CMake generation step.
-
Alexey Bataev authored
ScatterVectorize nodes should be handled same way as gathers in reorderBottomToTop function, since we can simple reorder the loads in this node. Because of that need to include such nodes to the list of gathered nodes to fix compiler crash. Differential Revision: https://reviews.llvm.org/D126378
-
Emil Kieri authored
This is a preparation for D125804, which makes test_errors.py test warnings the same way it already tests errors, i.e., assert that the emitted and expected errors are identical. The following changes are made to the test: - Add the WARNING directive where warnings are expected. - Remove -Werror in the RUN line. It does not serve much purpose here: with -Werror flang makes compilation fail in the presence of warnings, but warnings are still printed as warnings and not as errors. And I anyway find it better to test the warnings as warnings instead of promoting them and test both warnings and errors as errors. - Update the header comment describing the test case, mostly in response to the removal of -Werror. - Remove the reference to 'issue 458', referring to https://github.com/flang-compiler/f18/issues/458, from the header. I think the relevant reference here is to C1120 of the standard, and references to bug trackers from other projects (from before upstreaming) can be confusing. Reviewed By: PeteSteinfeld Differential Revision: https://reviews.llvm.org/D126176
-
Joseph Huber authored
CUDA requires that static variables be visible to the host when offloading. However, The standard semantics of a stiatc variable dictate that it should not be visible outside of the current file. In order to access it from the host we need to perform "externalization" on the static variable on the device. This requires generating a semi-unique name that can be affixed to the variable as to not cause linker errors. This is currently done using the CUID functionality, an MD5 hash value set up by the clang driver. This allows us to achieve is mostly unique ID that is unique even between multiple compilations of the same file. However, this is not always availible. Instead, this patch uses the unique ID from the file to generate a unique symbol name. This will create a unique name that is consistent between the host and device side compilations without requiring the CUID to be entered by the driver. The one downside to this is that we are no longer stable under multiple compilations of the same file. However, this is a very niche use-case and is not supported by Nvidia's CUDA compiler so it likely to be good enough. Reviewed By: tra Differential Revision: https://reviews.llvm.org/D125904
-
Sanjay Patel authored
With large compare constant: (X u/ Y) == C --> (X == C) && (Y == 1) (X u/ Y) != C --> (X != C) || (Y != 1) https://alive2.llvm.org/ce/z/EhKwh6 There are various potential missing icmp (div) transforms shown here: https://github.com/llvm/llvm-project/issues/55695 This is a generalization for part of the udiv + equality. I didn't check in detail, but some of those may only make sense as codegen transforms. This results in one extra instruction in IR, but it is better for analysis, and looks much better in codegen on all targets that I tried. Differential Revision: https://reviews.llvm.org/D126410
-
Sanjay Patel authored
This covers a generalization of one of the transforms suggested in #55695.
-
Louis Dionne authored
Like we have been doing for libc++ for a while now, start using from-scratch testing configurations for libc++abi. As a fly-by fix, remove the LIBCXXABI_NO_TIMER macro, which was defined but never used. Differential Revision: https://reviews.llvm.org/D125242
-
Simon Pilgrim authored
Remove local (uniform) constant folding and rely on getNode() to perform it Minor cleanup step toward adding non-uniform shift amount support
-
Marek Kurdej authored
Fixes https://github.com/llvm/llvm-project/issues/55610. Reviewed By: MyDeveloperDay Differential Revision: https://reviews.llvm.org/D126096
-
Aaron Ballman authored
Amends 681c50c6 and hopefully fixes: https://lab.llvm.org/buildbot/#/builders/109/builds/39347 https://lab.llvm.org/buildbot/#/builders/188/builds/14634 and others
-
Aaron Ballman authored
Post-commit feedback on https://reviews.llvm.org/D122895 pointed out that the diagnostic wording for some code was using "declaration" in a confusing way, such as: int foo(); // warning: a function declaration without a prototype is deprecated in all versions of C and is not supported in C2x int foo(int arg) { // warning: a function declaration without a prototype is deprecated in all versions of C and is not supported in C2x return 5; } And that we had other minor issues with the diagnostics being somewhat confusing. This patch addresses the confusion by reworking the implementation to be a bit more simple and a bit less chatty. Specifically, it changes the warning and note diagnostics to be able to specify "declaration" or "definition" as appropriate, and it changes the function merging logic so that the function without a prototype is always what gets warned on, and the function with a prototype is sometimes what gets noted. Additionally, when diagnosing a K&R C definition that is preceded by a function without a prototype, we don't note the prior declaration, we warn on it because it will also be changing behavior in C2x. Differential Revision: https://reviews.llvm.org/D125814
-
Gabor Marton authored
Dependent patch adds UnarySymExpr, now I'd like to handle that for SMT conversions like refutation. Differential Revision: https://reviews.llvm.org/D125547
-
Gabor Marton authored
Fixes https://github.com/llvm/llvm-project/issues/55241 Differential Revision: https://reviews.llvm.org/D125395
-
Gabor Marton authored
This patch adds a new descendant to the SymExpr hierarchy. This way, now we can assign constraints to symbolic unary expressions. Only the unary minus and bitwise negation are handled. Differential Revision: https://reviews.llvm.org/D125318
-
Gabor Marton authored
Depends on D124758. That patch introduced serious regression in the run-time in some special cases. This fixes that. Differential Revision: https://reviews.llvm.org/D126406
-
Ivan Kosarev authored
Resolves part of https://github.com/llvm/llvm-project/issues/38652 Reviewed By: dp Differential Revision: https://reviews.llvm.org/D125700
-
Aaron Ballman authored
This ensures that a deduced type like __auto_type matches the correct association instead of matching all associations. This addresses a regression from e4a42c5b Fixes #55702
-
Simon Pilgrim authored
Prep work as I'm investigating some cases where TLI::convertSetCCLogicToBitwiseLogic should accept vectors.
-