[Mlir-commits] [mlir] [mlir][GPU] Plumb range information through the NVVM lowerings (PR #107659)
Krzysztof Drewniak
llvmlistbot at llvm.org
Fri Sep 13 15:11:34 PDT 2024
================
@@ -319,17 +319,19 @@ class LLVM_IntrOpBase<Dialect dialect, string opName, string enumName,
string immArgPositionsCpp = "{" # !interleave(immArgPositions, ", ") # "}";
string immArgAttrNamesCpp = "{" # !interleave(!foreach(name, immArgAttrNames,
"StringLiteral(\"" # name # "\")"), ", ") # "}";
- let llvmBuilder = [{
+ string baseLlvmBuilder = [{
auto *inst = LLVM::detail::createIntrinsicCall(
builder, moduleTranslation, &opInst, llvm::Intrinsic::}] # !interleave([
enumName, "" # numResults, overloadedResultsCpp, overloadedOperandsCpp,
immArgPositionsCpp, immArgAttrNamesCpp], ",") # [{);
(void) inst;
- }] # !if(!gt(requiresAccessGroup, 0), setAccessGroupsMetadataCode, "")
+ }];
+ string baseLlvmBuilderCoda = !if(!gt(numResults, 0), "$res = inst;", "");
----------------
krzysz00 wrote:
(I'll also note that this is from a previous PR)
The point here is to factor out the LLVM builder so you can add your own adjustments in the middle, and so I needed a name for the small bit that goes on at end to wrap everything up - and so went with coda by analogy to the musical concept.
https://github.com/llvm/llvm-project/pull/107659
More information about the Mlir-commits
mailing list