[LLVMdev] [PATCH] Split LoopUnroll pass into mechanism and policy

Matthijs Kooijman matthijs at stdin.nl
Tue May 6 02:03:08 PDT 2008


Hi,

the attached patch splits the loop unroll pass into a LoopUnroll superclass
that implements the unrolling mechanism, and a SimpleLoopUnroll subclass
implementing the current policy. This split is modeled after the split between
Inliner and SimpleInliner.

The superclass currently still finds out the TripCount and TripMultiple, and
passes those, together with the Loop in question, to a policy method.
Currently, TripMultiple is not yet used in the SimpleLoopUnroll, but I can
imagine that this might change, so I included it already.

Currently, there is only the SimpleLoopUnroll subclass, so there is no direct
gain. However, this opens up the way for other policies and in particular I
need to implement a platform specific policy so I require this change.

Comments are welcome, I hope this change can be committed.

Gr.

Matthijs
-------------- next part --------------
A non-text attachment was scrubbed...
Name: split-unroll.diff
Type: text/x-diff
Size: 14632 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080506/a747bafc/attachment.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080506/a747bafc/attachment.sig>


More information about the llvm-dev mailing list