[PATCH] D37343: [CodegenPrepare] Merge empty case blocks if no extra moves are added.(WIP)

Jun Bum Lim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 1 07:06:27 PDT 2017


junbuml added a comment.

I agree that skipping merging is not desirable when an extra mov is not actually added in the header of switch. If we can somehow estimate the generation of an extra mov in here, allowing merging must be a good choice. I'm not perfectly clear if checking constants is good enough for that estimation. However, it's very difficult to perfectly estimate that in CGP, so I'm okay with it if doing this is cheap enough and provide us with a reasonable level of estimation.


https://reviews.llvm.org/D37343





More information about the llvm-commits mailing list