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

Dan Gohman gohman at apple.com
Tue May 6 17:56:52 PDT 2008


Hello Matthijs,

Separating mechanism from policy is a good thing for the LoopUnroll
pass. Instead of moving the policy to a subclass though, I think it'd
be better to move the mechanism, the unrollLoop function, out to be a
standalone utility function, with the LoopInfo object passed in
explicitly. FoldBlockIntoPredecessor would also be good to make into
a standalone utility function, since it isn't specific to unrolling.

This should still make it easy to write new unrolling passes with
custom heuristics, but it would also be more flexible for passes to
do unrolling in combination with other transformations.

What do you think?

Dan

On May 6, 2008, at 3:11 AM, Matthijs Kooijman wrote:

> Hi,
>
> please find an updated patch attached that incorporates the  
> (trivial) changes
> introduced by r50696 and which makes this patch apply cleanly again.
>
> Gr.
>
> Matthijs
> <split-unroll.diff>_______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev




More information about the llvm-dev mailing list