summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-04-25 18:27:55 +0000
committerDan Gohman <gohman@apple.com>2008-04-25 18:27:55 +0000
commitca95a5f49f976c45ef931a4eca8d1ec2e3f1738b (patch)
treedb27b120fee1f7cb62d2955d9b9d8f85a22c09f3 /llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp
parent6d653b58f994b13f84f71dfaacfa5249cd6de20e (diff)
downloadbcm5719-llvm-ca95a5f49f976c45ef931a4eca8d1ec2e3f1738b.tar.gz
bcm5719-llvm-ca95a5f49f976c45ef931a4eca8d1ec2e3f1738b.zip
Remove the code from CodeGenPrepare that moved getresult instructions
to the block that defines their operands. This doesn't work in the case that the operand is an invoke, because invoke is a terminator and must be the last instruction in a block. Replace it with support in SelectionDAGISel for copying struct values into sequences of virtual registers. llvm-svn: 50279
Diffstat (limited to 'llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp9
1 files changed, 0 insertions, 9 deletions
diff --git a/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp b/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp
index 532af2511e1..4be37a33cf4 100644
--- a/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp
+++ b/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp
@@ -1127,15 +1127,6 @@ bool CodeGenPrepare::OptimizeBlock(BasicBlock &BB) {
// Sink address computing for memory operands into the block.
MadeChange |= OptimizeInlineAsmInst(I, &(*CI), SunkAddrs);
}
- } else if (GetResultInst *GRI = dyn_cast<GetResultInst>(I)) {
- // Ensure that all getresult instructions live in the same basic block
- // as their associated struct-value instructions. Codegen requires
- // this, as lowering only works on one basic block at a time.
- if (Instruction *Agg = dyn_cast<Instruction>(GRI->getAggregateValue())) {
- BasicBlock *AggBB = Agg->getParent();
- if (AggBB != GRI->getParent())
- GRI->moveBefore(AggBB->getTerminator());
- }
}
}
OpenPOWER on IntegriCloud