Loop-Unrolling with Multi Core Architecture

Hi All!

I’m Yaduveer, trying to do Loop-Unrolling with a modified algorithm which can run on multicore processor. We expect loop unroll factor equal to number of cores available. I want to modify the LoopUnroll Pass so I tried to make a sample pass [http://llvm.org/docs/WritingAnLLVMPass.html#id6] using the existing LoopUnrollPass. I tried running that but could not register the new pass as it resembled with original pass.

Here’s the output when I tried to compile and register the pass.


Can somebody help me how to register this pass and make any more changes?


Hi Yaduveer,

The options at the beginning of the file are statically registered, so
you'll get conflicts. If you need the options from another file, you
shouldn't need to redeclare them, since they're not static variables.
Just use as you need and delete the redundant declarations on your
file should fix your problem. Feel free to create new ones, though, in
the same way, that are relevant for your pass only.