[llvm] [LoopUnroll] Introduce PragmaUnrollFullMaxIterations as a hard cap on how many iterations we try to unroll (PR #78648)
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 14 15:01:39 PST 2024
dwblaikie wrote:
Oh, I found https://releases.llvm.org/4.0.0/tools/clang/docs/AttributeReference.html#pragma-unroll-pragma-nounroll
Which says "Specifying #pragma unroll without a parameter directs the loop unroller to attempt to fully unroll the loop if the trip count is known at compile time and attempt to partially unroll the loop if the trip count is not known at compile time" The loop condition is simple/known here (though the conditional goto/returns - maybe those complicate things?)
Oh, the docs also say "#pragma unroll and #pragma unroll _value_ have identical semantics to #pragma clang loop unroll(full) and #pragma clang loop unroll_count(_value_) respectively. " - so that doesn't sound like `#pragma clang loop unroll(full)` would help the situation?
https://github.com/llvm/llvm-project/pull/78648
More information about the llvm-commits
mailing list