[PATCH] D53588: [hot-cold-split] split more than a cold region per function

Vedant Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 23 11:22:52 PDT 2018


vsk added a comment.

In https://reviews.llvm.org/D53588#1272895, @sebpop wrote:

> In https://reviews.llvm.org/D53588#1272789, @vsk wrote:
>
> > @sebpop thanks for this patch! I don't see any problems with it (although I would prefer that the test explicitly check that outlined functions contain the correct instructions).
> >
> > At a higher-level, I'm seeing some problems with the forward/back cold propagation done in getHotBlocks on internal projects. The propagation seems to stop when it encounters simple control flow, like an if-then-else or a for loop, after which cold code is unconditionally executed.
> >
> > I have a prototype of a different propagation scheme which overcomes some of these limitations. The idea is to mark blocks which are post-dominated by a cold block, or are dominated by a cold block, as cold. This is able to handle the control flow I described, and isn't limited to requiring a single exit block. Could you give me a day to evaluate it further, run benchmarks etc. and report back? If it turns out to be promising, istm that it'd make sense to rebase this patch on top of it.
>
>
> I was discussing with Aditya over the llvm dev meeting that it would be good to move the static analysis of hot/cold blocks to an analysis pass instead of carrying it in the hot/cold split pass.
>  That way we will have a smaller transform pass and other passes could use the static analysis of hot/cold blocks.


Aditya mentioned this to me as well :). Definitely on my list!


https://reviews.llvm.org/D53588





More information about the llvm-commits mailing list