Bug 24853 - scheduling takes 40% or more time
Summary: scheduling takes 40% or more time
Status: NEW
Alias: None
Product: gcc
Classification: Unclassified
Component: rtl-optimization (show other bugs)
Version: 4.1.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: compile-time-hog
Depends on:
Blocks:
 
Reported: 2005-11-14 16:20 UTC by Paolo Bonzini
Modified: 2022-12-01 03:54 UTC (History)
1 user (show)

See Also:
Host:
Target: powerpc-apple-darwin8.2.0
Build:
Known to work:
Known to fail: 3.3.6, 3.4.5, 4.0.0, 4.1.0
Last reconfirmed: 2005-11-14 18:15:42


Attachments
file used for benchmarking (44.69 KB, application/x-gzip)
2005-11-14 16:22 UTC, Paolo Bonzini
Details
Patch (against 3.4.x) for controlling the explosion of the 1st scheduling pass. (1.86 KB, patch)
2005-11-14 18:50 UTC, Eric Botcazou
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Paolo Bonzini 2005-11-14 16:20:23 UTC
For current mainline and Apple 3.3/4.0, the top pass in the profile is

 scheduling            :  14.99 (42%) usr   4.32 (75%) sys  19.32 (46%) wall

Note that at -O0, instead, it is

 global alloc          :   1.06 (30%) usr   0.03 ( 5%) sys   1.09 (26%) wall

but I doubt we can do much about it.
Comment 1 Paolo Bonzini 2005-11-14 16:22:38 UTC
Created attachment 10234 [details]
file used for benchmarking
Comment 2 Paolo Bonzini 2005-11-14 18:12:49 UTC
Top of the profile:

105174    7.2325  cc1         cc1        sched_analyze_insn
98121     6.7475  cc1         cc1        free_deps
89078     6.1256  cc1         cc1        bitmap_set_bit
63000     4.3323  cc1         cc1        free_list
48690     3.3482  cc1         cc1        alloc_INSN_LIST
39632     2.7254  cc1         cc1        compute_global_livein
26382     1.8142  cc1         cc1        free_INSN_LIST_list
25567     1.7582  cc1         cc1        bitmap_bit_p
Comment 3 Eric Botcazou 2005-11-14 18:21:24 UTC
> For current mainline and Apple 3.3/4.0, the top pass in the profile is
> 
>  scheduling            :  14.99 (42%) usr   4.32 (75%) sys  19.32 (46%) wall

Is it the first scheduling pass?  If so, we have a patch at AdaCore to limit its explosion.
Comment 4 paolo.bonzini@lu.unisi.ch 2005-11-14 18:26:26 UTC
Subject: Re:  scheduling takes 40% or more time


>Is it the first scheduling pass?  If so, we have a patch at AdaCore to limit
>its explosion.
>  
>
Yes, it is. schedule_insns2 takes nothing.

Paolo
Comment 5 Eric Botcazou 2005-11-14 18:50:28 UTC
Created attachment 10236 [details]
Patch (against 3.4.x) for controlling the explosion of the 1st scheduling pass.

	* params.def (PARAM_MAX_SCHED_READY_INSNS): New parameter,
	defaulting to 100.
	* params.h (MAX_SCHED_READY_INSNS): New macro.
	* haifa-sched.c: Include param.h.
	(queue_to_ready): Re-queue insns past MAX_SCHED_READY_INSNS
	for the next cycle during the first scheduling pass.
	(schedule_block): Delay insns past MAX_SCHED_READY_INSNS in
	the ready list for 1 cycle during the first scheduling pass.
	* doc/invoke.texi (--param): New parameter
	max-sched-ready-insns.
Comment 6 Eric Botcazou 2006-04-11 06:06:46 UTC
Sorry, the patch doesn't seem to help at all.