https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124165
--- Comment #14 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by H.J. Lu <[email protected]>: https://gcc.gnu.org/g:a7cce1afee8ba28c524a4a43f0081e36e5501cf2 commit r16-7880-ga7cce1afee8ba28c524a4a43f0081e36e5501cf2 Author: H.J. Lu <[email protected]> Date: Sun Feb 22 10:32:30 2026 +0800 x86: Call ix86_access_stack_p only with symbolic constant load ix86_access_stack_p can be quite expensive. Cache the result and call it only if there are symbolic constant loads. This reduces the compile time of PR target/124165 test from 202 seconds to 55 seconds. gcc/ PR target/124165 * config/i386/i386-protos.h (symbolic_reference_mentioned_p): Change the argument type from rtx to const_rtx. * config/i386/i386.cc (symbolic_reference_mentioned_p): Likewise. (ix86_access_stack_p): Add 2 auto_bitmap[] arguments. Cache the register BB domination result. (ix86_symbolic_const_load_p_1): New. (ix86_symbolic_const_load_p): Likewise. (ix86_find_max_used_stack_alignment): If there is no symbolic constant load into the register, don't call ix86_access_stack_p. Signed-off-by: H.J. Lu <[email protected]>
