This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Ordering of splitting passes

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 ();

The problem is, shorten_branch doesn't split insns any longer because of

Fri Jun  8 21:34:54 CEST 2001  Jan Hubicka  <>

	* 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  <>

	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.
	* reg-stack.c (reg_to_stack): Do not rebuild if not needed; do
	* toplev.c (enum dump_file_index): Kill DFI_jump2; put DFI_stack before
	(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 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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]