[PATCH] D22696: [CodeGenPrep] Skip merging empty case blocks
Hal Finkel via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 23 12:49:52 PDT 2016
hfinkel added a comment.
In https://reviews.llvm.org/D22696#547869, @davidxl wrote:
> We actually see similar issues introduced by SimplifyCFG which introduces new critical edges which later can not be properly split in PhiElimination which results in copy instructions be inserted into blocks with higher frequency. Until we have a better solution, this patch seems like a reasonable workaround.
>
> Hal, what is your opinion?
I've thought about this only for a few minutes, and I'd definitely like to know if @danielcdh's patch also fixes this, but what is the benefit of creating critical edges here in the first place (i.e. when the case block is likely to be executed)? Shouldn't we decide later whether to speculate instructions (including copies that come from PHIs) later at the MI level (based on instruction costs and profiling data) as an independent set of decisions?
https://reviews.llvm.org/D22696
More information about the llvm-commits
mailing list