aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/Utils/SimplifyCFG.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2009-02-03 22:12:02 +0000
committerDevang Patel <dpatel@apple.com>2009-02-03 22:12:02 +0000
commit383d7ed9158576aef5cde872548225a17e3c0155 (patch)
tree68076b06841e239883e4a85fb09fc3ec202195ee /lib/Transforms/Utils/SimplifyCFG.cpp
parent28aa5de050e0f43617f2b5cce65edc8827f3e2f1 (diff)
Do not let dbg intrinsic block folding of two entry phi node.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63671 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils/SimplifyCFG.cpp')
-rw-r--r--lib/Transforms/Utils/SimplifyCFG.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Transforms/Utils/SimplifyCFG.cpp b/lib/Transforms/Utils/SimplifyCFG.cpp
index d891eebf33..9f5df98fc0 100644
--- a/lib/Transforms/Utils/SimplifyCFG.cpp
+++ b/lib/Transforms/Utils/SimplifyCFG.cpp
@@ -15,6 +15,7 @@
#include "llvm/Transforms/Utils/Local.h"
#include "llvm/Constants.h"
#include "llvm/Instructions.h"
+#include "llvm/IntrinsicInst.h"
#include "llvm/Type.h"
#include "llvm/DerivedTypes.h"
#include "llvm/Support/CFG.h"
@@ -1262,7 +1263,7 @@ static bool FoldTwoEntryPHINode(PHINode *PN) {
DomBlock = *pred_begin(Pred);
for (BasicBlock::iterator I = Pred->begin();
!isa<TerminatorInst>(I); ++I)
- if (!AggressiveInsts.count(I)) {
+ if (!AggressiveInsts.count(I) && !isa<DbgInfoIntrinsic>(I)) {
// This is not an aggressive instruction that we can promote.
// Because of this, we won't be able to get rid of the control
// flow, so the xform is not worth it.
@@ -1276,7 +1277,7 @@ static bool FoldTwoEntryPHINode(PHINode *PN) {
DomBlock = *pred_begin(Pred);
for (BasicBlock::iterator I = Pred->begin();
!isa<TerminatorInst>(I); ++I)
- if (!AggressiveInsts.count(I)) {
+ if (!AggressiveInsts.count(I) && !isa<DbgInfoIntrinsic>(I)) {
// This is not an aggressive instruction that we can promote.
// Because of this, we won't be able to get rid of the control
// flow, so the xform is not worth it.