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.
// 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;