https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79149

--- Comment #9 from Arnd Bergmann <arnd at linaro dot org> ---
The warning seems to reliably disappear with -fno-schedule-insns, on every
combination I've tried it produces better (smaller stack and faster code) or
identical results to -fno-sched-critical-path-heuristic
-fno-sched-dep-count-heuristic for the test case, but the margins vary a lot
depending on gcc version and architecture. I tried various gcc versions on ARM,
as well as gcc-4.9.3 across many architectures.

"-fsched-pressure" on mips64 helps a lot (factor 2 in both frame size and
performance) but is still worse than "-fno-sched-critical-path-heuristic
-fno-sched-dep-count-heuristic" or "-fno-schedule-insns", which give factor 2.5
to 3.5 in performance and reduce the stack size to what it should be (220 to
272 bytes).
I tried gcc-4.9 and gcc-7.0 here, which show the same behavior, though "gcc-4.9
-fno-schedule-insns" is faster by a good margin (factor 1.1 to 1.2) compared to
the second fastest ("gcc-7 -fno-schedule-insns").

On arm and aarch64, "-fsched-pressure" has no effect on this test case that I
can see (have not compared the object files, but frame size and performance are
unchanged). "-fno-schedule-insns" is noticeably better, with frame size of 350
bytes on ARM compared to the default 824, and performance better by factor 1.6
compared to the default -O2. I also looked at the frame sizes on my older arm
compilers and saw the same on all 8 versions I have (4.5 through 7.0).

Reply via email to