This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
reg-stack strikes back
- To: gcc-patches at gcc dot gnu dot org, rth at cygnus dot com
- Subject: reg-stack strikes back
- From: Jan Hubicka <jh at suse dot cz>
- Date: Thu, 7 Jun 2001 15:59:04 +0200
Hi,
I've found that my previous change breaks bootstrap on some platforms, as
split_all_insns uses flowgraph, that is already damaged by jump optimization.
This is quite unfortunate. I've decided to fix it by doing the flowgraph
construction in from of split_all_insns call. On i386 this is not loss,
since we rebuild flowgraph in reg-stack afterward anyway. On other platforms
this can be slight performance loss, but I don't expect much.
In longer term, we would like to kill flow-unaware jump pass anyway. Perhaps
I can give it priority now.
Alternate way is to fix problem by writing new instruction splitter loop
that. I can do it if you consider it better, but I've decided to install
this one-liner as obvious to avoid people from running into bootstrap troubles
once testing finishes.
I will wait for approval with patch removing find_basic_blocks from reg-stack
and any futher progress in this direction.
Honza
Thu Jun 7 15:53:09 CEST 2001 Jan Hubicka <jh@suse.cz>
* toplev.c (rest_of_compilation): rebuild flowgraph before
split_all_insns call.
Index: toplev.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/toplev.c,v
retrieving revision 1.464
diff -c -3 -p -r1.464 toplev.c
*** toplev.c 2001/06/07 11:23:32 1.464
--- toplev.c 2001/06/07 13:53:02
*************** rest_of_compilation (decl)
*** 3694,3700 ****
|| 1
#endif
)
! split_all_insns (0);
timevar_pop (TV_SHORTEN_BRANCH);
#ifdef STACK_REGS
--- 3694,3703 ----
|| 1
#endif
)
! {
! find_basic_blocks (get_insns (), max_reg_num (), NULL);
! split_all_insns (0);
! }
timevar_pop (TV_SHORTEN_BRANCH);
#ifdef STACK_REGS