This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Make CSE path following use the CFG
- From: Eric Botcazou <ebotcazou at libertysurf dot fr>
- To: Steven Bosscher <stevenb dot gcc at gmail dot com>
- Cc: gcc-patches at gcc dot gnu dot org, "Sayle, Roger" <roger at eyesopen dot com>
- Date: Mon, 11 Dec 2006 16:34:35 +0100
- Subject: Re: [PATCH] Make CSE path following use the CFG
- References: <200612070012.39638.steven@gcc.gnu.org>
> * Without -fcse-follow-jumps, CSE is now purely a local pass. It
> is easy to revert this to the current behavior, but the change
> is deliberate: It gives a rather nice speedup at -O1, and most
> of the things that CSE does are local anyway so the effect on
> the generated code is not that large.
You still invoke cse_find_path when flag_cse_follow_jumps is false, which
is a sheer waste of time. Moreover, AFAICS you didn't document the change.
> (cse_main): Rewrite. Look for extended basic block headers
> and call cse_extended_basic_block on them until all paths that
> start at this header are exhausted.
/* Get a reasonable extimate for the maximum number of qty's
needed for this path. For this, we take the number of sets
and multiply that by MAX_RECOG_OPERANDS. */
max_qty = ebb_data.nsets * MAX_RECOG_OPERANDS;
You have replaced the 15-year-old trick with yours so you should explain
the heuristics, the second sentence above being by no means such an
explanation.
> (rest_of_handle_cse): Verify that the CFG is incrementally updated
> and correct after cse_main.
You merged some left-overs at the beginning of the function.
This apparently broke Ada on i586:
/home/eric/build/gcc/native32/./gcc/xgcc
-B/home/eric/build/gcc/native32/./gcc/-B/home/eric/install/gcc/i586-suse-linux/bin/
-B/home/eric/install/gcc/i586-suse-linux/lib/
-isystem /home/eric/install/gcc/i586-suse-linux/include
-isystem /home/eric/install/gcc/i586-suse-linux/sys-include -c -g -O2 -fPIC
-W -Wall -gnatpg a-nlcefu.ads -o a-nlcefu.o
+===========================GNAT BUG DETECTED==============================+
| 4.3.0 20061211 (experimental) (i586-suse-linux-gnu) GCC error: |
| in rest_of_handle_cse, at cse.c:6975 |
| Error detected at a-ngcefu.adb:710:1 [a-nlcefu.ads:19:1] |
| Please submit a bug report; see http://gcc.gnu.org/bugs.html. |
| Use a subject line meaningful to you and us to track the bug. |
| Include the entire contents of this bug box in the report. |
| Include the exact gcc or gnatmake command that you entered. |
| Also include sources listed below in gnatchop format |
| (concatenated together with no headers between files). |
+==========================================================================
I'll try to find out why.
--
Eric Botcazou