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

@@ -431,7 +431,7 @@ mayGuaranteedUseValue(SILInstruction *User, SILValue Ptr, AliasAnalysis *AA) {
if (!Params[i].isGuaranteed())
continue;
SILValue Op = FAS.getArgument(i);
if (!AA->isNoAlias(Op, Ptr.getDef()))
if (!AA->isNoAlias(Op, Ptr))
return true;
}
@@ -561,7 +561,7 @@ static bool addLastUse(SILValue V, SILBasicBlock *BB,
ReleaseTracker &Tracker) {
for (auto I = BB->rbegin(); I != BB->rend(); ++I) {
for (auto &Op : I->getAllOperands())
if (Op.get().getDef() == V.getDef()) {
if (Op.get() == V) {
Tracker.trackLastRelease(&*I);
return true;
}