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 c,h,inc,cpp -- 
clang/lib/CodeGen/CGCUDANV.cpp compiler-rt/include/profile/InstrProfData.inc 
compiler-rt/lib/profile/InstrProfiling.h 
compiler-rt/lib/profile/InstrProfilingBuffer.c 
compiler-rt/lib/profile/InstrProfilingFile.c 
compiler-rt/lib/profile/InstrProfilingInternal.h 
compiler-rt/lib/profile/InstrProfilingPlatformGPU.c 
compiler-rt/lib/profile/InstrProfilingPlatformROCm.cpp 
compiler-rt/lib/profile/InstrProfilingWriter.c 
llvm/include/llvm/ProfileData/InstrProf.h 
llvm/include/llvm/ProfileData/InstrProfData.inc 
llvm/include/llvm/ProfileData/InstrProfReader.h 
llvm/include/llvm/ProfileData/InstrProfWriter.h 
llvm/lib/ProfileData/InstrProf.cpp llvm/lib/ProfileData/InstrProfCorrelator.cpp 
llvm/lib/ProfileData/InstrProfReader.cpp 
llvm/lib/ProfileData/InstrProfWriter.cpp 
llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp 
llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp 
llvm/tools/llvm-profdata/llvm-profdata.cpp 
offload/plugins-nextgen/common/include/GlobalHandler.h 
offload/plugins-nextgen/common/src/GlobalHandler.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/compiler-rt/lib/profile/InstrProfiling.h 
b/compiler-rt/lib/profile/InstrProfiling.h
index 595c258d1..f4b4a5f62 100644
--- a/compiler-rt/lib/profile/InstrProfiling.h
+++ b/compiler-rt/lib/profile/InstrProfiling.h
@@ -338,15 +338,12 @@ void __llvm_profile_set_dumped(void);
  * \param NamesEnd End of names data
  * \param VersionOverride Profile version override (NULL to use default)
  */
