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:
1a84bd3
)
Don't sink argument loads into loops or other bad places. This disables folding...
author
Chris Lattner
<sabre@nondot.org>
Thu, 17 Feb 2005 19:40:32 +0000
(19:40 +0000)
committer
Chris Lattner
<sabre@nondot.org>
Thu, 17 Feb 2005 19:40:32 +0000
(19:40 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20228
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
patch
|
blob
|
history
diff --git
a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
index e5266c294f86ea0d1ceeb01811cc26a1a09e16c9..285f810bfbeb64fb3614552848583a0cb2d3420a 100644
(file)
--- a/
lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ b/
lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
@@
-852,7
+852,14
@@
static BasicBlock *IsOnlyUsedInOneBasicBlock(Argument *A) {
++UI)
if (isa<PHINode>(*UI) || cast<Instruction>(*UI)->getParent() != BB)
return 0; // Disagreement among the users?
- return BB;
+
+ // Okay, there is a single BB user. Only permit this optimization if this is
+ // the entry block, otherwise, we might sink argument loads into loops and
+ // stuff. Later, when we have global instruction selection, this won't be an
+ // issue clearly.
+ if (BB == BB->getParent()->begin())
+ return BB;
+ return 0;
}
void SelectionDAGISel::