aboutsummaryrefslogtreecommitdiff
path: root/libcpp
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2024-07-25 08:54:22 +0100
committerThomas Koenig <tkoenig@gcc.gnu.org>2024-07-28 19:05:55 +0200
commit666b388b3a2c0242b4489784c1cf219036ce396b (patch)
treeada1b0d79c2467e9ce2490f2ad1d6bf1db5ab132 /libcpp
parenta7095d8eca2a7c537854adc23344972712955993 (diff)
downloadgcc-666b388b3a2c0242b4489784c1cf219036ce396b.zip
gcc-666b388b3a2c0242b4489784c1cf219036ce396b.tar.gz
gcc-666b388b3a2c0242b4489784c1cf219036ce396b.tar.bz2
rtl-ssa: Fix split_clobber_group tree insertion [PR116044]
PR116044 is a regression in the testsuite on AMD GCN caused (again) by the split_clobber_group code. The first patch in this area (g:71b31690a7c52413496e91bcc5ee4c68af2f366f) fixed a bug caused by carrying the old group over as one of the split ones. That patch instead: - created two new groups - inserted them in the splay tree as neighbours of the old group - removed the old group, and - invalidated the old group (to force lazy recomputation when a clobber's parent group is queried) However, this left add_def trying to insert the new definition relative to a stale splay tree root. The second patch (g:34f33ea801563e2eabb348e8d3e9344a91abfd48) attempted to fix that by inserting it relative to the new root. But that's not always correct either. We specifically want to insert it after the first of the two new groups, whether that group is the root or not. This patch does that, and tries to refactor the code to make it a bit less brittle. gcc/ PR rtl-optimization/116044 * rtl-ssa/functions.h (function_info::split_clobber_group): Return an array of two clobber_groups. * rtl-ssa/accesses.cc (function_info::split_clobber_group): Return the new clobber groups. Don't modify the splay tree here. (function_info::add_def): Update call accordingly. Generalize the splay tree insertion code so that the new definition can be inserted as a child of any existing node, not just the root. Fix the insertion used after calling split_clobber_group.
Diffstat (limited to 'libcpp')
0 files changed, 0 insertions, 0 deletions