[compiler-rt] [llvm] [openmp] [compiler-rt] Define GPU specific handling of profiling functions (PR #185763)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 10 14:50:47 PDT 2026
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff origin/main HEAD --extensions h,c,cpp -- compiler-rt/lib/profile/InstrProfilingPlatformGPU.c compiler-rt/lib/profile/InstrProfiling.h llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp b/llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp
index 0506e1a94..33777d07f 100644
--- a/llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp
+++ b/llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp
@@ -1196,11 +1196,10 @@ void InstrLowerer::lowerIncrement(InstrProfIncrementInst *Inc) {
if (isGPUProfTarget(M)) {
auto *I64Ty = Builder.getInt64Ty();
auto *PtrTy = Builder.getPtrTy();
- auto *CalleeTy =
- FunctionType::get(Type::getVoidTy(M.getContext()),
- {PtrTy, I64Ty}, false);
- auto Callee = M.getOrInsertFunction(
- "__llvm_profile_instrument_gpu", CalleeTy);
+ auto *CalleeTy = FunctionType::get(Type::getVoidTy(M.getContext()),
+ {PtrTy, I64Ty}, false);
+ auto Callee =
+ M.getOrInsertFunction("__llvm_profile_instrument_gpu", CalleeTy);
Value *CastAddr = Builder.CreatePointerBitCastOrAddrSpaceCast(Addr, PtrTy);
Builder.CreateCall(Callee, {CastAddr, Inc->getStep()});
} else if (Options.Atomic || AtomicCounterUpdateAll ||
``````````
</details>
https://github.com/llvm/llvm-project/pull/185763
More information about the llvm-commits
mailing list