- Jul 22, 2022
-
-
Shubham Narlawar authored
GEP's across basic blocks were not getting splitted due to EnableGEPOpt which was turned off by default. Hence, EarlyCSE missed the opportunity to eliminate common part of GEP's. This can be achieved by simply turning GEP pass on. - This patch moves SeparateConstOffsetFromGEPPass() just before LSR. - It enables EnableGEPOpt by default. Resolves - https://github.com/llvm/llvm-project/issues/50528 Added an unit test. Differential Revision: https://reviews.llvm.org/D128582
-
Jacques Pienaar authored
Scope ops file to ops. Used canonicalization as grouping for canonicalization patterns and folders (also considered OpTransforms but that felt too generic and the former two are used together). Reviewed By: silvas, rsuderman Differential Revision: https://reviews.llvm.org/D130297
-
Sam Estep authored
This patch moves `Analysis/FlowSensitive/NoopAnalysis.h` from `clang/unittests/` to `clang/include/clang/`, so that we can use it for doing context-sensitive analysis. Reviewed By: ymandel, gribozavr2, sgatev Differential Revision: https://reviews.llvm.org/D130304
-
Nikita Popov authored
Move this out of the switch, so that different branches can indicate an error by breaking out of the switch. This becomes important if there are more than the two current error cases.
-
Tue Ly authored
Implement sinf function that is correctly rounded to all rounding modes. - We use a simple range reduction for `pi/16 < |x|` : Let `k = round(x / pi)` and `y = (x/pi) - k`. So `k` is an integer and `-0.5 <= y <= 0.5`. Then ``` sin(x) = sin(y*pi + k*pi) = (-1)^(k & 1) * sin(y*pi) ~ (-1)^(k & 1) * y * P(y^2) ``` where `y*P(y^2)` is a degree-15 minimax polynomial generated by Sollya with: ``` > P = fpminimax(sin(x*pi)/x, [|0, 2, 4, 6, 8, 10, 12, 14|], [|D...|], [0, 0.5]); ``` - Performance benchmark using perf tool from CORE-MATH project (https://gitlab.inria.fr/core-math/core-math/-/tree/master) on Ryzen 1700: Before this patch (not correctly rounded): ``` $ CORE_MATH_PERF_MODE="rdtsc" ./perf.sh sinf CORE-MATH reciprocal throughput : 17.892 System LIBC reciprocal throughput : 25.559 LIBC reciprocal throughput : 29.381 ``` After this patch (correctly rounded): ``` $ CORE_MATH_PERF_MODE="... -
zhijian authored
Summary: 1. Added a new option object mode -X for llvm-ar. In AIX OS , there is a object mode option -X for ar command. please see the "-X mode" part of https://www.ibm.com/docs/ko/aix/7.1?topic=ar-command Specifies the type of object file ar should examine. The mode must be one of the following: 32 Processes only 32-bit object files 64 Processes only 64-bit object files 32_64 Processes both 32-bit and 64-bit object files any Processes all of the supported object files. The default is to process 32-bit object files (ignore 64-bit objects). The mode can also be set with the OBJECT_MODE environment variable. For example, OBJECT_MODE=64 causes ar to process any 64-bit objects and ignore 32-bit objects. The -X flag overrides the OBJECT_MODE variable. 2. Before adding the new option -X, the default behaviors of llvm-ar like -Xany, but after the adding the new option -X, the default behaviors of llvm-ar change to -X32 ,in order to let some test cases which has 32bit and 64bit object file in the same llvm-ar command, we need to add the "export OBJECT_MODE=any" into test case to change the default behaviors of llvm-ar's object mode. Reviewers: James Henderson, Owen Reynolds, Fangrui Song Differential Revision: https://reviews.llvm.org/D127864
-
Joseph Huber authored
Previously we made `libomptarget` link as an LLVM library so we have access to the LLVM core libraries. After the initial patch stuck we can now apply the same changes to the plugins. This will allow us to use LLVM in all of `libomptarget` when we have uses for them. In the future this should allow us to remove the dependencies on `libelf`, `libffi`, and `dl`. Reviewed By: JonChesterfield Differential Revision: https://reviews.llvm.org/D130262
-
Egor Zhdan authored
This is the same change as https://reviews.llvm.org/D126289, but applied for OpenBSD & FreeBSD. Differential Revision: https://reviews.llvm.org/D129654
-
Tue Ly authored
Add float type and flag for nearest integer to automatically test with and without SSE4.2 flag. Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D129916
-
Kiran Chandramohan authored
Add a constraint to ensure that the operand and result of the threadprivate operation are the same. Reviewed By: peixin Differential Revision: https://reviews.llvm.org/D128609
-
Kiran Chandramohan authored
The Conversion pattern enables conversion of Critical Op with block arguments. Fixes https://github.com/llvm/llvm-project/issues/56629 Reviewed By: shraiysh Differential Revision: https://reviews.llvm.org/D130343
-
Nikita Popov authored
Opaque pointers support is complete and default. Specify ptr as the normal pointer type and i8* as something supported under non-default options. A larger update of examples in LangRef is still needed.
-
Kadir Cetinkaya authored
This could crash when our heuristic picks the wrong function. Make sure there is enough parameters in the candidate to prevent those crashes. Also special case copy/move constructors to make the heuristic work in presence of those. Fixes https://github.com/llvm/llvm-project/issues/56620 Differential Revision: https://reviews.llvm.org/D130260
-
Louis Dionne authored
When -fexperimental-library is passed, libc++ will now pick up the appropriate __has_feature flag defined by Clang to enable the experimental library features. As a fly-by, also update the documentation for the various TSes. Differential Revision: https://reviews.llvm.org/D130176
-
Louis Dionne authored
In D125283, we ensured that integer distributions would not compile when used with arbitrary unsupported types. This effectively enforced what the Standard mentions here: http://eel.is/c++draft/rand#req.genl-1.5. However, this also had the effect of breaking some users that were using integer distributions with unsupported types like int8_t. Since we already support using __int128_t in those distributions, it is reasonable to also support smaller types like int8_t and its unsigned variant. This commit implements that, adds tests and documents the extension. Note that we voluntarily don't add support for instantiating these distributions with bool and char, since those are not integer types. However, it is trivial to replace uses of these random distributions on char using int8_t. It is also interesting to note that in the process of adding tests for smaller types, I discovered that our distributions sometimes don't provide as faithful a distribution when instantiated with smaller types, so I had to relax a couple of tests. In particular, we do a really bad job at implementing the negative binomial, geometric and poisson distributions for small types. I think this all boils down to the algorithm we use in std::poisson_distribution, however I am running out of time to investigate that and changing the algorithm would be an ABI break (which might be reasonable). As part of this patch, I also added a mitigation for a very likely integer overflow bug we were hitting in our tests in negative_binomial_distribution. I also filed http://llvm.org/PR56656 to track fixing the problematic distributions with int8_t and uint8_t. Supersedes D125283. Differential Revision: https://reviews.llvm.org/D126823
-
Joseph Huber authored
This patch adds the use of the `-internalize-public-api-file` option in the internalization pass to internalize any definition that isn't explicitly needed for the interface. This will allow us to perform more optimizations on the file that normally would not have been possible with functions internal to the library not being internal. Depends on D130293 Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D130298
-
Joseph Huber authored
The internalize pass supports an option to provide a list of symbols that should not be internalized. THis is useful retaining certain defintions that should be kept alive. However, this interface is somewhat difficult to use as it requires knowing every single symbol's name and specifying it. Many APIs provide common prefixes for the symbols exported by the library, so it would make sense to be able to match these using a simple glob pattern. This patch changes the handling from a simple string comparison to a glob pattern match. Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D130319
-
Joseph Huber authored
Currently the bitcode library is build using the clang front-end manually. This was originally done because we did not support device only compilation. Now we support device only compilation, at least for a single offloading toolchain, so we can instead use clang directly rather than using the front-end. This saves us needing to define things like `aux_triple`. Reviewed By: tianshilei1992 Differential Revision: https://reviews.llvm.org/D130293
-
Nikita Popov authored
-
Ron Lieberman authored
This reverts commit 3e8d4692.
-
Matthias Springer authored
Differential Revision: https://reviews.llvm.org/D130346
-
Matthias Springer authored
This is useful for building small test cases and will be utilized in a subsequent commit that adds a fusion example. Differential Revision: https://reviews.llvm.org/D130344
-
Matthias Springer authored
This op fuses a given payload op into a given container op. Inside the container, all uses of the producer are replaced (fused) with the newly inserted op. If the producer is tileable and accessed via a tensor.extract_slice, the new op computes only the requested slice ("tile and fuse"). Otherwise, the entire tensor value is computed inside the container ("clone and fuse"). Differential Revision: https://reviews.llvm.org/D130244 -
Zhouyi Zhou authored
Reviewed By: njames93 Differential Revision: https://reviews.llvm.org/D129953
-
Jay Foad authored
-
Ivan Butygin authored
Convert arith.cmpi to the canonical form with constants on the right side to simplify further optimizations and open more opportunities for CSE. Differential Revision: https://reviews.llvm.org/D129929
-
Petar Avramovic authored
Fix src modifiers for operands with bf16 type. op_sel[0:1] are ignored. Differential Revision: https://reviews.llvm.org/D129084
-
Ivan Butygin authored
CastOp can be in conditionally reachable region, in which case this folding will be invalid. Only conservatively fold ops in same block for now. Fixes https://github.com/llvm/llvm-project/issues/56557 Differential Revision: https://reviews.llvm.org/D130314
-
David Spickett authored
Previously you got: AssertionError: False is not True : Emulation test succeeded. Which is a bit of a head scratcher. The message is used when the test fails, not when it succeeds.
-
Nathan James authored
Disable the tests and remove private include introduced in d89f9e96.
-
Hui Xie authored
implement `std::ranges::includes` and delegate to `std::includes` Differential Revision: https://reviews.llvm.org/D130116
-
Hui Xie authored
implement `std::ranges::equal_range` which delegates to `std::equal_range` Differential Revision: https://reviews.llvm.org/D129796
-
Andy Yankovsky authored
DW_OP_skip/DW_OP_bra can move offset to the end of the data, which means that this was the last instruction to execute and the interpreter should terminate. Reviewed By: labath Differential Revision: https://reviews.llvm.org/D130285
-
Benjamin Kramer authored
-
Chuanqi Xu authored
Previously we don't catch the reachability for partial specialization. Handle them in this patch.
-
Sebastian Neubauer authored
Copying the folder keeps the original permissions by default. This creates problems when the source folder is read-only, e.g. in a packaging environment. Then, the copied folder in the build directory is read-only as well. Later on, with configure_file, ClangConfig.cmake is copied into that directory (in the build tree), failing when the directory is read-only. Fix that problem by copying the folder without keeping the original permissions. Differential Revision: https://reviews.llvm.org/D130254
-
Sam McCall authored
These can be used to quantify parsing improvements from a change. Differential Revision: https://reviews.llvm.org/D130199
-
Benjamin Kramer authored
MarkupFilter keeps a reference to the last filtered StringRef. Just keep it alive a bit longer. Found by asan.
-
Fangrui Song authored
And avoid redundant identify_magic test.
-
Kazu Hirata authored
-