[llvm-commits] Minor change to LoopUnroll's ctor

Junjie Gu jgu222 at gmail.com
Mon Apr 4 13:47:23 PDT 2011


I'd like to change the loop unroll so that the
threshold/count/allowpartial can be passed as parameters to
LoopUnroll's ctor. The reason for doing so is that static options
(-unroll-threshold, -unroll-count, -unroll-allow-partial) are not good
for an environment (OpenCL) in which multiple llvm context may be
present at the same time. And each llvm context may have its own
optimization options, and thus options cannot be shared.

With this patch, a user can create a loop unroll by the following:

          createLoopUnrollPass(Threshold, Count, AllowPartial);

And the previous API
          createLoopUnrollPass()
will work as before.

Please review it. I do have commit access so I can check in by myself
after reviewing.

Thanks
Junjie
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lu.diff
Type: text/x-diff
Size: 4099 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20110404/a5bf7ab5/attachment.diff>


More information about the llvm-commits mailing list