unindent switch body.

Swift SVN r13344
This commit is contained in:
Chris Lattner
2014-02-03 06:57:03 +00:00
parent cc6783cc85
commit 11d93d0f18

View File

@@ -791,41 +791,41 @@ void AllocOptimize::explodeCopyAddr(CopyAddrInst *CAI) {
// iterates, so we can't use a foreach loop.
for (auto *NewInst : NewInsts) {
switch (NewInst->getKind()) {
default:
NewInst->dump();
assert(0 && "Unknown instruction generated by copy_addr lowering");
case ValueKind::StoreInst:
// If it is a store to the memory object (as oppose to a store to
// something else), track it as an access.
if (StoreUse.isValid()) {
StoreUse.Inst = NewInst;
NonLoadUses[NewInst] = Uses.size();
Uses.push_back(StoreUse);
}
continue;
case ValueKind::LoadInst:
// If it is a load from the memory object (as oppose to a load from
// something else), track it as an access. We need to explictly check to
// see if the load accesses "TheMemory" because it could either be a load
// for the copy_addr source, or it could be a load corresponding to the
// "assign" operation on the destination of the copyaddr.
if (LoadUse.isValid() &&
getAccessPathRoot(NewInst->getOperand(0)).getDef() == TheMemory) {
LoadUse.Inst = NewInst;
Uses.push_back(LoadUse);
}
continue;
case ValueKind::CopyValueInst:
case ValueKind::StrongRetainInst:
case ValueKind::StrongReleaseInst:
case ValueKind::UnownedRetainInst:
case ValueKind::UnownedReleaseInst:
case ValueKind::DestroyValueInst: // Destroy overwritten value
// These are ignored.
continue;
default:
NewInst->dump();
assert(0 && "Unknown instruction generated by copy_addr lowering");
case ValueKind::StoreInst:
// If it is a store to the memory object (as oppose to a store to
// something else), track it as an access.
if (StoreUse.isValid()) {
StoreUse.Inst = NewInst;
NonLoadUses[NewInst] = Uses.size();
Uses.push_back(StoreUse);
}
continue;
case ValueKind::LoadInst:
// If it is a load from the memory object (as oppose to a load from
// something else), track it as an access. We need to explictly check to
// see if the load accesses "TheMemory" because it could either be a load
// for the copy_addr source, or it could be a load corresponding to the
// "assign" operation on the destination of the copyaddr.
if (LoadUse.isValid() &&
getAccessPathRoot(NewInst->getOperand(0)).getDef() == TheMemory) {
LoadUse.Inst = NewInst;
Uses.push_back(LoadUse);
}
continue;
case ValueKind::CopyValueInst:
case ValueKind::StrongRetainInst:
case ValueKind::StrongReleaseInst:
case ValueKind::UnownedRetainInst:
case ValueKind::UnownedReleaseInst:
case ValueKind::DestroyValueInst: // Destroy overwritten value
// These are ignored.
continue;
}
}
}