-int __llvm_write_custom_profile(const char *Target,
-                                const __llvm_profile_data *DataBegin,
-                                const __llvm_profile_data *DataEnd,
-                                const char *CountersBegin,
-                                const char *CountersEnd,
-                                const char *UniformCountersBegin,
-                                const char *UniformCountersEnd,
-                                const char *NamesBegin, const char *NamesEnd,
-                                const uint64_t *VersionOverride);
+int __llvm_write_custom_profile(
+    const char *Target, const __llvm_profile_data *DataBegin,
+    const __llvm_profile_data *DataEnd, const char *CountersBegin,
+    const char *CountersEnd, const char *UniformCountersBegin,
+    const char *UniformCountersEnd, const char *NamesBegin,
+    const char *NamesEnd, const uint64_t *VersionOverride);
 
 /*!
  * This variable is defined in InstrProfilingRuntime.cpp as a hidden
diff --git a/compiler-rt/lib/profile/InstrProfilingFile.c 
b/compiler-rt/lib/profile/InstrProfilingFile.c
index 99cb601b9..43f290920 100644
--- a/compiler-rt/lib/profile/InstrProfilingFile.c
+++ b/compiler-rt/lib/profile/InstrProfilingFile.c
@@ -1314,15 +1314,12 @@ COMPILER_RT_VISIBILITY int 
__llvm_profile_set_file_object(FILE *File,
 }
 
 #ifndef __APPLE__
-int __llvm_write_custom_profile(const char *Target,
-                                const __llvm_profile_data *DataBegin,
-                                const __llvm_profile_data *DataEnd,
-                                const char *CountersBegin,
-                                const char *CountersEnd,
-                                const char *UniformCountersBegin,
-                                const char *UniformCountersEnd,
-                                const char *NamesBegin, const char *NamesEnd,
-                                const uint64_t *VersionOverride) {
+int __llvm_write_custom_profile(
+    const char *Target, const __llvm_profile_data *DataBegin,
+    const __llvm_profile_data *DataEnd, const char *CountersBegin,
+    const char *CountersEnd, const char *UniformCountersBegin,
+    const char *UniformCountersEnd, const char *NamesBegin,
+    const char *NamesEnd, const uint64_t *VersionOverride) {
   int ReturnValue = 0, FilenameLength, TargetLength;
   char *FilenameBuf, *TargetFilename;
   const char *Filename;
diff --git a/compiler-rt/lib/profile/InstrProfilingPlatformROCm.cpp 
b/compiler-rt/lib/profile/InstrProfilingPlatformROCm.cpp
index 410fcfdd8..fc03c63be 100644
--- a/compiler-rt/lib/profile/InstrProfilingPlatformROCm.cpp
+++ b/compiler-rt/lib/profile/InstrProfilingPlatformROCm.cpp
@@ -757,9 +757,9 @@ static int processDeviceOffloadPrf(void *DeviceOffloadPrf, 
int TUIndex,
   // counters: llvm-profdata reads them through UniformCounterPtr (decrementing
   // UniformCountersDelta per record, just like CountersDelta) and does not
   // assume data-record order, so no reordering is needed.
-  ptrdiff_t UCFileOffset =
-      DataSize + PaddingBytesBeforeCounters + CountersSize +
-      PaddingBytesAfterCounters + NumBitmapBytes + 
PaddingBytesAfterBitmapBytes;
+  ptrdiff_t UCFileOffset = DataSize + PaddingBytesBeforeCounters +
+                           CountersSize + PaddingBytesAfterCounters +
+                           NumBitmapBytes + PaddingBytesAfterBitmapBytes;
   __llvm_profile_data *RelocatedData = (__llvm_profile_data *)BufDataBegin;
   for (uint64_t i = 0; i < NumData; ++i) {
     const char *DeviceDataStructAddr =
diff --git a/llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp 
b/llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp
index ba0d5187f..e82acda61 100644
--- a/llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp
+++ b/llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp
@@ -2429,8 +2429,7 @@ void llvm::setProfMetadata(Instruction *TI, 
ArrayRef<uint64_t> EdgeCounts,
                            uint64_t MaxCount) {
   auto Weights = downscaleWeights(EdgeCounts, MaxCount);
 
-  LLVM_DEBUG(dbgs() << "Weight is: "; for (const auto &W
-                                           : Weights) {
+  LLVM_DEBUG(dbgs() << "Weight is: "; for (const auto &W : Weights) {
     dbgs() << W << " ";
   } dbgs() << "\n");
 
diff --git a/offload/plugins-nextgen/common/include/GlobalHandler.h 
b/offload/plugins-nextgen/common/include/GlobalHandler.h
index 8f333fcf1..6c2eb80dc 100644
--- a/offload/plugins-nextgen/common/include/GlobalHandler.h
+++ b/offload/plugins-nextgen/common/include/GlobalHandler.h
@@ -72,15 +72,12 @@ struct __llvm_profile_gpu_sections {
 };
 
 extern "C" {
-extern int __attribute__((weak))
-__llvm_write_custom_profile(const char *Target,
-                            const __llvm_profile_data *DataBegin,
-                            const __llvm_profile_data *DataEnd,
-                            const char *CountersBegin, const char *CountersEnd,
-                            const char *UniformCountersBegin,
-                            const char *UniformCountersEnd,
-                            const char *NamesBegin, const char *NamesEnd,
-                            const uint64_t *VersionOverride);
+extern int __attribute__((weak)) __llvm_write_custom_profile(
+    const char *Target, const __llvm_profile_data *DataBegin,
+    const __llvm_profile_data *DataEnd, const char *CountersBegin,
+    const char *CountersEnd, const char *UniformCountersBegin,
+    const char *UniformCountersEnd, const char *NamesBegin,
+    const char *NamesEnd, const uint64_t *VersionOverride);
 }
 /// PGO profiling data extracted from a GPU device via __llvm_profile_sections.
 struct GPUProfGlobals {

``````````

</details>


https://github.com/llvm/llvm-project/pull/190708
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to