- Mar 19, 2024
-
-
Sergio Afonso authored
This reverts commit 2f2f16f3.
-
Zack Johnson authored
Fixing the type of the constant to avoid undefined behavior with respect to overflow.
-
NagyDonat authored
The checker alpha.security.ArrayBoundV2 performs bounds checking in two steps: first it checks for underflow, and if it isn't guaranteed then it assumes that there is no underflow. After this, it checks for overflow, and if that's guaranteed or the index is tainted then it reports it. This meant that in situations where overflow and underflow are both possible (but the index is either tainted or guaranteed to be invalid), the checker was reporting just an overflow error. This commit modifies the messages printed in these cases to mention the possibility of an underflow. --------- Co-authored-by:Balazs Benics <benicsbalazs@gmail.com>
-
Ulrich Weigand authored
We use the VSCBIQ/VSBIQ/VSBCBIQ family of instructions to implement USUBO/USUBO_CARRY for the i128 data type. However, these instructions use an inverted sense of the borrow indication flag (a value of 1 indicates *no* borrow, while a value of 0 indicated borrow). This does not match the semantics of the boolean "overflow" flag of the USUBO/USUBO_CARRY ISD nodes. Fix this by generating code to explicitly invert the flag. These cancel out of the result of USUBO feeds into an USUBO_CARRY. To avoid unnecessary zero-extend operations, also improve the DAGCombine handling of ZERO_EXTEND to optimize (zext (xor (trunc))) sequences where appropriate. Fixes: https://github.com/llvm/llvm-project/issues/83268
-
Akash Banerjee authored
This patch enables the BodyCodeGen callback to still trigger for the TargetData nested region during the device pass. There maybe Target code nested within the TargetData region for which this is required. Also add tests for the same.
-
Benjamin Kramer authored
-
Shourya Goel authored
Fixes: #84753
-
Benjamin Kramer authored
It also wants us to return the value in XMM0.
-
Simon Pilgrim authored
-
Simon Pilgrim authored
-
LLVM GN Syncbot authored
-
Max Winkler authored
Fixes https://github.com/llvm/llvm-project/issues/53520. #### Description #### Provide `intrin0.h` to be the minimal set of intrinsics that the MSVC STL requires. The `intrin0.h` header matches the latest header provided by MSVC 1939 which does include some extra intrinsics that the MSVC STL does not use. Inside `BuiltinHeaders.def` I kept the header description as `intrin.h`. If you want me to change those to `intrin0.h` for the moved intrinsics let me know. This should now allow `immintrin.h` to be used with function targets for runtime cpu detection of simd instruction sets without worrying about the compile-time overhead from MSVC STL including `intrin.h` on clang. I still need to figure out how to best update MSVC STL to detect for the presence of `intrin0.h` from clang and to use this header over `intrin.h`. #### Testing #### Built clang locally and ran the test suite. I still need to do a pass over the existing unit tests for the ms intrinsics to make sure there aren't any gaps. Wanted to get this PR up for discussion first. Modified latest MSVC STL from github to point to `intrin0.h` for clang. Wrote some test files that included MSVC STL headers that rely on intrinsics such as `atomic`, `bit` and `vector`. Built the unit tests against x86, arm, aarch64, and x64. #### Benchmarks #### The following include times are based on the x64 target with the modified headers in this PR. These timings were done by using `clang-cl.exe -ftime-trace` and taking the wall time for parsing `intrin.h` and `intrin0.h`. `intrin.h` takes ~897ms to parse. `intrin0.h` takes ~1ms to parse. If there is anything required or a different approach is preferred let me know. I would very much like to move this over the finish line so we can use function targets with clang-cl.
-
Pravin Jagtap authored
Added common check for DPP and Iterative strategies for uniform value case since optimization applied is same. Authored-by:Pravin Jagtap <Pravin.Jagtap@amd.com>
-
Benjamin Kramer authored
This lets users use TensorDialect without depending on all dialects transitively. 513cdb82 forces that otherwise.
-
Orlando Cazalet-Hyams authored
--load-bitcode-into-experimental-debuginfo-iterators false: Convert to the old debug mode after reading. true: Upgrade to the new debug info format (*). unset: Same as false (for now). (*) As of this patch it actually just means "don't convert to either mode after loading". Auto-upgrading will be implemented in an upcoming patch. With this flag we can incrementally add support for RemoveDIs by overriding the "unset" behaviour in individual tools. The flag can be removed once all tools support the new debug info mode. -
Wang Pengcheng authored
We add a common class `SingleFusion` that accepts a single instruction pair to simplify fusion definitions. Pull Request: https://github.com/llvm/llvm-project/pull/85750
-
martinboehme authored
`llvm::MaybeAlign` does this, for example. It's not an option to simply ignore these derived classes because they get cast back to the optional classes (for example, simply when calling the optional member functions), and our transfer functions will then run on those optional classes and therefore require them to be properly initialized.
-
Sergio Afonso authored
This patch moves some code in PFT to MLIR OpenMP lowering to the `ClauseProcessor` class. This is so that some behavior that is related to certain clauses stays within the `ClauseProcessor` and it's not the caller the one responsible for always doing this when the clause is present.
-
wanglei authored
Simultaneously improved diagnostic testing for the `PseudoLI_W` instruction.
-
Michael Buch authored
This caused following warnings in an LLDB build: ``` [237/1072] Building CXX object tools/l...lusLanguage.dir/LibCxxSliceArray.cpp.o /Volumes/Data/llvm-project/lldb/source/Plugins/Language/CPlusPlus/LibCxxSliceArray.cpp:38:53: warning: format specifies type 'unsigned long long' but the argument has type 'size_t' (aka 'unsigned long') [-Wformat] 38 | stream.Printf("stride=%" PRIu64 " size=%" PRIu64, stride, size); | ~~~~~~~~~ ^~~~~~ /Volumes/Data/llvm-project/lldb/source/Plugins/Language/CPlusPlus/LibCxxSliceArray.cpp:38:61: warning: format specifies type 'unsigned long long' but the argument has type 'size_t' (aka 'unsigned long') [-Wformat] 38 | stream.Printf("stride=%" PRIu64 " size=%" PRIu64, stride, size); | ~~~~~~~~~ ^~~~ 2 warnings generated. ``` This patch simply changes the format specifiers to use the `%zu` for `size_t`s. -
Nikita Popov authored
This code was assuming that the LHS would always be one of GlobalVariable, BlockAddress or ConstantExpr. However, it can also be a special constant like dso_local_equivalent or no_cfi. Make sure this is handled gracefully.
-
serge-sans-paille authored
Followup to #85188
-
Kai Sasaki authored
-
Pierre van Houtryve authored
Update PromoteAllocaToVector so it considers the whole function before promoting allocas. Allocas are scored & sorted so the highest value ones are seen first. The budget is now per function instead of per alloca. Passed internal performance testing.
-
Janek van Oirschot authored
Corrects the `AMDHSA_BITS_SET` macro.
-
Sergio Afonso authored
In this patch some uses of `llvm::SmallVector` in Flang's lowering to MLIR are replaced by other types (i.e. `llvm::ArrayRef` and `llvm::SmallVectorImpl`) which are intended for these uses. This generally prevents relying on always passing small vectors with a particular number of elements in the stack.
-
jeanPerier authored
Polymorphic entity lowering status is good. The main remaining TODO is to allow lowering of vector subscripted polymorphic entity, but this does not deserve blocking all application using polymorphism. Remove experimental option and enable lowering of polymorphic entity by default.
-
Ulrich Weigand authored
This reverts commit d9c31ee9.
-
Benjamin Kramer authored
-
Sergio Afonso authored
This patch adds a couple of new directive sets for composite constructs, completes some of the existing ones with missing values, refactors all* sets to always build on the corresponding top* set and reorders sets and directives alphabetically. No functional change intended.
-
jeanPerier authored
The current lowering did not handle sequence associated argument passed by descriptor. This case is special because sequence association implies that the actual and dummy argument need to to agree in rank and shape. Usually, arguments that can be sequence associated are passed by raw address, and the shape mistmatch is transparent. But there are three cases of explicit and assumed-size arrays passed by descriptors: - polymorphic arguments - BIND(C) assumed-length arguments (F'2023 18.3.7 (5)). - length parametrized derived types (TBD) The callee side is expecting a descriptor containing the dummy rank and shape. This was not the case. This patch fix that by evaluating the dummy shape on the caller side using the interface (that has to be available when arguments are passed by descriptors).
-
Ulrich Weigand authored
We use the VSCBIQ/VSBIQ/VSBCBIQ family of instructions to implement USUBO/USUBO_CARRY for the i128 data type. However, these instructions use an inverted sense of the borrow indication flag (a value of 1 indicates *no* borrow, while a value of 0 indicated borrow). This does not match the semantics of the boolean "overflow" flag of the USUBO/USUBO_CARRY ISD nodes. Fix this by generating code to explicitly invert the flag. These cancel out of the result of USUBO feeds into an USUBO_CARRY. To avoid unnecessary zero-extend operations, also improve the DAGCombine handling of ZERO_EXTEND to optimize (zext (xor (trunc))) sequences where appropriate. Fixes: https://github.com/llvm/llvm-project/issues/83268
-
serge-sans-paille authored
Followup to #85188.
-
Hirofumi Nakamura authored
Intend to fix the `Test documentation build `, degraded here https://github.com/llvm/llvm-project/pull/83149 .
-
Jonathan Thackray authored
[AArch64] Add support for Cortex-A520AE and Cortex-A720AE CPUs Cortex-A520AE and Cortex-A720AE are Armv9.2 AArch64 CPUs. Technical Reference Manual for Cortex-A520AE: https://developer.arm.com/documentation/107726/latest/ Technical Reference Manual for Cortex-A720AE: https://developer.arm.com/documentation/102828/latest/
-
Felix Schneider authored
Currently, `simplifyMul()` asserts that either `lhs` or `rhs` is symbolic or constant. This method is called by the overloaded `*` operator for `AffineExpr`s which leads to a crash when building a multiplication expression where neither operand is symbolic or constant. This patch returns a `nullptr` from `simplifyMul()` to signal that the expression could not be simplified instead. Fix https://github.com/llvm/llvm-project/issues/75770
-
Pierre van Houtryve authored
This is no longer needed with opaque pointers.
-
Benjamin Kramer authored
This doesn't change functionality, but lets us avoid attaching all the interfaces after 513cdb82 turned casting without loading into an error.
-
nicebert authored
Fixes ompx_dump_mapping_tables test by only using one device after breaking built bots
-