[LLVMdev] Modifying LoopUnrollingPass

yaduveer singh yaduveer99 at gmail.com
Sat May 2 09:00:02 PDT 2015


Hi Zhoulai,

I am trying to modify "LoopUnrollPass" in llvm which produces multiple
copies of loop equal to the loop unroll factor.Currently, using multicore
architecture, say 3 for example and the execution goes like:

for 3 cores if there are 9 iterations of loop
core          instruction
1                   0,3,6
2                    1,4,7
3                    2,5,8

But I want to to modify such that it can execute in following way:

core          instruction
1                   0,1,2
2                   3,4,5
3                   6,7,8

I am not able to get where to modify for this. I tried creating a sample
pass using original LoopUnrollPass code and run "make", I received
following error:

loopunrollp.cpp:210:1: error: ‘void
llvm::initializeLoopUnrollpPass(llvm::PassRegistry&)’ should have been
declared inside ‘llvm’
/bin/rm: cannot remove
`/home/yaduveer/RP/LLVM/llvm/lib/Transforms/loopunrollp/Debug+Asserts/loopunrollp.d.tmp':
No such file or directory


Please help

Thanks,
Yaduveer




More information about the llvm-dev mailing list