[clang] [Profile] Refactor profile correlation. (PR #69656)

via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 26 13:01:22 PDT 2023


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 6ddc03d97c0de96691ed27f05c9b30869051ce06 39cb3204ad4eea8c8b91ad1225e8dd681156237a -- clang/lib/CodeGen/BackendUtil.cpp compiler-rt/lib/profile/InstrProfiling.c compiler-rt/lib/profile/InstrProfiling.h compiler-rt/lib/profile/InstrProfilingBuffer.c compiler-rt/lib/profile/InstrProfilingMerge.c compiler-rt/lib/profile/InstrProfilingWriter.c compiler-rt/test/profile/Darwin/instrprof-debug-info-correlate.c compiler-rt/test/profile/Linux/instrprof-debug-info-correlate-warnings.c compiler-rt/test/profile/Linux/instrprof-debug-info-correlate.c compiler-rt/test/profile/Linux/instrprof-show-debug-info-correlation.c llvm/include/llvm/ProfileData/InstrProfCorrelator.h llvm/include/llvm/ProfileData/InstrProfReader.h llvm/include/llvm/Transforms/Instrumentation/PGOInstrumentation.h llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp llvm/lib/ProfileData/InstrProfCorrelator.cpp llvm/lib/ProfileData/InstrProfReader.cpp llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp llvm/tools/llvm-profdata/llvm-profdata.cpp
``````````

</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 a5110829a1c5..7c49bbaa7045 100644
--- a/llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp
+++ b/llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp
@@ -964,8 +964,8 @@ InstrProfiling::getOrCreateRegionCounters(InstrProfInstBase *Inc) {
       DebugInfoCorrelate || ProfileCorrelate == InstrProfCorrelator::DEBUG_INFO;
   // Use internal rather than private linkage so the counter variable shows up
   // in the symbol table when using debug info for correlation.
-  if (EnableDebugCorrelate &&
-      TT.isOSBinFormatMachO() && Linkage == GlobalValue::PrivateLinkage)
+  if (EnableDebugCorrelate && TT.isOSBinFormatMachO() &&
+      Linkage == GlobalValue::PrivateLinkage)
     Linkage = GlobalValue::InternalLinkage;
 
   // Due to the limitation of binder as of 2021/09/28, the duplicate weak

``````````

</details>


https://github.com/llvm/llvm-project/pull/69656


More information about the cfe-commits mailing list