[PATCH] D22696: [CodeGenPrep] Skip merging empty case blocks
Jun Bum Lim via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 18 14:28:59 PST 2016
junbuml added a comment.
> Do you know how often BPI/BFI is actually needed? In other words, among all functions compiled, how many of them reach to the point that BFI is needed? If you have some stats that will be great. If the data shows not often -- then BPI/BFI may need to be computed in a lazy way.
I'm quite sure that BPI/BFI would be rarely used as we specifically look for empty blocks which has unique predecessor terminated by SwitchInst or IndirectBrInst. We can compute BPI/BFI in isMergingEmptyBlockProfitable() and then cache it only for the current function. Please let me know if you see any down side of it?
https://reviews.llvm.org/D22696
More information about the llvm-commits
mailing list