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 b6824c9d459da059e247a60c1ebd1aeb580dacc2 
9b99b234ef4edb68fc6d9734595d53685e16927c -- clang/test/Driver/codegen-data.c 
llvm/include/llvm/CodeGenData/CodeGenData.h 
llvm/include/llvm/CodeGenData/CodeGenData.inc 
llvm/include/llvm/CodeGenData/CodeGenDataReader.h 
llvm/include/llvm/CodeGenData/CodeGenDataWriter.h 
llvm/include/llvm/CodeGenData/OutlinedHashTree.h 
llvm/include/llvm/CodeGenData/OutlinedHashTreeRecord.h 
llvm/lib/CodeGenData/CodeGenData.cpp llvm/lib/CodeGenData/CodeGenDataReader.cpp 
llvm/lib/CodeGenData/CodeGenDataWriter.cpp 
llvm/lib/CodeGenData/OutlinedHashTree.cpp 
llvm/lib/CodeGenData/OutlinedHashTreeRecord.cpp 
llvm/tools/llvm-cgdata/llvm-cgdata.cpp 
llvm/unittests/CodeGenData/OutlinedHashTreeRecordTest.cpp 
llvm/unittests/CodeGenData/OutlinedHashTreeTest.cpp 
clang/lib/CodeGen/BackendUtil.cpp clang/lib/Driver/ToolChains/CommonArgs.cpp 
clang/lib/Driver/ToolChains/Darwin.cpp lld/MachO/Config.h lld/MachO/Driver.cpp 
lld/MachO/InputSection.h llvm/include/llvm/CodeGen/MachineOutliner.h 
llvm/include/llvm/CodeGen/TargetInstrInfo.h llvm/include/llvm/LTO/LTOBackend.h 
llvm/include/llvm/Support/SuffixTree.h 
llvm/include/llvm/Support/SuffixTreeNode.h llvm/lib/CodeGen/MachineOutliner.cpp 
llvm/lib/CodeGen/MachineStableHash.cpp llvm/lib/LTO/LTO.cpp 
llvm/lib/LTO/LTOBackend.cpp llvm/lib/Support/SuffixTree.cpp 
llvm/lib/Support/SuffixTreeNode.cpp 
llvm/lib/Target/AArch64/AArch64InstrInfo.cpp 
llvm/lib/Target/AArch64/AArch64InstrInfo.h 
llvm/unittests/Support/SuffixTreeTest.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/CodeGen/MachineOutliner.cpp 
b/llvm/lib/CodeGen/MachineOutliner.cpp
index 052a52db79..bc6bbe830b 100644
--- a/llvm/lib/CodeGen/MachineOutliner.cpp
+++ b/llvm/lib/CodeGen/MachineOutliner.cpp
@@ -134,10 +134,12 @@ static cl::opt<bool>
                                     "the codegen data generation or use"),
                            cl::init(false));
 
-static cl::opt<bool>
-    AppendContentHashToOutlinedName("append-content-hash-outlined-name", 
cl::Hidden,
-cl::desc("This appends the content hash to the globally outlined function 
name. It's beneficial for enhancing the precision of the stable hash and for 
ordering the outlined functions."),
-                           cl::init(false));
+static cl::opt<bool> AppendContentHashToOutlinedName(
+    "append-content-hash-outlined-name", cl::Hidden,
+    cl::desc("This appends the content hash to the globally outlined function "
+             "name. It's beneficial for enhancing the precision of the stable "
+             "hash and for ordering the outlined functions."),
+    cl::init(false));
 
 static cl::opt<bool> OutlinerLeafDescendants(
     "outliner-leaf-descendants", cl::init(true), cl::Hidden,
@@ -870,8 +872,10 @@ void 
MachineOutliner::computeAndPublishHashSequence(MachineFunction &MF,
 
   // Append a unique name based on the non-empty hash sequence.
   if (AppendContentHashToOutlinedName && !OutlinedHashSequence.empty()) {
-    auto CombinedHash = 
stable_hash_combine_range(OutlinedHashSequence.begin(), 
OutlinedHashSequence.end());
-    auto NewName = MF.getName().str() + ".content." + 
std::to_string(CombinedHash);
+    auto CombinedHash = stable_hash_combine_range(OutlinedHashSequence.begin(),
+                                                  OutlinedHashSequence.end());
+    auto NewName =
+        MF.getName().str() + ".content." + std::to_string(CombinedHash);
     MF.getFunction().setName(NewName);
   }
 
@@ -1041,9 +1045,9 @@ bool MachineOutliner::outline(
   // The function with highest priority should be outlined first.
   stable_sort(FunctionList, [](const std::unique_ptr<OutlinedFunction> &LHS,
                                const std::unique_ptr<OutlinedFunction> &RHS) {
-                return LHS->getNotOutlinedCost() * RHS->getOutliningCost() >
-                       RHS->getNotOutlinedCost() * LHS->getOutliningCost();
-              });
+    return LHS->getNotOutlinedCost() * RHS->getOutliningCost() >
+           RHS->getNotOutlinedCost() * LHS->getOutliningCost();
+  });
 
   // Walk over each function, outlining them as we go along. Functions are
   // outlined greedily, based off the sort above.

``````````

</details>


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

Reply via email to