diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2024-11-18 19:32:50 +0000 |
---|---|---|
committer | Richard Sandiford <richard.sandiford@arm.com> | 2024-11-18 19:32:50 +0000 |
commit | 279475fd7236a9e4ed1ecb634f82a2bc7c895cc8 (patch) | |
tree | fe684da6f9e59f22524dfa1975e9b588e3439782 | |
parent | 428f3cacdd6aa631040379cb3c39eb8832957ef1 (diff) | |
download | gcc-279475fd7236a9e4ed1ecb634f82a2bc7c895cc8.zip gcc-279475fd7236a9e4ed1ecb634f82a2bc7c895cc8.tar.gz gcc-279475fd7236a9e4ed1ecb634f82a2bc7c895cc8.tar.bz2 |
aarch64: Extend early-ra splitting of single-block regions
When early-ra treats a block as an isolated allocation region,
it opportunistically splits the block into smaller regions
at points where no FPRs or FPR allocnos are live. Previously
it only did this if m_allocation_successful, since the contrary
included cases in which the live range information wasn't trustworthy.
After earlier patches, we should now be able to trust the live range
information whenever m_accurate_live_ranges is true. This means that
we can split the block into regions even if allocation failed for the
current (sub)region.
This is just something I noticed by inspection. I don't have
a particular test case for it.
gcc/
* config/aarch64/aarch64-early-ra.cc
(early_ra::process_block): Check m_accurate_live_ranges
rather than m_allocation_successful when deciding whether
to split a block into multiple regions. Skip over subregions
that we decide not to allocate.
-rw-r--r-- | gcc/config/aarch64/aarch64-early-ra.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/config/aarch64/aarch64-early-ra.cc b/gcc/config/aarch64/aarch64-early-ra.cc index 79ac7b0..33d82ea 100644 --- a/gcc/config/aarch64/aarch64-early-ra.cc +++ b/gcc/config/aarch64/aarch64-early-ra.cc @@ -3575,14 +3575,17 @@ early_ra::process_block (basic_block bb, bool is_isolated) // See whether we have a complete region, with no remaining live // allocnos. if (is_isolated + && m_accurate_live_ranges && bitmap_empty_p (m_live_allocnos) && m_live_fprs == 0 - && m_allocation_successful && !m_allocnos.is_empty ()) { rtx_insn *prev_insn = PREV_INSN (insn); - m_insn_ranges.safe_push ({ start_insn, prev_insn }); - process_region (); + if (m_allocation_successful) + { + m_insn_ranges.safe_push ({ start_insn, prev_insn }); + process_region (); + } start_new_region (); is_first = true; start_insn = prev_insn; |