diff options
author | Dan Gohman <gohman@apple.com> | 2008-04-25 18:27:55 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2008-04-25 18:27:55 +0000 |
commit | 23ce502cb7d9d06a1786d276a10be42e65759eca (patch) | |
tree | 482820194bec029a5af78518fd7f158d09966b95 /lib/Transforms/Scalar/CodeGenPrepare.cpp | |
parent | 80f5404e1868ebfddea65214310c451c30b500f2 (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50279 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/CodeGenPrepare.cpp')
-rw-r--r-- | lib/Transforms/Scalar/CodeGenPrepare.cpp | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/lib/Transforms/Scalar/CodeGenPrepare.cpp b/lib/Transforms/Scalar/CodeGenPrepare.cpp index 532af2511e..4be37a33cf 100644 --- a/lib/Transforms/Scalar/CodeGenPrepare.cpp +++ b/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()); - } } } |