[llvm-commits] PATCH: Add a function splitting pass to LLVM which extracts cold regions into their own functions

Chandler Carruth chandlerc at gmail.com
Mon May 14 14:02:50 PDT 2012


On Mon, May 14, 2012 at 1:52 PM, Andrew Trick <atrick at apple.com> wrote:

> None of these are issues for prototyping your pass. I'm just clarifying
> the high-level direction of CFG analysis in LLVM as I understand it.
>

It would be better to have such clarification in documentation, ideally in
the header files of these passes. This is a very "meta" point, but it is
frustrating to contributors to have arbitrary restrictions materialize only
after designing an optimization. I would rather that people are aware of
the constraints they need to work within if they want to implement a
particular optimization pass.

Essentially, if there are analyses or passes which are known to be
unacceptable for the normal compilation pipeline, I think that would be an
important thing to mention in the high-level comments for the pass. (It is
possible that I missed such comments, or that I never looked in the right
place, but I feel like the fact that dom-frontier and region-info is
essentially on the chopping block should be more clear than it currently
is... ;]

Anyways, this isn't hugely relevant to me (i probably should have been
aware of this honestly), its something I worry about in general.

Maybe you just want a neat Region iterator API utility that could be used
> by anyone doing region discovery, including RegionInfo. But you wouldn't
> need to pull in RegionInfo analysis.
>

This does indeed seem more like what I want. I'll look more into whether I
can use the existing domtree information and an iteration strategy when I
get another bit of free time to work on this (no clue when that'll happen).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120514/45f8ab78/attachment.html>


More information about the llvm-commits mailing list