================ @@ -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>( ---------------- bcardosolopes wrote:
I was going to ask the same. Sounds reasonable, specially since you'd be likely targeting "through MLIR" lowering in the future anyways. If you end up needing more than constants (whole CIR operations producing results you need for input) it might be a good idea to introduce a lowering pass to solve unrealized casts just for OpenACC related conversions before going to the rest of lowering. https://github.com/llvm/llvm-project/pull/138576 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits