[llvm-commits] [llvm] r73727 - /llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp
Evan Cheng
evan.cheng at apple.com
Thu Jun 18 15:35:39 PDT 2009
On Jun 18, 2009, at 3:01 PM, Lang Hames wrote:
> Author: lhames
> Date: Thu Jun 18 17:01:47 2009
> New Revision: 73727
>
> URL: http://llvm.org/viewvc/llvm-project?rev=73727&view=rev
> Log:
> Improved PHI def marking, replaced some gotos with breaks.
>
> Modified:
> llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp
>
> Modified: llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp?rev=73727&r1=73726&r2=73727&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp (original)
> +++ llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp Thu Jun 18
> 17:01:47 2009
> @@ -584,7 +584,7 @@
>
> // Replace the interval with one of a NEW value number.
> Note that this
> // value number isn't actually defined by an instruction,
> weird huh? :)
Please clarify the comment. VN# defined by a phi has imprecise def
number that points to the start of the BB?
Evan
> - LiveRange LR(Start, End, interval.getNextValue(0, 0, false,
> VNInfoAllocator));
> + LiveRange LR(Start, End, interval.getNextValue(Start, 0,
> false, VNInfoAllocator));
> LR.valno->setIsPHIDef(true);
> DOUT << " replace range with " << LR;
> interval.addRange(LR);
> @@ -753,7 +753,7 @@
> DOUT << " killed";
> end = getUseIndex(baseIndex) + 1;
> SeenDefUse = true;
> - goto exit;
> + break;
> } else if (mi->modifiesRegister(interval.reg, tri_)) {
> // Another instruction redefines the register before it is
> ever read.
> // Then the register is essentially dead at the instruction
> that defines
> @@ -762,7 +762,7 @@
> DOUT << " dead";
> end = getDefIndex(start) + 1;
> SeenDefUse = true;
> - goto exit;
> + break;
> }
>
> baseIndex += InstrSlots::NUM;
> @@ -774,7 +774,6 @@
> }
> }
>
> -exit:
> // Live-in register might not be used at all.
> if (!SeenDefUse) {
> if (isAlias) {
> @@ -786,7 +785,10 @@
> }
> }
>
> - LiveRange LR(start, end, interval.getNextValue(0, 0, false,
> VNInfoAllocator));
> + VNInfo *vni = interval.getNextValue(start, 0, false,
> VNInfoAllocator);
> + vni->setIsPHIDef(true);
> + LiveRange LR(start, end, vni);
> +
> interval.addRange(LR);
> interval.addKill(LR.valno, end);
> DOUT << " +" << LR << '\n';
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list