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:
a022bdf
)
After early-lowering the FORMAL_ARGUMENTS node, delete it.
author
Dan Gohman
<gohman@apple.com>
Mon, 21 Jul 2008 21:04:07 +0000
(21:04 +0000)
committer
Dan Gohman
<gohman@apple.com>
Mon, 21 Jul 2008 21:04:07 +0000
(21:04 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53874
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 b500b6ab6b3f771b1c5382dd8a7254f6ae8d0740..12c54c1eeff175b9f1ab8bbc100423b8ab46cd11 100644
(file)
--- a/
lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ b/
lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
@@
-4686,6
+4686,13
@@
void TargetLowering::LowerArguments(Function &F, SelectionDAG &DAG,
(Result->getNumValues()+1 == TmpRes.Val->getNumValues() &&
TmpRes.getValue(Result->getNumValues()).getValueType() == MVT::Flag))
&& "Lowering produced unexpected number of results!");
+
+ // The FORMAL_ARGUMENTS node itself is likely no longer needed.
+ if (Result != TmpRes.Val && Result->use_empty()) {
+ HandleSDNode Dummy(DAG.getRoot());
+ DAG.RemoveDeadNode(Result);
+ }
+
Result = TmpRes.Val;
unsigned NumArgRegs = Result->getNumValues() - 1;