aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
diff options
context:
space:
mode:
authorJim Laskey <jlaskey@mac.com>2006-10-17 19:33:52 +0000
committerJim Laskey <jlaskey@mac.com>2006-10-17 19:33:52 +0000
commit26f7fa7bba94eb18bf0e43586dd2b596cb58ca80 (patch)
tree6708a40e03a0bc00223f823b7a2689133101dfcb /lib/CodeGen/SelectionDAG/DAGCombiner.cpp
parent3f3a6f6c3b6b178602a1246e62ed1e6c5d9631de (diff)
Make it simplier to dump DAGs while in DAGCombiner. Remove a nasty optimization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31009 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/DAGCombiner.cpp')
-rw-r--r--lib/CodeGen/SelectionDAG/DAGCombiner.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index 474ae281f9..997820dd64 100644
--- a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -49,7 +49,7 @@ namespace {
static cl::opt<bool>
CombinerAA("combiner-alias-analysis", cl::Hidden,
- cl::desc("Turn on alias analysis turning testing"));
+ cl::desc("Turn on alias analysis during testing"));
//------------------------------ DAGCombiner ---------------------------------//
@@ -388,6 +388,9 @@ void DAGCombiner::Run(bool RunningAfterLegalize) {
// changes of the root.
HandleSDNode Dummy(DAG.getRoot());
+ // The root of the dag may dangle to deleted nodes until the dag combiner is
+ // done. Set it to null to avoid confusion.
+ DAG.setRoot(SDOperand());
/// DagCombineInfo - Expose the DAG combiner to the target combiner impls.
TargetLowering::DAGCombinerInfo
@@ -2759,13 +2762,6 @@ SDOperand DAGCombiner::visitSTORE(SDNode *N) {
}
if (CombinerAA) {
- // If the store ptr is a frame index and the frame index has a use of one
- // and this is a return block, then the store is redundant.
- if (Ptr.hasOneUse() && isa<FrameIndexSDNode>(Ptr) &&
- DAG.getRoot().getOpcode() == ISD::RET) {
- return Chain;
- }
-
// Walk up chain skipping non-aliasing memory nodes.
SDOperand BetterChain = FindBetterChain(N, Chain);