aboutsummaryrefslogtreecommitdiff
path: root/gcc/dse.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2011-03-17 13:35:04 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2011-03-17 13:35:04 +0100
commit1b6fa86002afb4a8f28ab40afc812ec5e73ccba6 (patch)
treef38d80304975154c0fc076b80fccc2023ac48021 /gcc/dse.c
parentcb21e9cdf7176be9c23c3a003822cf7a3d3f4995 (diff)
downloadgcc-1b6fa86002afb4a8f28ab40afc812ec5e73ccba6.zip
gcc-1b6fa86002afb4a8f28ab40afc812ec5e73ccba6.tar.gz
gcc-1b6fa86002afb4a8f28ab40afc812ec5e73ccba6.tar.bz2
re PR rtl-optimization/48141 (DSE compile time hog)
PR rtl-optimization/48141 * dse.c (record_store): If no positions are needed in an insn that cannot be deleted, at least unchain it from active_local_stores. * gcc.dg/pr48141.c: New test. From-SVN: r171089
Diffstat (limited to 'gcc/dse.c')
-rw-r--r--gcc/dse.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/dse.c b/gcc/dse.c
index 8e9b645..e43ab72 100644
--- a/gcc/dse.c
+++ b/gcc/dse.c
@@ -1,5 +1,5 @@
/* RTL dead store elimination.
- Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010
+ Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011
Free Software Foundation, Inc.
Contributed by Richard Sandiford <rsandifor@codesourcery.com>
@@ -1530,8 +1530,7 @@ record_store (rtx body, bb_info_t bb_info)
/* An insn can be deleted if every position of every one of
its s_infos is zero. */
- if (any_positions_needed_p (s_info)
- || ptr->cannot_delete)
+ if (any_positions_needed_p (s_info))
del = false;
if (del)
@@ -1543,7 +1542,8 @@ record_store (rtx body, bb_info_t bb_info)
else
active_local_stores = ptr->next_local_store;
- delete_dead_store_insn (insn_to_delete);
+ if (!insn_to_delete->cannot_delete)
+ delete_dead_store_insn (insn_to_delete);
}
else
last = ptr;