Chromium Code Reviews| Index: src/IceCfg.cpp |
| diff --git a/src/IceCfg.cpp b/src/IceCfg.cpp |
| index 83d8e2664cd70cc9b4cea2fcc69e12af943a0a6f..6ef85b2c9c96821f980ca656920df82ebd0b6719 100644 |
| --- a/src/IceCfg.cpp |
| +++ b/src/IceCfg.cpp |
| @@ -205,9 +205,9 @@ void Cfg::liveness(LivenessMode Mode) { |
| // Collect timing for just the portion that constructs the live |
| // range intervals based on the end-of-live-range computation, for a |
| // finer breakdown of the cost. |
| + TimerMarker T1(TimerStack::TT_liveRange, this); |
| // Make a final pass over instructions to delete dead instructions |
| // and build each Variable's live range. |
| - TimerMarker T1(TimerStack::TT_liveRange, this); |
| for (CfgNode *Node : Nodes) |
| Node->livenessPostprocess(Mode, getLiveness()); |
| if (Mode == Liveness_Intervals) { |
| @@ -246,7 +246,6 @@ void Cfg::liveness(LivenessMode Mode) { |
| if (Var->getWeight().isInf()) |
| Var->setLiveRangeInfiniteWeight(); |
| } |
| - dump(); |
| } |
| } |
| @@ -263,14 +262,14 @@ bool Cfg::validateLiveness() const { |
| if (llvm::isa<InstFakeKill>(Inst)) |
| continue; |
| InstNumberT InstNumber = Inst->getNumber(); |
| - Variable *Dest = Inst->getDest(); |
| - if (Dest) { |
| + if (Variable *Dest = Inst->getDest()) { |
| // TODO: This instruction should actually begin Dest's live |
| // range, so we could probably test that this instruction is |
| // the beginning of some segment of Dest's live range. But |
| // this wouldn't work with non-SSA temporaries during |
|
jvoung (off chromium)
2014/10/13 20:50:50
with the new flag for non-SSA temporaries, could t
Jim Stichnoth
2014/10/13 23:15:22
Cool, done. There's a minor problem when a phi te
jvoung (off chromium)
2014/10/13 23:38:29
Thanks! Can the TODO be removed then?
Jim Stichnoth
2014/10/14 00:15:01
Oops, done.
|
| // lowering. |
| - if (!Dest->getLiveRange().containsValue(InstNumber)) { |
| + if (!Dest->getIgnoreLiveness() && |
| + !Dest->getLiveRange().containsValue(InstNumber)) { |
| Valid = false; |
| Str << "Liveness error: inst " << Inst->getNumber() << " dest "; |
| Dest->dump(this); |
| @@ -282,7 +281,8 @@ bool Cfg::validateLiveness() const { |
| SizeT NumVars = Src->getNumVars(); |
| for (SizeT J = 0; J < NumVars; ++J) { |
| const Variable *Var = Src->getVar(J); |
| - if (!Var->getLiveRange().containsValue(InstNumber)) { |
| + if (!Var->getIgnoreLiveness() && |
| + !Var->getLiveRange().containsValue(InstNumber)) { |
| Valid = false; |
| Str << "Liveness error: inst " << Inst->getNumber() << " var "; |
| Var->dump(this); |