[llvm] 7e390df - [AMDGPU] Correction to 095c48fdf3d27a4f346f8680d1d7e89449bb557b.
via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 5 18:47:42 PDT 2021
Author: kpyzhov
Date: 2021-10-05T21:47:25-04:00
New Revision: 7e390dfea704862685fbb092e1838f1bd5d2c6cc
URL: https://github.com/llvm/llvm-project/commit/7e390dfea704862685fbb092e1838f1bd5d2c6cc
DIFF: https://github.com/llvm/llvm-project/commit/7e390dfea704862685fbb092e1838f1bd5d2c6cc.diff
LOG: [AMDGPU] Correction to 095c48fdf3d27a4f346f8680d1d7e89449bb557b.
Differential Revision: https://reviews.llvm.org/D110337
Added:
Modified:
llvm/lib/Transforms/Utils/AMDGPUEmitPrintf.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Utils/AMDGPUEmitPrintf.cpp b/llvm/lib/Transforms/Utils/AMDGPUEmitPrintf.cpp
index a0d655320988e..fdc914a72bfd7 100644
--- a/llvm/lib/Transforms/Utils/AMDGPUEmitPrintf.cpp
+++ b/llvm/lib/Transforms/Utils/AMDGPUEmitPrintf.cpp
@@ -63,7 +63,9 @@ static Value *callPrintfBegin(IRBuilder<> &Builder, Value *Version) {
auto Int64Ty = Builder.getInt64Ty();
auto M = Builder.GetInsertBlock()->getModule();
auto Fn = M->getOrInsertFunction("__ockl_printf_begin", Int64Ty, Int64Ty);
- M->addModuleFlag(llvm::Module::Override, "amdgpu_hostcall", 1);
+ if (!M->getModuleFlag("amdgpu_hostcall")) {
+ M->addModuleFlag(llvm::Module::Override, "amdgpu_hostcall", 1);
+ }
return Builder.CreateCall(Fn, Version);
}
More information about the llvm-commits
mailing list