]> git.ipfire.org Git - thirdparty/gcc.git/commit
ira: Add ira_subloop_allocnos_can_differ_p
authorRichard Sandiford <richard.sandiford@arm.com>
Mon, 10 Jan 2022 14:47:07 +0000 (14:47 +0000)
committerRichard Sandiford <richard.sandiford@arm.com>
Mon, 10 Jan 2022 14:47:07 +0000 (14:47 +0000)
commitd54565d87ff79b882208dfb29af50232033c233d
tree47973cdb200c95c3e9ea7b34f3d9b981c37c55bd
parent909a4b4764c4f270f09ccb2a950c91b21ed7b33a
ira: Add ira_subloop_allocnos_can_differ_p

color_pass has two instances of the same code for propagating non-cap
assignments from parent loops to subloops.  This patch adds a helper
function for testing when such propagations are required for correctness
and uses it to remove the duplicated code.

A later patch will use this in ira-build.c too, which is why the
function is exported to ira-int.h.

No functional change intended.

gcc/
PR rtl-optimization/98782
* ira-int.h (ira_subloop_allocnos_can_differ_p): New function,
extracted from...
* ira-color.c (color_pass): ...here.
gcc/ira-color.c
gcc/ira-int.h