- Jul 21, 2023
-
-
Jay Foad authored
Differential Revision: https://reviews.llvm.org/D155854
-
Shivam Gupta authored
This patch is the first part of https://llvm.org/OpenProjects.html#llvm_patch_coverage. We have first define a new variable LLVM_TEST_COVERAGE which when set, pass --emit-coverage option to llvm-lit which will help in setting a unique value to LLVM_PROFILE_FILE for each RUN. So for example coverage data for test case llvm/test/Analysis/AliasSet/memtransfer.ll will be emitted as build/test/Analysis/AliasSet/memtransfer.profraw Reviewed By: hnrklssn Differential Revision: https://reviews.llvm.org/D154280
-
Ingo Müller authored
Allow the `names` argument in `MatchOp.match_op_names` to be of type `str` in addition to `Sequence[str]`. In this case, the argument is treated as a list with one name, i.e., it is possible to write `MatchOp.match_op_names(..., "test.dummy")` instead of `MatchOp.match_op_names(..., ["test.dummy"])`. Reviewed By: ftynse Differential Revision: https://reviews.llvm.org/D155807
-
Ingo Müller authored
This patch extends the diagnostic output of `FuseIntoContainingOp` when it fails to find the next producer by also provided the location of the affected transform op. Reviewed By: ftynse Differential Revision: https://reviews.llvm.org/D155803
-
Guray Ozen authored
The Op creates a tensor map descriptor object representing tiled memory region. The descriptor is used by Tensor Memory Access (TMA). The `tensor` is the source tensor to be tiled. The `boxDimensions` is the size of the tiled memory region in each dimension. The pattern here lowers `tma.create.descriptor` to a runtime function call that eventually calls calls CUDA Driver's `cuTensorMapEncodeTiled`. For more information see below: https://docs.nvidia.com/cuda/cuda-driver-api/group__CUDA__TENSOR__MEMORY.html Depends on D155453 Reviewed By: nicolasvasilache Differential Revision: https://reviews.llvm.org/D155680
-
Luke Lau authored
These correspond to ROTL/ROTR nodes Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D155439
-
Andrzej Warzynski authored
Similarly to when using `lli`, make sure that when using `mlir-cpu-runner` with an emulator, a full path to `mlir-cpu-runner` is used. Otherwise `mlir-cpu-runner` won't be found and you will get the following error: ``` Error while loading mlir-cpu-runner: No such file or directory ``` This patch should fix: * https://lab.llvm.org/buildbot/#/builders/179 The breakage was originally introduced in https://reviews.llvm.org/D155405. Differential Revision: https://reviews.llvm.org/D155920
-
Alex Zinenko authored
RegionBranchOpInterface did not allow the operation with regions to specify itself as successors. Therefore, this implied that the control is always transferred to a region before being transferred back to the parent op. Since the region can only transfer the control back to the parent op from a terminator, this transitively implied that the first block of any region with a RegionBranchOpInterface is always executed until the terminator can transfer the control flow back. This is trivially false for any conditional-like operation that may or may not execute the region, as well as for loop-like operations that may not execute the body. Remove the restriction from the interface description and update the only transform that relied on it. See https://discourse.llvm.org/t/rfc-region-control-flow-interfaces-should-encode-region-not-executed-correctly/72103. Depends On: https://reviews.llvm.org/D155757 Reviewed By: Mogball, springerm Differential Revision: https://reviews.llvm.org/D155822
-
Alex Zinenko authored
Initial implementations of dense dataflow analyses feature special cases for operations that have region- or call-based control flow by leveraging the corresponding interfaces. This is not necessarily sufficient as these operations may influence the dataflow state by themselves as well we through the control flow. For example, `linalg.generic` and similar operations have region-based control flow and their proper memory effects, so any memory-related analyses such as last-writer require processing `linalg.generic` directly instead of, or in addition to, the region-based flow. Provide hooks to customize the processing of operations with region- cand call-based contol flow in forward and backward dense dataflow analysis. These hooks are trigerred when control flow is transferred between the "main" operation, i.e. the call or the region owner, and another region. Such an apporach allows the analyses to update the lattice before and/or after the regions. In the `linalg.generic` example, the reads from memory are interpreted as happening before the body region and the writes to memory are interpreted as happening after the body region. Using these hooks in generic analysis may require introducing additional interfaces, but for now assume that the specific analysis have spceial cases for the (rare) operaitons with call- and region-based control flow that need additional processing. Reviewed By: Mogball, phisiart Differential Revision: https://reviews.llvm.org/D155757
-
Luke Lau authored
It's no longer needed now that the sext/zext patterns have been merged. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D155815
-
Luke Lau authored
We're currently only matching scalar shift amounts where the type is the same as the vector element type. But because only the bottom log2(2*SEW) bits are used, only 7 bits will be used at most so we can use any scalar type >= i8. This patch adds patterns for the case above, as well as for when the shift amount type is the same as the widened element type and doesn't need extended. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D155698
-
Luke Lau authored
These patterns of ([l,a]shr v, ([s,z]ext splat)) only pick up the cases where the scalar has the same type as the vector element. However since only the low log2(SEW) bits of the scalar are read, we could use any scalar type that has been extended. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D155697
-
Ilya Leoshkevich authored
Currently mentioning any symbols in immediate asm operands is not supported, for example: error: invalid operand for instruction lghi %r4,foo_end-foo The immediate problem is that is*Imm() and print*Operand() functions do not accept MCExprs, but simply relaxing these checks is not enough: after symbol addresses are computed, range checks need to run against resolved values. Add a number of SystemZ::FixupKind members for each kind of immediate value and process them in SystemZMCAsmBackend::applyFixup(). Only perform the range checks, do not change anything. Adjust the tests: move previously failing cases like the one shown above out of insn-bad.s. Reviewed By: uweigand Differential Revision: https://reviews.llvm.org/D154899 -
Alexander Belyaev authored
-
Corentin Jabot authored
A lambda call operator can be a templated entity - and therefore have constraints while not being a function template template<class T> void f() { []() requires false { }(); } In that case, we would check the constraints of the call operator which is non-viable. However, we would find a viable candidate: the conversion operator to function pointer, and use it to perform a surrogate call. These constraints were not checked because: * We never check the constraints of surrogate functions * The lambda conversion operator has non constraints. From the wording, it is not clear what the intent is but it seems reasonable to expect the constraints of the lambda conversion operator to be checked and it is consistent with GCC and MSVC. This patch also improve the diagnostics for constraint failure on surrogate calls. Fixes #63181 Reviewed By: #clang-language-wg, aaron.ballman Differential Revision: https://reviews.llvm.org/D154368 -
Nikita Popov authored
-
Guray Ozen authored
Current transformation expects module op to be two level higher, however, it is not always the case. This work searches module op in a while loop. Reviewed By: nicolasvasilache Differential Revision: https://reviews.llvm.org/D155825
-
Guray Ozen authored
This work adds `nvgpu.tma.async.load` Op that requests tma load asyncronusly using mbarrier object. It also creates nvgpu.tma.descriptor type. The type is supposed be created by `cuTensorMapEncodeTiled` cuda drivers api. Reviewed By: nicolasvasilache Differential Revision: https://reviews.llvm.org/D155453
-
Alex Zinenko authored
Linalg structure ops do not implement control flow in the way expected by RegionBranchOpInterface, and the interface implementation isn't actually used anywhere. The presence of this interface without correct implementation is confusing for, e.g., dataflow analyses. Reviewed By: springerm Differential Revision: https://reviews.llvm.org/D155841
-
Nikita Popov authored
-
Nikita Popov authored
-
Nikita Popov authored
Reapply after fixing an issue in canonicalizeLogicFirst() exposed by this change (218f9757). ----- In preparation for removing support for and expressions, mark them as undesirable. As such, we will no longer implicitly create such expressions, but they still exist.
-
Haojian Wu authored
-
Nikita Popov authored
The underlying copyIRFlags() API accepts arbitrary values and can work with flags on operators (i.e. instructions or constant expressions). Remove the arbitrary limitation that the CreateWithCopiedFlags() API imposes, so we can directly pass through values matched by PatternMatch, which can be constant expressions. The attached test case works fine now, but would crash with an upcoming change to not produce and constant expressions.
-
David Green authored
This adds some basic vector bswap costs, providing the type is supported. Differential Revision: https://reviews.llvm.org/D155806
-
Sindhu Chittireddy authored
Differential Revision: https://reviews.llvm.org/D155774
-
Markus Böck authored
Due to arguably a bug in GCC[0], using `__has_builtin` is not sufficient to check whether `__builtin_thread_pointer` can actually be compiled by GCC. This makes it impossible to compile LLVM with `llvm-exegesis` enabled with e.g. GCC 10 as it does have the builtin, but no implementation for architectures such as x86. This patch works around this issue by making it a cmake configure check whether the builtin can be compiled and used, rather than relying on the broken preprocessor macro. [0] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96952, demonstration: https://godbolt.org/z/9z5nWM6Ef Differential Revision: https://reviews.llvm.org/D155828
-
Markus Böck authored
Using properties currently requires at the very least implementing four methods/code snippets: * `convertToAttribute` * `convertFromAttribute` * `writeToMlirBytecode` * `readFromMlirBytecode` This makes replacing attributes with properties harder than it has to be: Attributes by default do not require immediately defining custom bytecode encoding. This patch therefore adds opt-in implementations of `writeToMlirBytecode` and `readFromMlirBytecode` that work with the default implementations of `convertToAttribute` and `convertFromAttribute`. They are provided by `defvar`s in `OpBase.td` and can be used by adding: ``` let writeToMlirBytecode = writeMlirBytecodeWithConvertToAttribute; let readFromMlirBytecode = readMlirBytecodeUsingConvertFromAttribute; ``` to ones TableGen definition. While this bytecode encoding is almost certainly not ideal for a given property, it allows more incremental use of properties and getting something sane working before optimizing the bytecode format. Differential Revision: https://reviews.llvm.org/D155286
-
LLVM GN Syncbot authored
-
varconst authored
The hardened mode is intended to only include security-critical, relatively low-overhead checks that are intended to be usable in production. By default, assertions are excluded from this mode. Differential Revision: https://reviews.llvm.org/D155866
-
varconst authored
Differential Revision: https://reviews.llvm.org/D142335
-
Fangrui Song authored
Many diagnostics (e.g., ProblemsDuplicate.modularize, ProblemsDisplayLists.modularize) are dependent on the iteration order of StringMap, which is not guaranteed to be deterministic (https://llvm.org/docs/ProgrammersManual.html#llvm-adt-stringmap-h). clang::ModuleMap::Modules is a StringMap. For now, sort by name in modularize.
-
Fangrui Song authored
StringMap iteration order is not guaranteed to be deterministic (https://llvm.org/docs/ProgrammersManual.html#llvm-adt-stringmap-h).
-
Fangrui Song authored
to make actions deterministic. StringSet iteration order is not guaranteed to be deterministic (https://llvm.org/docs/ProgrammersManual.html#llvm-adt-stringmap-h).
-
Jie Fu authored
/data/llvm-project/lldb/source/Plugins/Process/Utility/RegisterInfos_x86_64_with_base_shared.cpp:319:1: error: non-void function does not return a value in all control paths [-Werror,-Wreturn-type] } ^ 1 error generated.
-
Piyou Chen authored
testcase from https://github.com/llvm/llvm-project/issues/63554 Reviewed By: kito-cheng Differential Revision: https://reviews.llvm.org/D155039
-
Nick Desaulniers authored
-
Nick Desaulniers authored
The current behavior of JumpScopeChecker::VerifyIndirectOrAsmJumps was to cross validate the scope of every jumping statement (goto, asm goto) against the scope of every label (even if the label was not even a possible target of the asm goto). When we have multiple asm goto's with unique targets, we could trigger false positive build errors complaining that labels that weren't even in the asm goto's label list could not be jumped to. Example: error: cannot jump from this asm goto statement to one of its possible targets asm goto(""::::foo); note: possible target of asm goto statement bar: ^ Fixes: https://github.com/ClangBuiltLinux/linux/issues/1886 Reviewed By: void, jyu2, rjmccall Differential Revision: https://reviews.llvm.org/D155342 -
Dave Lee authored
These don't need to be regex.
-
Dave Lee authored
No longer needed following refactoring in D115178.
-