diff options
author | Alexandre Oliva <aoliva@redhat.com> | 2012-02-25 12:09:27 +0000 |
---|---|---|
committer | Alexandre Oliva <aoliva@gcc.gnu.org> | 2012-02-25 12:09:27 +0000 |
commit | 0e22465644731d86e2d317bf5fbfab2a76eccc9c (patch) | |
tree | 6ab41affb99d878e95476613024ed2c4536fa5c6 /gcc/var-tracking.c | |
parent | 2ef7cdff1ee32d6fd8397d6229cc6410cb475ee0 (diff) | |
download | gcc-0e22465644731d86e2d317bf5fbfab2a76eccc9c.tar.gz |
re PR debug/52001 (Huge compile-time regression with var-tracking)
PR debug/52001
* cselib.c (preserve_only_constants): Rename to...
(preserve_constants_and_equivs): ... this. Split out...
(invariant_or_equiv_p): ... this. Preserve plus expressions
of other preserved expressions too.
(cselib_reset_table): Adjust.
* var-tracking.c (reverse_op): Use canonical value to build
reverse operation.
From-SVN: r184571
Diffstat (limited to 'gcc/var-tracking.c')
-rw-r--r-- | gcc/var-tracking.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/var-tracking.c b/gcc/var-tracking.c index e9b5ca886ae..c6280e2c1f1 100644 --- a/gcc/var-tracking.c +++ b/gcc/var-tracking.c @@ -5334,6 +5334,10 @@ reverse_op (rtx val, const_rtx expr, rtx insn) if (!v || !cselib_preserved_value_p (v)) return; + /* Use canonical V to avoid creating multiple redundant expressions + for different VALUES equivalent to V. */ + v = canonical_cselib_val (v); + /* Adding a reverse op isn't useful if V already has an always valid location. Ignore ENTRY_VALUE, while it is always constant, we should prefer non-ENTRY_VALUE locations whenever possible. */ |