SIL: remove SILValue::getDef and add a cast operator to ValueBase * as a repelacement. NFC.

This commit is contained in:
Erik Eckstein
2016-01-25 15:00:24 -08:00
parent aef0a11a7c
commit 74d44b74e7
63 changed files with 255 additions and 262 deletions

View File

@@ -227,7 +227,7 @@ SILValue CheckedCastBrJumpThreading::isArgValueEquivalentToCondition(
return SILValue();
// Have we visited this BB already?
if (!SeenValues.insert(Value.getDef()).second)
if (!SeenValues.insert(Value).second)
return SILValue();
if (SeenValues.size() > 10)
@@ -248,12 +248,12 @@ SILValue CheckedCastBrJumpThreading::isArgValueEquivalentToCondition(
// Values should be the same
if (!Def)
Def = Value.getDef();
Def = Value;
if (Def != Value.getDef())
if (Def != Value)
return SILValue();
if (!DT->dominates(DomBB, Value.getDef()->getParentBB()))
if (!DT->dominates(DomBB, Value->getParentBB()))
return SILValue();
// OK, this value is a potential candidate
}