[clang] [llvm] [LoopUnroll] Add flag to enforce loop unroll pragma regardless of expensive trip count (PR #180961)
Adel Ejjeh via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 11 12:54:01 PST 2026
================
@@ -1102,7 +1110,8 @@ bool llvm::computeUnrollCount(
}
if (UP.Count == 0)
UP.Count = UP.DefaultUnrollRuntimeCount;
-
+ if (PragmaEnableUnroll && ForcePragmaUnroll)
+ UP.AllowExpensiveTripCount = true;
----------------
adelejjeh wrote:
Just wanted to add, the intent of moving towards what you are suggesting is pending more testing to make sure we fully understand the ramifications on different workloads if we change the default behavior of the compiler.
https://github.com/llvm/llvm-project/pull/180961
More information about the cfe-commits
mailing list