Ordering of splitting passes
Eric Botcazou
ebotcazou@libertysurf.fr
Tue Oct 7 07:31:00 GMT 2003
Hello Jan,
We ICE for PR opt/12510 (a regression on the 3.3 branch) in final.c:
#ifdef HAVE_ATTR_length
/* This instruction should have been split in shorten_branches,
to ensure that we would have valid length info for the
splitees. */
abort ();
#endif
The problem is, shorten_branch doesn't split insns any longer because of
Fri Jun 8 21:34:54 CEST 2001 Jan Hubicka <jh@suse.cz>
* function.c (diddle_return_value): Kill code to determine
return value before expand_function_end.
(expand_function_end): Delay call to clobber_return_register
after fucntion return value is computed.
Re-install temporary reverted patch:
* toplev.c (rest_of_compilation): Call split_all_insns
before reg-stack and shorten-branches. Do shorten-branches
after reg-stack.
* final.c (shorten_branches): Remove insn splitting code.
but the patch preserves the number and ordering of splitting passes so I
don't think it causes any harm.
Then this one
Sun Jul 15 00:50:20 CEST 2001 Jan Hubicka <jh@suse.cz>
Re-install recently reverted patch.
* emit-rtl.c (try_split): Update mark_jump_label call.
* flow.c (find_sub_basic_blocks): Likewise.
* jump.c (cross_jump_death_matters, find_cross_jump, do_cross_jump,
jump_back_p): Kill.
(mark_all_labels): Kill second parameter.
(jump_optimize, jump_optimize_1): Kill cross_jump parameter.
(rebuild_jump_labels, jump_optimize_minimal): Update call
of jump_optimize_1.
(jump_optimize_1): Kill crossjumping code.
(mark_jump_label): Kill cross_jump parameter.
* rtl.h (mark_jump_label, jump_optimize): Update prototypes.
(JUMP_CROSS_JUMP, JUMP_CROSS_JUMP_DEATH_MATTERS): Kill.
* reg-stack.c (reg_to_stack): Do not rebuild if not needed; do
splitting.
* toplev.c (enum dump_file_index): Kill DFI_jump2; put DFI_stack before
DFI_bpro.
(dump_file_info): Likewise.
(rest_of_compilation): Update calls to jump_optimize; kill jump2 pass;
reorganize passes to do reg-stack first, bb-reorder second.
* invoke.texi (-d letters doc): Remove the jump2 pass.
is vicious, because it breaks apart the call to split_all_insns that is
attached to #ifdef STACK_REGS and the call to reg_to_stack itself (without
documenting it in the ChangeLog) and put the sched2 pass between them.
But this one
Wed Feb 26 20:29:33 CET 2003 Jan Hubicka <jh at suse dot cz>
* reg-stack.c (reg_to_stack): Don't split insns.
* toplev.c (rest_of_compilation): rearange insn splitting passes.
is evil (it is *not* documented in the ChangeLog at all, the message is at
http://gcc.gnu.org/ml/gcc-patches/2003-02/msg02260.html) because it hoists
the now separate call to split_all_insns that is attached to #ifdef
STACK_REGS four passes up. And of course it turns out that one of these
passes (flow2) creates insns that must be splitted.
The obvious fix for PR opt/12510 is to revert patch #3. But I think the real
question is: why did you choose to break apart the call to split_all_insns
that is attached to #ifdef STACK_REGS and the call to reg_to_stack itself in
patch #2?
--
Eric Botcazou
More information about the Gcc
mailing list