[PATCH] Fix bug causing loop unrolling to be disabled in some cases for loops with '#pragma clang loop unroll_count(N)"
meheff at google.com
Thu Jul 24 14:59:24 PDT 2014
After unrolling a loop with llvm.loop.unroll.count metadata (unroll factor hint) the loop unroller replaces the llvm.loop.unroll.count metadata with llvm.loop.unroll.disable metadata to prevent any subsequent unrolling passes from unrolling more than the hint indicates. However, if the unroll count metadata is shared between loops then unrolling for these other loops will also be disabled. This small patch fixes that problem by adding the llvm.loop.unroll.disable metadata to only the loop which was just unrolled.
@@ -302,7 +302,6 @@
// Set operand 0 to refer to the loop id itself.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 442 bytes
Desc: not available
More information about the llvm-commits