Introduce a new SIL-level "undef" value, useful for SIL transformations.

IRGen support is missing, Joe volenteers to implement it.


Swift SVN r9776
This commit is contained in:
Chris Lattner
2013-10-30 00:58:09 +00:00
parent 7ce3892588
commit ef93c81ffb
15 changed files with 120 additions and 26 deletions

View File

@@ -96,7 +96,7 @@ static bool eraseAndCleanup(const llvm::DenseSet<SILInstruction*> &ToBeDeleted){
for (auto II = ToBeDeleted.begin(), EI = ToBeDeleted.end(); II != EI; ++II) {
// Deleting instructions might make their operands dead, let's collect them.
SILInstruction* DI = *II;
SILInstruction *DI = *II;
ArrayRef<Operand> Ops = DI->getAllOperands();
for (auto OpI = Ops.begin(), OpE = Ops.end(); OpI != OpE; ++OpI) {
SILInstruction *V = dyn_cast_or_null<SILInstruction>(OpI->get().getDef());
@@ -105,7 +105,7 @@ static bool eraseAndCleanup(const llvm::DenseSet<SILInstruction*> &ToBeDeleted){
PossiblyDead.insert(V);
}
// Drop references for all the instrcutions that will be deleted.
// Drop references for all the instructions that will be deleted.
DI->dropAllReferences();
}