[llvm-commits] [llvm] r158392 - in /llvm/trunk: lib/Transforms/Utils/SimplifyCFG.cpp test/Transforms/SimplifyCFG/branch-fold.ll

Jakob Stoklund Olesen stoklund at 2pi.dk
Wed Jun 13 08:33:16 PDT 2012


On Jun 13, 2012, at 6:51 AM, Nuno Lopes wrote:

> - Not really related with your patch, but rather a more broaden question: 
> Now that the register allocator can rematerialize instructions when the live 
> intervals are too long (Jakob: please correct if I'm wrong), doesn't it make 
> sense to actually reuse all computations done in dominating basic blocks? 
> This patch is looking for opportunities to reuse redundant computations in 
> adjacent blocks, but I believe we could do it for arbitrary BBs, as long as 
> one of them dominates the other.

LLVM IR optimization passes like LICM, CSE, and GVN generally work like this:

1. IR optimizer is fully aggressive, ignoring register pressure.
2. Then a miracle occurs.
3. Good code comes out.

We are still working on step 2, but in general IR optimization passes don't need to worry about register pressure.

/jakob

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120613/14d5febd/attachment.html>


More information about the llvm-commits mailing list