- Oct 14, 2021
-
-
Jan Svoboda authored
This is a prep patch for D111560.
-
xndcn authored
Differential Revision: https://reviews.llvm.org/D111510
-
- Oct 13, 2021
-
-
Valentin Clement authored
AffinePromotion and AffineDemotion passes where upstreamed in their current status from fir-dev. In order to make sure everybody is on the same page, this patch add some comments to state that. Reviewed By: schweitz Differential Revision: https://reviews.llvm.org/D111629
-
Alex Zinenko authored
-
Raphael Isemann authored
-
Alex Zinenko authored
The type can be inferred trivially, but it is currently done as string stitching between ODS and C++ and is not easily exposed to Python. Reviewed By: nicolasvasilache Differential Revision: https://reviews.llvm.org/D111712
-
thomasraoux authored
Make canonicalization working on broadcast also work on splat op. Differential Revision: https://reviews.llvm.org/D111690
-
Jeremy Morse authored
In D110173 we start using the existing LLVM IDF calculator to place PHIs as we reconstruct an SSA form of machine-code program. Sadly that's slower than the old (but broken) way, this patch attempts to recover some of that performance. The key observation: every time we def a register, we also have to def it's register units. If we def'd $rax, in the current implementation we independently calculate PHI locations for {al, ah, ax, eax, hax, rax}, and they will all have the same PHI positions. Instead of doing that, we can calculate the PHI positions for {al, ah} and place PHIs for any aliasing registers in the same positions. Any def of a super-register has to def the unit, and vice versa, so this is sound. It cuts down the SSA placement we need to do significantly. This doesn't work for stack slots, or registers we only ever read, so place PHIs normally for those. LiveDebugValues choses to ignore writes to SP at calls, and now have to ignore writes to SP register units too. Differential Revision: https://reviews.llvm.org/D111627 -
LLVM GN Syncbot authored
-
Michael Kruse authored
Instead of setting operands to undef as the "operands" pass does, convert the operands to a function argument. This avoids having to introduce undef values into the IR which have some unpredictability during optimizations. For instance, define void @func() { entry: %val = add i32 32, 21 store i32 %val, i32* null ret void } is reduced to define void @func(i32 %val) { entry: %val1 = add i32 32, 21 store i32 %val, i32* null ret void } (note that the instruction %val is renamed to %val1 when printing the IR to avoid ambiguity; ideally %val1 would be removed by dce or the instruction reduction pass) Any call to @func is replaced with a call to the function with the new signature and filled with undef. This is not ideal for IPA passes, but those out-of-scope for now. Reviewed By: aeubanks Differential Revision: https://reviews.llvm.org/D111503 -
Sanjay Patel authored
-
Kamau Bridgeman authored
The builtin __rlwnm is currently constrained to accept only constants for the shift parameter but the instructions emitted for it have no such constraint, this patch allows the builtins to accept variable shift. Reviewed By: NeHuang, amyk Differential Revision: https://reviews.llvm.org/D111229
-
Sanjay Patel authored
This is NFC-intended for scalar code. There are still unnecessary m_ConstantInt restrictions in surrounding code, so this is not a complete fix. This prevents regressions seen with a planned follow-on to D111410.
-
Sanjay Patel authored
There's a substantial pile of scalar tests for transforms that depend on this code, but zero vector coverage. This patch adds a vector test next to the first scalar test in each file that is affected by foldLogOpOfMaskedICmps. The code that handles these transforms is artificially limited from working with vector splat constants.
-
Raphael Isemann authored
-
Alex Zinenko authored
-
Alex Zinenko authored
When writing the user-facing documentation, I noticed several inconsistencies and asymmetries in the Python API we provide. Fix them by adding: - the `owner` property to regions, similarly to blocks; - the `isinstance` method to any class derived from `PyConcreteAttr`, `PyConcreteValue` and `PyConreteAffineExpr`, similar to `PyConcreteType` to enable `isa`-like calls without having to handle exceptions; - a mechanism to create the first block in the region as we could only create blocks relative to other blocks, with is impossible in an empty region. Reviewed By: gysit Differential Revision: https://reviews.llvm.org/D111556
-
Jeremy Morse authored
Old versions of gcc want template specialisations to happen within the namespace where the template lives; this is still present in gcc 5.1, which we officially support, so it has to be worked around.
-
Louis Dionne authored
I came across an issue where since we build the library for Apple with the install name directory being /usr/lib, which means that if we don't run the tests with DYLD_LIBRARY_PATH, we'll end up loading the system-provided libc++abi when running the tests. That wreaks havoc. Instead of fixing it in the legacy config file, this commit introduces an Apple libc++abi config file that does the right thing. Differential Revision: https://reviews.llvm.org/D111279
-
Louis Dionne authored
Instead of always defining LIBCXXABI_NO_TIMER to run the tests, only define LIBCXXABI_USE_TIMER when we want to enable the timer. This makes the libc++abi testing configuration simpler. As a fly-by fix, remove the unused LIBUNWIND_NO_TIMER macro from libunwind. Differential Revision: https://reviews.llvm.org/D111667
-
Jeremy Morse authored
InstrRefBasedLDV used to try and determine which values are in which registers using a lattice approach; however this is hard to understand, and broken in various ways. This patch replaces that approach with a standard SSA approach using existing LLVM utilities. PHIs are placed at dominance frontiers; value propagation then eliminates un-necessary PHIs. This patch also adds a bunch of unit tests that should cover many of the weirder forms of control flow. Differential Revision: https://reviews.llvm.org/D110173
-
Hsiangkai Wang authored
Previous patch only reverts C builtins for tail policy. In order to keep LLVM IR intact, add the `ta` argument in vector builtins.
-
Hsiangkai Wang authored
This reverts commit 7afa61e7.
-
Nathan Sidwell authored
Spotted when implementing an extension.
-
Adam Czachorowski authored
Previously we would call getAsTemplate() when kind == TemplateExpansion, which triggers an assertion. The call is now replaced with getAsTemplateOrTemplatePattern(), which is exactly the same as getAsTemplate(), except it allows calls when kind == TemplateExpansion. No change in behavior for no-assert builds. Differential Revision: https://reviews.llvm.org/D111648
-
Raphael Isemann authored
Just moving that block inside DWARFASTParserClang::ParseChildMembers into its own function. Also early-exiting instead of a large if when num_attributes is 0.
-
Nathan Sidwell authored
The p0388 patch series took so long, the clang version was incorrect, and I failed to realize that.
-
Kerry McLaughlin authored
This patch adds patterns to match the following with INC/DEC: - @llvm.aarch64.sve.cnt[b|h|w|d] intrinsics + ADD/SUB - vscale + ADD/SUB For some implementations of SVE, INC/DEC VL is not as cheap as ADD/SUB and so this behaviour is guarded by the "use-scalar-inc-vl" feature flag, which for SVE is off by default. There are no known issues with SVE2, so this feature is enabled by default when targeting SVE2. Reviewed By: david-arm Differential Revision: https://reviews.llvm.org/D111441
-
Dávid Bolvanský authored
-
Dávid Bolvanský authored
-
Simon Pilgrim authored
-
Simon Pilgrim authored
[X86][SSE] Add tests showing missing shuffle(avg(shuffle(),shuffle())) -> avg(shuffle(),shuffle()) fold X86ISD::AVG needs to be added to isCommutativeBinOp to use these folds.
-
Jan Svoboda authored
At this point, `F.ImportLoc` has not been initialized by the `ASTReader` yet and using it leads to an assertion failure. Introduced in 638c673a and 44451351.
-
Mehdi Amini authored
Skip the check on "hasOperandStorage" since the array will be indexed anyway. Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D111696
-
Zi Xuan Wu authored
-
Balazs Benics authored
If the `assume-controlled-environment` is `true`, we should expect `getenv()` to succeed, and the result should not be considered tainted. By default, the option will be `false`. Reviewed By: NoQ, martong Differential Revision: https://reviews.llvm.org/D111296
-
Balazs Benics authored
The `getenv()` function might return `NULL` just like any other function. However, in case of `getenv()` a state-split seems justified since the programmer should expect the failure of this function. `secure_getenv(const char *name)` behaves the same way but is not handled right now. Note that `std::getenv()` is also not handled. Reviewed By: martong Differential Revision: https://reviews.llvm.org/D111245
-
Diana Picus authored
Search for the environment variable in the envp string passed to ProgramStart. This doesn't work if the main program isn't Fortran. Differential Revision: https://reviews.llvm.org/D111394
-
Valentin Clement authored
-
Jacques Pienaar authored
This exposes creating a CallSiteLoc with a callee & list of frames for callers. Follows the creation approach in C++ side where a list of frames may be provided. Reviewed By: ftynse Differential Revision: https://reviews.llvm.org/D111670
-