OSDN Git Service
(root)
/
android-x86
/
external-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
97de92c
)
Do not move DBG_VALUE in middle of PHI nodes.
author
Devang Patel
<dpatel@apple.com>
Thu, 26 May 2011 22:43:14 +0000
(22:43 +0000)
committer
Devang Patel
<dpatel@apple.com>
Thu, 26 May 2011 22:43:14 +0000
(22:43 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132161
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Transforms/Scalar/CodeGenPrepare.cpp
patch
|
blob
|
history
diff --git
a/lib/Transforms/Scalar/CodeGenPrepare.cpp
b/lib/Transforms/Scalar/CodeGenPrepare.cpp
index
7ba92ba
..
da6bf31
100644
(file)
--- a/
lib/Transforms/Scalar/CodeGenPrepare.cpp
+++ b/
lib/Transforms/Scalar/CodeGenPrepare.cpp
@@
-557,7
+557,10
@@
bool CodeGenPrepare::OptimizeCallInst(CallInst *CI) {
if (DVI->getParent() != VI->getParent() || DT->dominates(DVI, VI)) {
DEBUG(dbgs() << "Moving Debug Value before :\n" << *DVI << ' ' << *VI);
DVI->removeFromParent();
- DVI->insertAfter(VI);
+ if (isa<PHINode>(VI))
+ DVI->insertBefore(VI->getParent()->getFirstNonPHI());
+ else
+ DVI->insertAfter(VI);
return true;
}