[llvm] Fix 40056: Prevent outlining of blocks with token type instructions (PR #99759)

via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 20 06:23:54 PDT 2024


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 7d80ee5bdabbcb25b15fe54297d3f13793e4d8c2 6e3ae15686059e7b31cf19168d86a3375d2fb03b --extensions cpp -- llvm/lib/Transforms/IPO/HotColdSplitting.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/Transforms/IPO/HotColdSplitting.cpp b/llvm/lib/Transforms/IPO/HotColdSplitting.cpp
index 849bfd3d95..e0011f55e2 100644
--- a/llvm/lib/Transforms/IPO/HotColdSplitting.cpp
+++ b/llvm/lib/Transforms/IPO/HotColdSplitting.cpp
@@ -39,11 +39,11 @@
 #include "llvm/IR/CFG.h"
 #include "llvm/IR/DiagnosticInfo.h"
 #include "llvm/IR/Dominators.h"
+#include "llvm/IR/EHPersonalities.h"
 #include "llvm/IR/Function.h"
 #include "llvm/IR/Instruction.h"
 #include "llvm/IR/Instructions.h"
 #include "llvm/IR/Module.h"
-#include "llvm/IR/EHPersonalities.h"
 #include "llvm/IR/PassManager.h"
 #include "llvm/IR/ProfDataUtils.h"
 #include "llvm/IR/User.h"
@@ -181,9 +181,8 @@ static bool mayExtractBlock(const BasicBlock &BB) {
   // %0 = cleanuppad within none []
   // call void @"?terminate@@YAXXZ"() [ "funclet"(token %0) ]
   // br label %continue-exception
-  if (llvm::any_of(BB, [](const Instruction &I){
-    return I.getType()->isTokenTy();
-  })) {
+  if (llvm::any_of(
+          BB, [](const Instruction &I) { return I.getType()->isTokenTy(); })) {
     return false;
   }
 

``````````

</details>


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


More information about the llvm-commits mailing list