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 HEAD~1 HEAD --extensions cpp,h -- 
llvm/include/llvm/IR/ProfDataUtils.h llvm/lib/IR/ProfDataUtils.cpp 
llvm/lib/IR/Verifier.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/include/llvm/IR/ProfDataUtils.h 
b/llvm/include/llvm/IR/ProfDataUtils.h
index 59a5d99f0..89fa7f735 100644
--- a/llvm/include/llvm/IR/ProfDataUtils.h
+++ b/llvm/include/llvm/IR/ProfDataUtils.h
@@ -142,7 +142,7 @@ LLVM_ABI void setBranchWeights(Instruction &I, 
ArrayRef<uint32_t> Weights,
 /// info.
 LLVM_ABI void setExplicitlyUnknownBranchWeights(Instruction &I);
 
-LLVM_ABI bool isExplicitlyUnknownBranchWeightsMetadata(const MDNode& MD);
+LLVM_ABI bool isExplicitlyUnknownBranchWeightsMetadata(const MDNode &MD);
 LLVM_ABI bool hasExplicitlyUnknownBranchWeights(const Instruction &I);
 
 /// Scaling the profile data attached to 'I' using the ratio of S/T.
diff --git a/llvm/lib/IR/ProfDataUtils.cpp b/llvm/lib/IR/ProfDataUtils.cpp
index 6eb7d4377..1585771c0 100644
--- a/llvm/lib/IR/ProfDataUtils.cpp
+++ b/llvm/lib/IR/ProfDataUtils.cpp
@@ -44,8 +44,7 @@ constexpr unsigned MinBWOps = 3;
 // the minimum number of operands for MD_prof nodes with value profiles
 constexpr unsigned MinVPOps = 5;
 
-const char* UnknownBranchWeightsMarker = "unknown";
-
+const char *UnknownBranchWeightsMarker = "unknown";
 
 // We may want to add support for other MD_prof types, so provide an 
abstraction
 // for checking the metadata type.
@@ -250,7 +249,8 @@ bool isExplicitlyUnknownBranchWeightsMetadata(const MDNode 
&MD) {
 
 bool hasExplicitlyUnknownBranchWeights(const Instruction &I) {
   auto *MD = I.getMetadata(LLVMContext::MD_prof);
-  if (!MD) return false;
+  if (!MD)
+    return false;
   return isExplicitlyUnknownBranchWeightsMetadata(*MD);
 }
 

``````````

</details>


https://github.com/llvm/llvm-project/pull/145578
_______________________________________________
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to