[LLVMdev] Strange loop unrolling problem (partially solved)
pertti.kellomaki at tut.fi
Mon Apr 27 07:09:20 PDT 2009
Duncan Sands wrote:
> if optimizing with "opt -std-compile-opts" shows this problem
> then you can find the problematic pass using the following
> (1) run "opt -std-compile-opts -debug-pass=Arguments" to find
> out which passes opt is running.
> (2) run opt with that list of passes rather than -std-compile-opts.
> (3) drop passes from the end of the list as long as the problematic
> transform is still happening.
Thanks. It seems that it is -jump-threading doing the transformation.
Eliminating it or moving it past -loop-unroll makes the loop unroll.
This fixes our immediate problem, since we are running opt from
a script, so we can shuffle the passes around. I wonder if it is
worth filing a PR for LLVM?
More information about the llvm-dev