[llvm] [LoopUnroll] Introduce UnrollMaxIterations as a hard cap on how many iterations we try to unroll (PR #78648)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 5 11:58:39 PST 2024


================
@@ -173,6 +173,10 @@ static cl::opt<unsigned>
                            cl::desc("Default threshold (max size of unrolled "
                                     "loop), used in all but O3 optimizations"));
 
+static cl::opt<unsigned> UnrollFullMaxIterations(
+    "unroll-full-max-iterations", cl::init(1'000'000), cl::Hidden,
----------------
nikic wrote:

```suggestion
static cl::opt<unsigned> PragmaUnrollFullMaxIterations(
    "pragma-unroll-full-max-iterations", cl::init(1'000'000), cl::Hidden,
```
I'd rename this to clarify that this applies only to pragma unroll.

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


More information about the llvm-commits mailing list