[llvm-commits] [llvm] r103039 - in /llvm/trunk/lib/CodeGen: LiveIntervalAnalysis.cpp PHIElimination.cpp PHIElimination.h

Jakob Stoklund Olesen stoklund at 2pi.dk
Wed May 5 08:56:22 PDT 2010


On May 4, 2010, at 1:26 PM, Evan Cheng wrote:

> Author: evancheng
> Date: Tue May  4 15:26:52 2010
> New Revision: 103039
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=103039&view=rev
> Log:
> Teach PHI elimination to remove REG_SEQUENCE instructions and update references of the source operands with references of the destination with subreg indices. e.g.
> %reg1029<def>, %reg1030<def> = VLD1q16 %reg1024<kill>, ...
> %reg1031<def> = REG_SEQUENCE %reg1029<kill>, 5, %reg1030<kill>, 6
> =>
> %reg1031:5<def>, %reg1031:6<def> = VLD1q16 %reg1024<kill>, ...
> 
> PHI elimination now does more than phi elimination. It is really a de-SSA pass.

Except for the de-SSA bit, this really has nothing to do with phi elimination. Since you are adding a full iteration over all instructions anyway, you might as well create a new pass.

Alternatively, stick the code in TwoAddressInstructionPass. That is also "de-SSA", and it already has a full instruction scan, so you can save a bit of compile time.

Putting extra functionality in PHIElimination also further breaks StrongPHIElimination.

> +      if (MI.getOpcode() != TargetOpcode::REG_SEQUENCE)

if (!MI.isRegSequence())

/jakob





More information about the llvm-commits mailing list