[patch] simplifyCFG for review

Chandler Carruth chandlerc at google.com
Sat Jul 27 01:30:29 PDT 2013


On Sat, Jul 27, 2013 at 1:07 AM, Andrew Trick <atrick at apple.com> wrote:

> (1) In terms of code organization, these anti-canonical, target-selected
> transforms should live somewhere else. I kept quiet becase I hadn't come up
> with an alternative, but we can do that now. OptimizeCFG.cpp?
>
>
> It would be even more self-evident to group all of these type of branch
> avoidance utils into a FlattenCFG package. So I'm changing my vote to
> FlattenCFG.cpp.
>

To focus on the immediate issue: I agree.

Design wise, I would suggest one step further: I think that CFG-flattening
of this form is somewhat specialized and we should just build a nice
specialized set of optimizations targetting that use case, and have the
targets add those passes from their target machine rather than monkey with
the general purpose PMB. We can't easily get this right in the PMB because
of the silly way CGSCC stuff is defined, and I think that this is likely to
be best as a late-stage CFG pass anyways not unlike LSR, etc. I'm not sure
that it really has anything to do with SimplifyCFG (or OptimizeCFG, which
I've begun to think is somewhat likely to make more sense in MI w/ register
pressure and critical path info). So, my vote is for a more targeted tool
in the toolbox.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130727/a0a6c1cf/attachment.html>


More information about the llvm-commits mailing list