]> git.ipfire.org Git - thirdparty/gcc.git/commit
cfgexpand: Factor out getting the stack decl index
authorAndrew Pinski <quic_apinski@quicinc.com>
Sat, 16 Nov 2024 04:22:02 +0000 (20:22 -0800)
committerTamar Christina <tamar.christina@arm.com>
Tue, 7 Jan 2025 14:47:44 +0000 (14:47 +0000)
commit4b1a2878ba3241ec5c0a1bf05ff47bfcd09c3711
treee911139daae75a57e0cd0de9f5b34fc1c2d4d7a5
parenta856b4d97b8d328fdcb169b792ac5456e40f8c00
cfgexpand: Factor out getting the stack decl index

This is the first patch in improving this code.
Since there are a few places which get the index and they
check the same thing, let's factor that out into one function.

Bootstrapped and tested on x86_64-linux-gnu.

gcc/ChangeLog:

* cfgexpand.cc (INVALID_STACK_INDEX): New defined.
(decl_stack_index): New function.
(visit_op): Use decl_stack_index.
(visit_conflict): Likewise.
(add_scope_conflicts_1): Likewise.

Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
gcc/cfgexpand.cc