projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4065ef9
)
We might as well strip off any CPRs before propagation
author
Chris Lattner
<sabre@nondot.org>
Thu, 23 Oct 2003 18:49:23 +0000
(18:49 +0000)
committer
Chris Lattner
<sabre@nondot.org>
Thu, 23 Oct 2003 18:49:23 +0000
(18:49 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9437
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Transforms/IPO/IPConstantPropagation.cpp
patch
|
blob
|
history
diff --git
a/lib/Transforms/IPO/IPConstantPropagation.cpp
b/lib/Transforms/IPO/IPConstantPropagation.cpp
index dc8698e1622d13179a5edc9e5813a4820ccafcd9..bb21f11ffc3e88b16b64cdb7e4e3338cf3b4a6a2 100644
(file)
--- a/
lib/Transforms/IPO/IPConstantPropagation.cpp
+++ b/
lib/Transforms/IPO/IPConstantPropagation.cpp
@@
-103,7
+103,10
@@
bool IPCP::processFunction(Function &F) {
// Do we have a constant argument!?
if (!ArgumentConstants[i].second) {
assert(ArgumentConstants[i].first && "Unknown constant value!");
- AI->replaceAllUsesWith(ArgumentConstants[i].first);
+ Value *V = ArgumentConstants[i].first;
+ if (ConstantPointerRef *CPR = dyn_cast<ConstantPointerRef>(V))
+ V = CPR->getValue();
+ AI->replaceAllUsesWith(V);
++NumArgumentsProped;
}
return true;