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]

Re: [PATCH]: Fix scheduler priorities update

Maxim Kuvyrkov wrote:


While testing my other patch I came across a bug in IA64 speculation support in scheduler. The problem is in priorities update mechanism that is used to calculate proper priorities after speculative movement of an instruction. The speculative movement discards some of the insn's dependencies which in turn might affect the priorities of insn's former producers. The bug is that not all producers get their priorities updated.

The attached patch fixes this problem and was bootstrapped and now being regtested on {x86_64, ia64}-linux-gnu.

:ADDPATCH scheduler:




First I'd change name INSN_PRIORITY_KNOWN on INSN_PRIORITY_STATUS. It is better reflect its name for your patch.

Then you could use INSN_PRIORITY_KNOWN instead of INSN_PRIORITY_KNOWN_P (but this is not necessary for the patch approval).

2007-04-11 Maxim Kuvyrkov <>

* haifa-sched.c (vec.h): New include.

You don't need this because vec.h goes with rtl.h. Please remove it.

	(rtx_vec_t): New typedef.
	(contributes_to_priority_p): Extract piece of priority () into new
	static function.
	(priority): Add assertion.

I'd write
                 (priority): Use the function.  Add assertion.

	(rank_for_schedule, set_priorities): Add assertion to check that
	insn's priority is initialized.
	(clear_priorities, calc_priorities): Change signature.  Make it update
	all relevant insns.  Update all callers.

I'd write all callers (add_to_speculative_block, create_block_check_twin) as entries.

* sched-int.h (struct haifa_insn_data): Change type of 'priority_known'
field from a 1-bit field to 'signed char'.
* config/rs6000.c (rs6000_sched_reorder2): Use it instead of
* (haifa-sched.o): New dependency.

You don't need to change because again it is in $(RTL). Please don't change

Ok for the trunk with the mentioned changes.

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