From: Kyrylo Tkachov <[email protected]>

Pre-RA sched1 is known to be a compile-time hog on e.g. aarch64 but
we haven't disabled it fully because it does bring some benefit.
This series attempts to fix the compile-time problem.
The headline number is that on large files this patch series
reduces sched1 time by 90% with a >40% end-to-end compile time reduction
for some of the gimple-match.ii files at -O3.
Patch 1 clears dependency cache bitmaps before their arrays are freed.
Patch 2 returns debug-use and control-use list nodes that reg_last_in_use
does not cover.
Patch 3 reuses all-zero reg_last arrays across regions.
Patch 4 records a pre-reload barrier once and materializes it only
for registers that are later touched.
I've tested this on aarch64-none-linux and x86_64-linux
(with explicit -fschedule-insns).
This series is expected to be a purely compile-time improvement,
no changes to scheduling decisions.
Across all of SPEC2026 on aarch64 no differences in generated assembly
or scheduler dumps.
Would appreciate evaluation on other targets. I've tried to not touch
selective scheduling in these patches, hopefully it should be a no-op there.
Ok for trunk?
Thanks,
Kyrill

Kyrylo Tkachov (4):
sched-deps: clear dependency caches before freeing them
sched-deps: release reg_last lists outside reg_last_in_use
sched-deps: reuse reg_last arrays across regions
sched-deps: record barriers once instead of per register
gcc/sched-deps.cc                         | 655 ++++++++++++++++++++--
gcc/sched-int.h                           |  20 +
gcc/sched-rgn.cc                          |  20 +-
gcc/sel-sched-ir.cc                       |   4 +
gcc/selftest-run-tests.cc                 |   1 +
gcc/selftest.h                            |   1 +
gcc/testsuite/gcc.dg/sched-deps-debug-1.c |  27 +
7 files changed, 693 insertions(+), 35 deletions(-)
create mode 100644 gcc/testsuite/gcc.dg/sched-deps-debug-1.c

Reply via email to