Hello, everyone.
I have a problem about LoopUnroll: I want to do analysis and transformation on LLVM IR,
so I defined a PassManager, and add some Passes to it. I use a LoopUnrollPass likes blow:
…
Pass Manager Passes;
Passes.add(…)
Passes.add(createLoopUnrollPass(-1,-1,-1,-1));
…
Passes.run(*module);
WriteBitcodeToFile(…)
The problem is that when I test it using a loop program(compiled it to a *.bc file) it
didn’t uroll. Why? The createLoopUnrollPass defined as blow:
Pass *llvm::createLoopUnrollPass(int Threshold, int Count, int AllowPartial, int Runtime);
If I want to uroll a loop fixed number: 3 times, how to set the four parameters?
Thanks.
–Wang Lei(BeiJing University of Posts and Telecommunications)