]> git.ipfire.org Git - thirdparty/gcc.git/commit
aarch64: Add early_ra::record_live_range_failure
authorRichard Sandiford <richard.sandiford@arm.com>
Mon, 18 Nov 2024 19:32:49 +0000 (19:32 +0000)
committerRichard Sandiford <richard.sandiford@arm.com>
Mon, 18 Nov 2024 19:32:49 +0000 (19:32 +0000)
commit716aa5a668388a09b27525dce847d8d36c4c2fab
tree48f8f5d72d0addce28c6b682b63cb03f9fa48046
parent4712ecde4869cf29c40a7df44e4655939d90d4d8
aarch64: Add early_ra::record_live_range_failure

So far, early_ra has used a single m_allocation_successful bool
to record whether the current region is still being allocated.
But there are (at least) two reasons why we might pull out of
attempting an allocation:

(1) We can't track the liveness of individual FP allocnos,
    due to some awkward subregs.

(2) We're afraid of doing a worse job than the proper allocator.

A later patch needs to distinguish (1) from other reasons, since
(1) means that the liveness information is not trustworthy.
(Currently we assume it is not trustworthy whenever
m_allocation_successful is false, but that's too conservative.)

gcc/
* config/aarch64/aarch64-early-ra.cc
(early_ra::record_live_range_failure): New member function.
(early_ra::m_accurate_live_ranges): New member variable.
(early_ra::start_new_region): Set m_accurate_live_ranges to true.
(early_ra::get_allocno_subgroup): Use record_live_range_failure
to abort the allocation on invalid subregs.
gcc/config/aarch64/aarch64-early-ra.cc