[PATCH] D30774: [SimplifyCFG] Merging duplicated basic blocks

Luís Ferreira via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 14 09:27:05 PST 2021


ljmf00 added a comment.

In D30774#3120916 <https://reviews.llvm.org/D30774#3120916>, @inouehrs wrote:

> Originally, this patch is for helping another optimization (https://reviews.llvm.org/D30900). But potentially, removing duplication may affect other optimizations in general.
> If you have a strong example to push this optimization, I think it is reasonable to submit a new patch with the description on how it improve the code with a large switch.

I think this can be beneficial too. With the same rationale of the switch lookup tables optimization, we can find a threshold where optimizing it is generally beneficial in terms of performance, plus, as mentioned, this can reduce significantly binary sizes and can perfectly fall into size optimization level.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D30774/new/

https://reviews.llvm.org/D30774



More information about the llvm-commits mailing list