================
@@ -65,8 +65,12 @@ lowerFromCIRToLLVMIR(mlir::ModuleOp MLIRModule,
llvm::LLVMContext &LLVMCtx,
bool EnableOpenMP,
llvm::StringRef mlirSaveTempsOutFile = {},
llvm::vfs::FileSystem *fs = nullptr) {
- return direct::lowerDirectlyFromCIRToLLVMIR(MLIRModule, LLVMCtx,
EnableOpenMP,
- mlirSaveTempsOutFile, fs);
+ std::unique_ptr<llvm::Module> LLVMModule =
+ direct::lowerDirectlyFromCIRToLLVMIR(MLIRModule, LLVMCtx, EnableOpenMP,
+ mlirSaveTempsOutFile, fs);
+ if (LLVMModule)
+ direct::expandAMDGPUDevicePrintf(*LLVMModule);
----------------
skc7 wrote:
The expansion is only wired into `CIRGenAction, but `cir-translate` also calls
`lowerDirectlyFromCIRToLLVMIR` and would leave an undefined
@__cir_amdgpu_printf. Could it run at the end of `lowerDirectlyFromCIRToLLVMIR`?
https://github.com/llvm/llvm-project/pull/226435
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits