- Jan 03, 2023
-
-
Haojian Wu authored
-
Dmitri Gribenko authored
-
Krzysztof Drewniak authored
1. When converting from the GPU dialect to the ROCDL dialect, if the function that contains a gpu.thread_id or gpu.block_id op is annotated with gpu.known_{block,grid}_size, use that size to set a "range" attribute on the corresponding rocdl intrinsic so that the LLVM frontend can optimize based on that range information. 1b. When translating from the rocdl dialect to LLVM IR, use the "range" attribute, if present, to set !range metadata on the relevant function call. 2. Deprecate the old rocdl.max_flat_work_group_size attribute, which was used in a tensorflow backend. Instead, use rocdl.flat_work_group_size going forward to allow kernel generators to specify the minimum and maximum work group sizes a kernel may be launched with in one attribute, thus more closely matching the backend. 3. When translating from gpu.func to llvm.func within gpu-to-rocdl, copy the known_block_size attribute as rocdl.reqd_work_group_size to enable further translations to set the corresponding metadata on the LLVM IR function. Also, set the rocdl.flat_work_group_size attribute to ensure that the reqd_work_group_size metadata and the amdgpu-flat-work-group-size metadata are consistent. 3b. Extend the ROCDL to LLVM IR translation to set the !reqd_work_group_size metadata on LLVM functions Also update tests and add functions to the ROCDL dialect to ensure attribute names are used consistently. Depends on D139865 Reviewed By: antiagainst Differential Revision: https://reviews.llvm.org/D139866 -
Peter Rong authored
Signed-off-by:Peter Rong <PeterRong96@gmail.com>
-
Sanjay Patel authored
~sext(A) & Op1 --> A ? 0 : Op1 With no extra uses, this pattern is already reduced, but we would miss it in examples such as issue #59773. https://alive2.llvm.org/ce/z/WGLcSR
-
Sanjay Patel authored
-
Sanjay Patel authored
-
Roman Lebedev authored
https://alive2.llvm.org/ce/z/vPs-gZ This is a larger pattern than would seem necessary, with minimal being: * `and` https://alive2.llvm.org/ce/z/q9-MqK * `or` https://alive2.llvm.org/ce/z/AUUEMZ * `xor` https://alive2.llvm.org/ce/z/dm3Ume .. so for all others, we canonicalize away from math to `select`, but there we canonicalize in the opposite direction. Fixes https://github.com/llvm/llvm-project/issues/59791
-
-
Florian Hahn authored
Replace VPWidenCanonicalIVRecipe::classof implementation with general VP_CLASSOF_IMPL.
-
Florian Hahn authored
Replace VPWidenMemoryInstructionRecipe ::classof implementation with general VP_CLASSOF_IMPL.
-
Florian Hahn authored
Replace VPPredInstPHI::classof implementation with general VP_CLASSOF_IMPL.
-
Krzysztof Drewniak authored
This should fix the MSVC warning that caused the previous revert. Reviewed By: antiagainst Differential Revision: https://reviews.llvm.org/D140766
-
Nikita Popov authored
-
- Jan 02, 2023
-
-
Nikita Popov authored
Use a non-zero GEP index, so it does not get dropped during opaque pointer conversion.
-
Nikita Popov authored
-
Nikita Popov authored
-
Roman Lebedev authored
The original computation was both making assumptions that do not hold in practice, and being overly pessimistic. We should just check every possible split factor, and pick the best one. Fixes https://github.com/llvm/llvm-project/issues/59781
-
Muhammad Omair Javaid authored
TestSignedTypes.py passes on AArch64 Windows. This patch disables this test only for i[3-6]86 and x86_64 Windows platform.
-
Nikita Popov authored
EmitGEPOffset() supports vector GEPs nowadays, so we don't need any further code changes. compare_gep_with_base_vector1 shows a weakness in folding the resulting comparison if an index splat has to be performed.
-
Nikita Popov authored
These show up as regressions with opaque pointers.
-
Jonas Hahnfeld authored
There were basically four different orderings: one defined by the relocations, one by the enum definition of EdgeKind_riscv, one for mapping the enum values to their names, and one when mapping the relocations to edge kinds and finally processing them. Chose the ordering defined by the relocations in the riscv-elf-psabi-doc as the canonical one. Differential Revision: https://reviews.llvm.org/D140802
-
Nikita Popov authored
The way these APIs are used, there isn't really a benefit to deduplicating the ops as part of the API. The only place that benefits from this is PoisonChecking, and for that particular use the assertion emission was potentially non-deterministic. We should populate a vector for deterministic order and then deduplicate via a separate set.
-
Oleksandr "Alex" Zinenko authored
-
Daan De Meyer authored
getRawNumberOfSymbols() assumes that a symbol table exists, which isn't always guaranteed, while getNumberOfSymbols() handles and tolerates objects without a symbol table. When there is a symbol table, both methods return the same value. Also add a test to ensure we don't regress in this regard. The test generates a basic COFF object with symbols and overrides the symbol table pointer with zeros to craft the input required to verify llvm-objcopy works as expected in this scenario.
-
Adrian Kuegel authored
-
Nikita Popov authored
We were already treating branch on poison as UB, but branch on undef is also UB. Move the checks into the correct function. From LangRef for br: > If ‘cond’ is poison or undef, this instruction has undefined behavior. From LangRef for switch: > If ‘value’ is poison or undef, this instruction has undefined behavior. There is a minor regression in dont-distribute-phi.ll, apparently we handle that pattern in logical but not bitwise form.
-
Nikita Popov authored
I think this doesn't make any difference right now, but once we take into account that branch on undef is UB in programUndefinedIfUndefOrPoison() the new position of the branch would imply that the condition can't be poison, which would defeat the purpose of the freeze insertion here. We need to perform the check before the branch is moved.
-
Tamas Berghammer authored
Previously we were matching constructor calls for std::string and llvm::StringRef and this change extends this set with including std::string_view as well. Reviewed By: njames93, carlosgalvezp Differential Revision: https://reviews.llvm.org/D140018
-
Tobias Gysi authored
The revision introduces the LLVMImportDialectInterface to make the import of LLVM IR intrinsics extensible. It uses a dialect interface that enables external projects to provide their own conversion functions for custom intrinsics. These conversion functions can rely on the ModuleImport class to perform support tasks such as mapping LLVM values to MLIR values or for converting types between the two worlds. The implementation largely mirrors the export implementation. One major difference is the dispatch to the appropriate dialect interface, since LLVM IR intrinsics have no direct association to an MLIR dialect. The dialect interfaces thus have to publish the supported intrinsics to ensure incoming conversion calls are dispatched to the right dialect interface. The revision implements the extensible intrinsic import discussed as part of the "extensible llvm ir import" rfc: https://discourse.llvm.org/t/rfc-extensible-llvm-ir-import/67256/6 Reviewed By: ftynse Differential Revision: https://reviews.llvm.org/D140374
-
Nikita Popov authored
This has been enabled by default without issue for a while now, remove the flag.
-
Qfrost authored
Differential Revision: https://reviews.llvm.org/D139184
-
Adrian Kuegel authored
-
luxufan authored
-
Owen Pan authored
See https://reviews.llvm.org/D140543#4021209.
-
Owen Pan authored
-
Jeff Bailey authored
Differential Revision: https://reviews.llvm.org/D140825
-
Roman Lebedev authored
[DAGCombiner][X86] Fold a CONCAT_VECTORS of SHUFFLE_VECTOR and it's operand into wider SHUFFLE_VECTOR This was showing as a source of *many* regressions with more aggressive ZERO_EXTEND_VECTOR_INREG recognition.
-
Roman Lebedev authored
-
Florian Hahn authored
Adjust mergeReplicateRegions to be in line with mergeBlocksIntoPredecessors added in 36d70a6a by collecting only the valid candidates first. Also rename to mergeReplicateRegionsIntoSuccessors and add missing doc-comment. This addresses post-commit suggestions by @Ayal.
-