- Apr 29, 2022
-
-
Joseph Huber authored
In preparation for allowing other offloading kinds to use the new driver a new opt-in flag `-foffload-new-driver` is added. This is distinct from the existing `-fopenmp-new-driver` because OpenMP will soon use the new driver by default while the others should not. Reviewed By: yaxunl, tra Differential Revision: https://reviews.llvm.org/D123325
-
Joseph Huber authored
In preparation for accepting other offloading kinds with the new driver, this patch makes the way we handle offloading actions more generic. A new field to get the associated device action's toolchain is used rather than manually iterating a list. This makes building the arguments easier and makes sure that we doin't rely on any implicit ordering. Reviewed By: yaxunl Differential Revision: https://reviews.llvm.org/D123313
-
Joseph Huber authored
This patch moves the logic for generating the offloading entries to the OpenMPIRBuilder. This makes it easier to re-use in other places, such as for OpenMP support in Flang or using the same method for generating offloading entires for other languages like Cuda. Reviewed By: tianshilei1992 Differential Revision: https://reviews.llvm.org/D123460
-
Nikita Popov authored
-
Nikita Popov authored
This is an alternative to D124530. In getUniformBase() only create scales that match the gather/scatter element size. If targets also support other scales, then they can produce those scales in target DAG combines. This is what X86 already does (as long as the resulting scale would be 1, 2, 4 or 8). This essentially restores the pre-opaque-pointer state of things. Fixes https://github.com/llvm/llvm-project/issues/55021. Differential Revision: https://reviews.llvm.org/D124605
-
Jean Perier authored
Semantics is not preventing a named common block to appear with different size in a same file (named common block should always have the same storage size (see Fortran 2018 8.10.2.5), but it is a common extension to accept different sizes). Lowering was not coping with this well, since it just use the first common block appearance, starting with BLOCK DATAs to define common blocks (this also was an issue with the blank common block, which can legally appear with different size in different scoping units). Semantics is also not preventing named common from being initialized outside of a BLOCK DATA, and lowering was dealing badly with this, since it only gave an initial value to common blocks Globals if the first common block appearance, starting with BLOCK DATAs had an initial value. Semantics is also allowing blank common to be initialized, while lowering was assuming this would never happen, and was never creating an initial value for it. Lastly, semantics was not complaining if a COMMON block was initialized in several scoping unit in a same file, while lowering can only generate one of these initial value. To fix this, add a structure to keep track of COMMON block properties (biggest size, and initial value if any) at the Program level. Once the size of a common block appearance is know, the common block appearance is checked against this information. It allows semantics to emit an error in case of multiple initialization in different scopes of a same common block, and to warn in case named common blocks appears with different sizes. Lastly, this allows lowering to use the Program level info about common blocks to emit the right GlobalOp for a Common Block, regardless of the COMMON Block appearances order: It emits a GlobalOp with the biggest size, whose lowest bytes are initialized with the initial value if any is given in a scope where the common block appears. Lowering is updated to go emit the common blocks before anything else so that the related GlobalOps are available when lowering the scopes where common block appear. It is also updated to not assume that blank common are never initialized. Differential Revision: https://reviews.llvm.org/D124622
-
Nikita Popov authored
This removes memset with undef char. We already do this for stores of undef value. This comes with the caveat that this optimization is not, strictly speaking, legal for undef values, because we might be overwriting a poison value. However, our entire load/store model currently still operates on undef values, so we need to support undef here as well for internal consistency. Once https://github.com/llvm/llvm-project/issues/52930 is resolved, these and related folds can be limited to poison -- I've added FIXMEs to that effect. Differential Revision: https://reviews.llvm.org/D124173
-
Ricky Zhou authored
The name CountRoundDown is potentially misleading, as the number of iterations can be rounded up when folding the tail. Reviewed By: fhahn Differential Revision: https://reviews.llvm.org/D119681
-
Nikita Popov authored
This is an edge-case where we don't convert to bitwise and/or based on implies poison reasoning, so explicitly try to perform the fold in logical form. The transform itself is poison-safe, as both icmps are based on the same value and any nowrap flags are discarded as part of the fold (https://alive2.llvm.org/ce/z/aCwC8b for the used example).
-
Matthias Springer authored
This commit adds a tiling op to the transform dialect as an external op. Differential Revision: https://reviews.llvm.org/D124661
-
Florian Hahn authored
Improve code as suggested in D123005. Applied separately, because the comments where made a diff that has not been rebased to current main.
-
David Spickett authored
I suspect that one of link or cl is found by shutil.which and one isn't, hence the case difference. It doesn't really matter for what the test is looking for.
-
NAKAMURA Takumi authored
Re. setCurrentDebugTypes(X,N), the only user is llvm-ml.cpp (exc. DebugTests) since llvmorg-15-init-8355-g82ecf9a0. FIXME: X and N are evaluated regardless of NDEBUG. Could we avoid evaluating (but w/o warnings) with NDEBUG?
-
NAKAMURA Takumi authored
It has been enabled since llvmorg-15-init-5683-g2af845a6, aka D122271.
-
Paul Walker authored
refineUniformBase and selectGatherScatterAddrMode both attempt the transformation: base(0) + index(A+splat(B)) => base(B) + index(A) However, this is only safe when index is not implicitly scaled. Differential Revision: https://reviews.llvm.org/D123222
-
David Spickett authored
This reverts commit d9247cc8. With the Windows tests updated to expect .EXE suffixes. This changed because shutil.which uses PATHEXT which will contain, amongst others, "EXE". Also I noticed the "." in ".exe" was the wildcard dot not literal dot so I've escaped those.
-
Nikita Popov authored
The combination of logical or and nsw prevents the fold from happening.
-
Jay Foad authored
-
Simon Pilgrim authored
-
Sam McCall authored
-
David Spickett authored
This reverts commit 71375261. Some test output needs updating for Windows builders: https://lab.llvm.org/buildbot/#/builders/83/builds/18356
-
Nikita Popov authored
Pass the whole instruction rather than unpacking it. This makes it easier to reuse the function in another place, as the entire logic is encapsulated.
-
Simon Pilgrim authored
-
Nikita Popov authored
This fold handles a special subset of foldAndOrOfICmpsUsingRanges(), use the more generic implementation instead. The result can differ if a representation using a range comparison is possible, in which case that is preferred over masking. There is a canonicalization opportunity here.
-
Florian Hahn authored
-
Nikita Popov authored
This is the de Morgan conjugated variant of the existing fold for ors. Implement this by switching the range code to always work on ors and perform invert operands at the start and end. This makes reasoning easier and makes the extension more obviosuly correct.
-
David Spickett authored
In build.py we have our own find_executable that looks a lot like the distutils one that I switched to shutil.which. This find_executable isn't quite the same as shutil.which so I've refactored it to call that in the correct way. Note that the path passed to shutil.which is in the form that PATH would be, meaning separators are allowed. ``` >>> shutil.which("gcc", path="/home/david.spickett:/bin") '/bin/gcc' ``` We just need to make sure it doesn't ignore the existing PATH and normalise the result if it does find the binary. The .exe extension is automatically added to the binary name if we are on Windows. Depends on D124601 Reviewed By: JDevlieghere Differential Revision: https://reviews.llvm.org/D124604 -
Florian Hahn authored
LoopUnswitch has been removed in fb4113ef. Also remove it from various bindings.
-
LLVM GN Syncbot authored
-
Nikita Popov authored
-
Florian Hahn authored
The legacy LoopUnswitch pass is only used in the legacy pass manager pipeline, which is deprecated. The NewPM replacement is SimpleLoopUnswitch and I think it is time to remove the legacy LoopUnswitch code. Fixes #31000. Reviewed By: aeubanks, Meinersbur, asbirlea Differential Revision: https://reviews.llvm.org/D124376
-
Simon Pilgrim authored
-
Simon Pilgrim authored
Matches the fold in DAGCombiner::visitANDLike.
-
Nikita Popov authored
We can express this fold more naturally when working on the constant range implementation. This change is not entirely NFC, because the code now also handles cases that don't match the precise pattern this previously looked for, e.g. we can omit an add on one of the ranges.
-
Nikita Popov authored
-
Sam McCall authored
Include-cleaner is a library that uses the clang AST and preprocessor to determine which headers are used. It will be used in clang-tidy, in clangd, in a standalone tool at least for testing, and in out-of-tree tools. Roughly, it walks the AST, finds referenced decls, maps these to used sourcelocations, then to FileEntrys, then matching these against #includes. However there are many wrinkles: dealing with macros, standard library symbols, umbrella headers, IWYU directives etc. It is not built on the C++20 modules concept of usage, to allow: - use with existing non-modules codebases - a flexible API embeddable in clang-tidy, clangd, and other tools - avoiding a chicken-and-egg problem where include cleanups are needed before modules can be adopted This library is based on existing functionality in clangd that provides an unused-include warning. However it has design changes: - it accommodates diagnosing missing incl...
-
David Spickett authored
distutils is deprecated and shutil.which is the suggested replacement for this function. https://peps.python.org/pep-0632/#migration-advice https://docs.python.org/3/library/shutil.html#shutil.which It was added in Python3.3 but given that we're already using shutil.which elsewhere I think this is ok/no worse than before. We do have our own find_executable in lldb/test/Shell/helper/build.py but I'd rather leave that as is for now. Also we have our own versions of which() but again, a change for another time. This work is part of #54337. Reviewed By: JDevlieghere Differential Revision: https://reviews.llvm.org/D124601
-
David Green authored
I think this sort comparator was overly complex, and the windows expensive check bot agreed, failing as it was not giving a strict weak ordering. Change it to use the comparison of the mask values as unsigned integers. This should sort the undef elements to the end whilst keeping X<Y otherwise.
-
Nikita Popov authored
Replace the condition value with the known constant value on the threaded edge. This happens implicitly with phi threading because we replace with the incoming value, but not for non-phi threading.
-
Daniel Kiss authored
Test depends on pthread_cancel which is not supported on Android.
-