aboutsummaryrefslogtreecommitdiff
path: root/libcpp
diff options
context:
space:
mode:
authorHans-Peter Nilsson <hp@axis.com>2024-05-28 23:16:48 +0200
committerHans-Peter Nilsson <hp@bitrange.com>2024-05-28 23:16:48 +0200
commit933ab59c59bdc1ac9e3ca3a56527836564e1821b (patch)
treeeea7bd6fa76d6b5a924e0015e9788e125fadf9be /libcpp
parent84b4ed45ea81ed5c4fb656a17846b26071c23e7d (diff)
downloadgcc-933ab59c59bdc1ac9e3ca3a56527836564e1821b.zip
gcc-933ab59c59bdc1ac9e3ca3a56527836564e1821b.tar.gz
gcc-933ab59c59bdc1ac9e3ca3a56527836564e1821b.tar.bz2
resource.cc: Replace calls to find_basic_block with cfgrtl BLOCK_FOR_INSN
...and call compute_bb_for_insn in init_resource_info and free_bb_for_insn in free_resource_info. I put a gcc_unreachable in that else-clause for a failing find_basic_block in mark_target_live_regs after the comment that says: /* We didn't find the start of a basic block. Assume everything in use. This should happen only extremely rarely. */ SET_HARD_REG_SET (res->regs); and found that it fails not extremely rarely but extremely early in the build (compiling libgcc). That kind of pessimization leads to suboptimal delay-slot-filling. Instead, do like many machine_dependent_reorg passes and call compute_bb_for_insn as part of resource.cc initialization. After this patch, there's a whole "if (b != -1)" conditional that's dominated by a gcc_assert (b != -1). I separated that, as it's a NFC whitespace patch that hampers patch readability. Altogether this improved coremark performance for CRIS at -O2 -march=v10 by 0.36%. * resource.cc: Include cfgrtl.h. Use BLOCK_FOR_INSN (insn)->index instead of calling find_basic_block (insn). Assert for not -1. (find_basic_block): Remove function. (init_resource_info): Call compute_bb_for_insn. (free_resource_info): Call free_bb_for_insn.
Diffstat (limited to 'libcpp')
0 files changed, 0 insertions, 0 deletions