diff options
| author | Dan Gohman <gohman@apple.com> | 2007-03-22 16:38:57 +0000 |
|---|---|---|
| committer | Dan Gohman <gohman@apple.com> | 2007-03-22 16:38:57 +0000 |
| commit | dcb291faa4e15d0e0873e76d844d0535ac348afe (patch) | |
| tree | bc1ad467f377cbb8d0f9ccae56b27586d660c920 /llvm/lib/Transforms/Scalar/InstructionCombining.cpp | |
| parent | 085b8d7ae2f8a3ce28f2da0b33a6b9e734c70823 (diff) | |
| download | bcm5719-llvm-dcb291faa4e15d0e0873e76d844d0535ac348afe.tar.gz bcm5719-llvm-dcb291faa4e15d0e0873e76d844d0535ac348afe.zip | |
Change uses of Function::front to Function::getEntryBlock for readability.
llvm-svn: 35265
Diffstat (limited to 'llvm/lib/Transforms/Scalar/InstructionCombining.cpp')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/InstructionCombining.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp index 1523f01f377..12f02f758ec 100644 --- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp @@ -9946,7 +9946,8 @@ static bool TryToSinkInstruction(Instruction *I, BasicBlock *DestBlock) { if (isa<PHINode>(I) || I->mayWriteToMemory()) return false; // Do not sink alloca instructions out of the entry block. - if (isa<AllocaInst>(I) && I->getParent() == &DestBlock->getParent()->front()) + if (isa<AllocaInst>(I) && I->getParent() == + &DestBlock->getParent()->getEntryBlock()) return false; // We can only sink load instructions if there is nothing between the load and |

