[llvm-commits] Sink improvements

Nick Lewycky nicholas at mxc.ca
Sun May 20 12:08:58 PDT 2012


Carlo Alberto Ferraris wrote:
> Please find attached a patch that improves the instrcution sinking pass
> so that it is able to handle things such as
>
> a = ...
> if (...) {
> } else {
> }
> ... = a // first use of a
>
> I added a simple test for this (included in the patch) and make check
> does not report any regression (ubuntu x86 12.04).

Sorry, but your patch uses the PostDominatorTree. That is very expensive 
to compute, and all other passes in llvm which use it have been changed 
to not use it.

The DominatorTree is similarly expensive to compute, but the trick there 
is that each pass preserves the dominator tree, therefore we only really 
compute it once fully and every pass gets to use it.

Nick



More information about the llvm-commits mailing list