[llvm] [JumpThreading] Limit number of free instructions (PR #75671)

via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 15 16:08:46 PST 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 b2cdf3cc4c08729d0ff582d55e40793a20bbcdcc 9425f56a2703280ae087876468715c481fb61244 -- llvm/lib/Transforms/Scalar/JumpThreading.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/Transforms/Scalar/JumpThreading.cpp b/llvm/lib/Transforms/Scalar/JumpThreading.cpp
index 621299efb6..80305fb842 100644
--- a/llvm/lib/Transforms/Scalar/JumpThreading.cpp
+++ b/llvm/lib/Transforms/Scalar/JumpThreading.cpp
@@ -104,8 +104,8 @@ static cl::opt<unsigned> PhiDuplicateThreshold(
 
 static cl::opt<unsigned> FreeInstDuplicateThreshold(
     "jump-threading-free-inst-threshold",
-    cl::desc("Max free instructions in BB to duplicate for jump threading"), cl::init(500),
-    cl::Hidden);
+    cl::desc("Max free instructions in BB to duplicate for jump threading"),
+    cl::init(500), cl::Hidden);
 
 static cl::opt<bool> ThreadAcrossLoopHeaders(
     "jump-threading-across-loop-headers",
@@ -496,8 +496,8 @@ static unsigned getJumpThreadDuplicationCost(const TargetTransformInfo *TTI,
     if (TTI->getInstructionCost(&*I, TargetTransformInfo::TCK_SizeAndLatency) ==
         TargetTransformInfo::TCC_Free) {
       // Do not duplicate the BB if it has a lot of free instructions.
-      // In edge cases they can add up and significantly increase compile time of
-      // later passes by bloating the IR.
+      // In edge cases they can add up and significantly increase compile time
+      // of later passes by bloating the IR.
       if (Free++ > FreeInstDuplicateThreshold)
         return ~0U;
       continue;

``````````

</details>


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


More information about the llvm-commits mailing list