[PATCH] D52904: [hot-cold-split] fix static analysis of cold regions

Sebastian Pop via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 15 14:22:24 PDT 2018


sebpop added a comment.

In https://reviews.llvm.org/D52904#1265841, @sebpop wrote:

> > Are both fixes necessary to fix the issue (the one for back propagation and the one to bail out if the entry block is cold), or is either one sufficient? The patch description only mentions the former.


We need both parts of the patch to fix the issue.

> I am not sure whether the entry block will get marked as cold after the two fixes to the forward and back propagation.
>  We could try to transform the early return into an assert that the entry block of a function is never marked cold.
>  I will test this change.

Static analysis would mark the first block in the next function as cold:

define void @fun() {
entry:

  unreachable

}

When the entry block is marked cold,
we need an early return before outlining the full function.


https://reviews.llvm.org/D52904





More information about the llvm-commits mailing list