[clang] [mlir] [OpenACC] Implement tile/collapse lowering (PR #138576)
Andy Kaylor via cfe-commits
cfe-commits at lists.llvm.org
Mon May 5 15:25:18 PDT 2025
================
@@ -82,6 +83,17 @@ class OpenACCClauseCIREmitter final
return conversionOp.getResult(0);
}
+ mlir::Value createConstantInt(mlir::Location loc, unsigned width,
+ int64_t value) {
+ mlir::IntegerType ty = mlir::IntegerType::get(
+ &cgf.getMLIRContext(), width,
+ mlir::IntegerType::SignednessSemantics::Signless);
+ auto constOp = builder.create<mlir::arith::ConstantOp>(
+ loc, ty, builder.getIntegerAttr(ty, value));
----------------
andykaylor wrote:
I haven't seen anything that combines constants. Maybe there was a preference for having the constant values near the point of use for readability?
https://github.com/llvm/llvm-project/pull/138576
More information about the cfe-commits
mailing list