SIL: remove multiple result values from SILValue

As there are no instructions left which produce multiple result values, this is a NFC regarding the generated SIL and generated code.
Although this commit is large, most changes are straightforward adoptions to the changes in the ValueBase and SILValue classes.
This commit is contained in:
Erik Eckstein
2016-01-21 10:30:18 -08:00
parent e01fb6d587
commit 2db6f3d213
76 changed files with 949 additions and 1506 deletions

View File

@@ -142,7 +142,7 @@ protected:
if (auto *Arg = dyn_cast<SILArgument>(V))
return Arg->getType().isObject();
if (auto *Inst = dyn_cast<SILInstruction>(V))
return Inst->getNumTypes() == 1 && Inst->getType(0).isObject();
return Inst->hasValue() && Inst->getType().isObject();
return false;
}
@@ -634,7 +634,7 @@ static bool isTransitiveSafeUser(SILInstruction *I) {
case ValueKind::EnumInst:
case ValueKind::UncheckedRefCastInst:
case ValueKind::UncheckedBitwiseCastInst:
assert(I->getNumTypes() == 1 && "We assume these are unary");
assert(I->hasValue() && "We assume these are unary");
return true;
default:
return false;
@@ -2069,10 +2069,7 @@ protected:
// Update outside used instruction values.
for (auto &Inst : *OrigBB) {
for (unsigned i = 0, e = Inst.getNumTypes(); i != e; ++i) {
SILValue V(&Inst, i);
updateSSAForValue(OrigBB, V, SSAUp);
}
updateSSAForValue(OrigBB, &Inst, SSAUp);
}
}
}
@@ -2152,7 +2149,7 @@ createFastNativeArraysCheck(SmallVectorImpl<ArraySemanticsCall> &ArrayProps,
auto Loc = (*Call).getLoc();
auto CallKind = Call.getKind();
if (CallKind == ArrayCallKind::kArrayPropsIsNativeTypeChecked) {
auto Val = createStructExtract(B, Loc, SILValue(Call, 0), 0);
auto Val = createStructExtract(B, Loc, SILValue(Call), 0);
Result = createAnd(B, Loc, Result, Val);
}
}