- Oct 04, 2022
-
-
Sanjay Patel authored
-
Sanjay Patel authored
This is a modification of the earlier attempt from: 7b7940f9 For fma callers, we only want to swap a 0.0 or 1.0 constant.
-
Pierre van Houtryve authored
Make it illegal, remove InstructionSelector logic for it Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D134967
-
Jay Foad authored
Fix a crash in the FMA combine added by D132837 and amended by D134810. In cases where the newly created node could be folded, the combiner would fail this assertion: llc: DAGCombiner.cpp:268: void (anonymous namespace)::DAGCombiner::AddToWorklist(llvm::SDNode *): Assertion `N->getOpcode() != ISD::DELETED_NODE && "Deleted Node added to Worklist"' failed. Differential Revision: https://reviews.llvm.org/D135150
-
Amara Emerson authored
-
Dominik Adamski authored
If 'order(concurrent)' clause is specified, then the iterations of SIMD loop can be executed concurrently. This patch adds support for LLVM IR codegen via OMPIRBuilder for SIMD loop with 'order(concurrent)' clause. The functionality added to OMPIRBuilder is similar to the functionality implemented in 'CodeGenFunction::EmitOMPSimdInit'. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D134046 Signed-off-by:
Dominik Adamski <dominik.adamski@amd.com>
-
Florian Hahn authored
-
Pierrick Bouvier authored
- Detect VS devcmd error (missing VS) - Detect missing python install - Show commands executed - Removed pause (blocking CI usage) Differential revision: https://reviews.llvm.org/D135138
-
Nikita Popov authored
Reapply with a fix for the case where an operand simplified back to the original phi: We need to map this case to the new phi node. ----- foldOpIntoPhi() currently only folds operations into the phi if all but one operands constant-fold. The two exceptions to this are freeze and select, where we allow more general simplification. This patch makes foldOpIntoPhi() generally simplification based and removes all the instruction-specific logic. We just try to simplify the instruction for each operand, and for the (potentially) one non-simplified operand, we move it into the new block with adjusted operands. This fixes https://github.com/llvm/llvm-project/issues/57448, which was my original motivation for the change.
-
Alex Richardson authored
This currently does not make much of a difference (only one tests is affected), but it is helpful e.g. for the out-of-tree CHERI target where Builder.CreateMemCpy() can add attributes other than parameter alignment. Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D135075
-
Nikita Popov authored
Degenerate case for D134954.
-
Louis Dionne authored
This is a breaking change. If you were passing one of those three runtimes in LLVM_ENABLE_PROJECTS, you need to start passing them in LLVM_ENABLE_RUNTIMES instead. The runtimes in LLVM_ENABLE_RUNTIMES will start being built using the "bootstrapping build" instead, which means that they will be built using the just-built Clang. This is usually what you wanted anyway. If you were using LLVM_ENABLE_PROJECTS=all with the explicit goal of building these three runtimes, you can now use LLVM_ENABLE_RUNTIMES=all and these runtimes will be built using the bootstrapping build. NOTE: This is a re-application of 887b8bd7 which had been reverted in 6b03a4fe because it broke the Sphinx documentation publishers. The Sphinx documentation publishers have now been moved to using the runtimes build, so this should not be an issue anymore. Differential Revision: https://reviews.llvm.org/D132480
-
Denys Shabalin authored
Reviewed By: ftynse Differential Revision: https://reviews.llvm.org/D135139
-
Uday Bondhugula authored
Simplify affine expressions and maps while exploiting simple range and step info of any IVs that are operands. This simplification is local, O(1) and practically useful in several scenarios. Accesses with floordiv's and mod's where the LHS is non-negative and bounded or is a known multiple of a constant can often be simplified. This is implemented as a canonicalization for all affine ops in a generic way: all affine.load/store, vector_load/store, affine.apply, affine.min/max, etc. ops. Eg: For tiled loop nests accessing buffers this way: affine.for %i = 0 to 1024 step 32 { affine.for %ii = 0 to 32 { affine.load [(%i + %ii) floordiv 32, (%i + %ii) mod 32] } } // Note that %i is a multiple of 32 and %ii < 32, hence: (%i + %ii) floordiv 32 is the same as %i floordiv 32 (%i + %ii) mod 32 is the same as %ii mod 32. The simplification leads to simpler index/subscript arithmetic for multi-dimensional arrays and also in turn enables detection of spatial locality (for vectorization for eg.), temporal locality or loop invariance for hoisting or scalar replacement. Differential Revision: https://reviews.llvm.org/D135085 -
Thomas Symalla authored
-
Adrian Kuegel authored
loop variable is copied but only used as const reference.
-
Alex Zinenko authored
Relax the restriction in the transform dialect interpreter utilities that expected a payload IR op to be assocaited with at most one transform IR handle value. This was useful during the initial bootstrapping to avoid use-after-free error equivalents when a payload IR op could be erased through one of the handles associated with it and then accessed through another. It was, however, possible to erase an ancestor of the payload IR operation in question. The expensive-checks mode of interpretation is able to detect both cases and has proven sufficiently robust in debugging use-after-free errors. Reviewed By: springerm Differential Revision: https://reviews.llvm.org/D134964
-
Guray Ozen authored
This revision adds GPU transform dialect. It also introduce a prefix such as "transform.gpu" for all ops related to this dialect. MLIR already had two GPU transform op in linalg. This revision moves these ops into GPUTransformOps. The Ops are as follows: `transform.structured.map_nested_foreach_thread_to_gpu_blocks` -> `transform.gpu.map_foreach_to_blocks` This op selects the outermost (toplevel) foreach_thread and parallelize across GPU blocks. It can also generate `gpu_launch`. `transform.structured.map_nested_foreach_thread_to_gpu_threads` -> `transform.gpu.map_nested_foreach_to_threads` This op parallelizes nested foreach_thread that are inside `gpu_launch` across GPU threads. It doesn't add new functionality, but there are some minor refactoring of the code. Reviewed By: ftynse Differential Revision: https://reviews.llvm.org/D134800
-
Bjorn Pettersson authored
The helpers in BuildLibCalls normally expect that the Value arguments already have the correct type (matching the lib call signature). And exception has been emitFPutC which casted the Char argument to 'int' using CreateIntCast. This patch moves the cast to the caller instead of doing it inside emitFPutC. I think it makes sense to make the BuildLibCall API:s a bit more consistent this way, despite the need to handle the int cast in two different places now. Differential Revision: https://reviews.llvm.org/D135066
-
Bjorn Pettersson authored
Stop assuming that an 'int' is 32 bits in helpers that emit libcalls to lib functions that had 'int' in the signature. For most targets this is NFC. For a target with 16 bit 'int' type this could help out detecting if trying to emit a libcall with incorrect signature. Similarly we now derive the type mapping to 'size_t' by asking TLI about the size of 'size_t'. This should be NFC (at least for in-tree targets) since getSizeTSize(), in TLI, is deriving the size in the same way as DataLayout::getIntPtrType(). Differential Revision: https://reviews.llvm.org/D135065
-
Bjorn Pettersson authored
Lots of BuildLibCalls helpers are using Builder::getInt32Ty to get a type matching an 'int', and DataLayout::getIntPtrType to get a type matching 'size_t'. The former is not true for all targets, since and 'int' isn't always 32 bits. And the latter is a bit weird as well as the definition of DataLayout::getIntPtrType isn't clearly mapping it to 'size_t'. This patch is not aiming at solving any such problems. It is merely highlighting when a libcall is expecting to use 'int' and 'size_t' by naming the types as IntTy and SizeTTy when preparing the type signatures for the emitted libcalls. Differential Revision: https://reviews.llvm.org/D135064
-
Florian Hahn authored
Use LoopAccessInfoManager directly instead of various GetLAA lambdas. Depends on D134608. Reviewed By: aeubanks Differential Revision: https://reviews.llvm.org/D134609
-
Amara Emerson authored
This reverts commit dcd02a52. We should instead use the generic combine.
-
Nikita Popov authored
Handle constant expressions by falling through to the general operator-based code. In particular, this adds support for bitcast and GEP expressions.
-
Daniel Bertalan authored
This commit adds support for chained fixups, which were introduced in Apple's late 2020 OS releases. This format replaces the dyld opcodes used for supplying rebase and binding information, and encodes most of that data directly in the memory location that will have the fixup applied. This reduces binary size and is a requirement for page-in linking, which will be available starting with macOS 13. A high-level overview of the format and my implementation can be found in SyntheticSections.h. This feature is currently gated behind the `-fixup_chains` flag, and will be enabled by default for supported targets in a later commit. Like in ld64, lazy binding is disabled when chained fixups are in use, and the `-init_offsets` transformation is performed by default. Differential Revision: https://reviews.llvm.org/D132560
-
bipmis authored
-
Florian Hahn authored
SimpleLoopUnswitch may remove loops. Clear block and loop dispositions, to clean up invalid entries in the cache. Fixes #58136.
-
Nikita Popov authored
If nonnull is already set, we currently skip setting both nonnull and dereferenceable. Make these independent, to avoid regressions when additional nonnull attributes are inferred earlier.
-
Nikita Popov authored
This reverts commit b20e34b3. This causes RAUW type mismatch assertions on some buildbots, reverting for now.
-
Nikita Popov authored
The known bits logic should never produce a better result than the direct recursive non-zero query here, so skip the fallthrough.
-
Nikita Popov authored
The change in the assume-queries-counter.ll test is because we skip and unnecessary known bits query for arguments.
-
Matthias Springer authored
tensor.empty/linalg.init_tensor produces an uninititalized tensor that can be used as a destination operand for destination-style ops (ops that implement `DestinationStyleOpInterface`). This change makes it possible to implement `TilingInterface` for non-destination-style ops without depending on the Linalg dialect. RFC: https://discourse.llvm.org/t/rfc-add-tensor-from-shape-operation/65101 Differential Revision: https://reviews.llvm.org/D135129
-
Nikita Popov authored
foldOpIntoPhi() currently only folds operations into the phi if all but one operands constant-fold. The two exceptions to this are freeze and select, where we allow more general simplification. This patch makes foldOpIntoPhi() generally simplification based and removes all the instruction-specific logic. We just try to simplify the instruction for each operand, and for the (potentially) one non-simplified operand, we move it into the new block with adjusted operands. This fixes https://github.com/llvm/llvm-project/issues/57448, which was my original motivation for the change.
-
Valentin Clement authored
This patch updates lowering to produce the correct fir.class types for various polymorphic and unlimited polymoprhic entities cases. This is only the lowering. Some TODOs have been added to the CodeGen part to avoid errors since this part still need to be updated as well. The fir.class<*> representation for unlimited polymorphic entities mentioned in the document has been updated to fir.class<none> to avoid useless work in pretty parse/printer. This patch is part of the implementation of the poltymorphic entities. https://github.com/llvm/llvm-project/blob/main/flang/docs/PolymorphicEntities.md Depends on D134957 Reviewed By: jeanPerier Differential Revision: https://reviews.llvm.org/D134959
-
Florian Hahn authored
Simplify LoopAccessLegacyAnalysis by using LoopAccessInfoManager from D134606. As a side-effect this also removes printing support from LoopAccessLegacyAnalysis. Depends on D134606. Reviewed By: aeubanks Differential Revision: https://reviews.llvm.org/D134608
-
LLVM GN Syncbot authored
-
Balázs Kéri authored
Add a check to detect usages of `realloc` where the result is assigned to the same variable (or field) as passed to the first argument. Reviewed By: steakhal, martong Differential Revision: https://reviews.llvm.org/D133119
-
Nicolas Vasilache authored
Differential Revision: https://reviews.llvm.org/D134968
-
Lang Hames authored
The -slab-page-size option is used to set a simulated page size in -no-exec tests. In order for this to work we need to use read/write permissions only on all simulated pages in order to ensure that no simulated page is made read-only by a permission change to the underlying real page. The aim of this patch is to make it safe to enable ExecutionEngine regression tests on arm64. Those tests will be enabled in a follow-up patch.
-
Lang Hames authored
-