[llvm-commits] [llvm] r48521 - in /llvm/trunk: include/llvm/CodeGen/LiveVariables.h lib/CodeGen/LiveVariables.cpp test/CodeGen/PowerPC/2008-03-18-RegScavengerAssert.ll test/CodeGen/X86/x86-64-ret0.ll

David Greene dag at cray.com
Fri Mar 28 14:34:16 PDT 2008


On Tuesday 18 March 2008 23:59, Chris Lattner wrote:

> How about using reg_iterators to do this?  I assume this only applies
> to vregs.  If you walk the use_iterator list for the register, you can
> very efficiently discard uses in other blocks (check User->getparent()
> == MBB).  Any uses within the same block are either a) in phi nodes,
> in which case they are above the instruction or b) users later in the
> block.
>
> If the representation is not in SSA form, you have to do some more
> checks, but this should be a lot faster than scanning the whole
> machine block.  MBB's can be very large after all :)

Ack.  I just started looking at using reg_iterators elsewhere but wasn't
aware of this non-SSA caveat.  Can you elaborate?

                                               -Dave



More information about the llvm-commits mailing list