diff options
author | Hans-Peter Nilsson <hp@axis.com> | 2020-08-24 03:15:21 +0200 |
---|---|---|
committer | Hans-Peter Nilsson <hp@axis.com> | 2020-08-24 03:15:21 +0200 |
commit | 0e6c51de8ec47bf5f0dfaabfd1898c722d0485b4 (patch) | |
tree | c226f91c199bb1f810f865455c5acebd873855d5 /gcc/tree-vectorizer.h | |
parent | baf917af016236878b1246c7412735e8e831bf16 (diff) | |
download | gcc-0e6c51de8ec47bf5f0dfaabfd1898c722d0485b4.zip gcc-0e6c51de8ec47bf5f0dfaabfd1898c722d0485b4.tar.gz gcc-0e6c51de8ec47bf5f0dfaabfd1898c722d0485b4.tar.bz2 |
reorg.c (fill_slots_from_thread): Improve for TARGET_FLAGS_REGNUM
This handles TARGET_FLAGS_REGNUM clobbering insns as delay-slot
fillers using a method similar to that in commit 33c2207d3fda,
where care was taken for fill_simple_delay_slots to allow such
insns when scanning for delay-slot fillers *backwards* (before
the insn).
A TARGET_FLAGS_REGNUM target is typically a former cc0 target.
For cc0 targets, insns don't mention clobbering cc0, so the
clobbers are mentioned in the "resources" only as a special
entity and only for compare-insns and branches, where the cc0
value matters.
In contrast, with TARGET_FLAGS_REGNUM, most insns clobber it and
the register liveness detection in reorg.c / resource.c treats
that as a blocker (for other insns mentioning it, i.e. most)
when looking for delay-slot-filling candidates. This means that
when comparing core and performance for a delay-slot cc0 target
before and after the de-cc0 conversion, the inability to fill a
delay slot after conversion manifests as a regression. This was
one such case, for CRIS, with random_bitstring in
gcc.c-torture/execute/arith-rand-ll.c as well as the target
libgcc division function.
After this, all known performance regressions compared to cc0
are fixed.
gcc:
PR target/93372
* reorg.c (fill_slots_from_thread): Allow trial insns that clobber
TARGET_FLAGS_REGNUM as delay-slot fillers.
gcc/testsuite:
PR target/93372
* gcc.target/cris/pr93372-47.c: New test.
Diffstat (limited to 'gcc/tree-vectorizer.h')
0 files changed, 0 insertions, 0 deletions