aboutsummaryrefslogtreecommitdiff
path: root/libcpp/files.cc
diff options
context:
space:
mode:
authorAndrew Pinski <quic_apinski@quicinc.com>2024-10-13 15:57:41 -0700
committerAndrew Pinski <quic_apinski@quicinc.com>2024-10-15 07:45:01 -0700
commit061a4e35c81f24c6ec5e56214469d229f1808971 (patch)
tree677a6b5eefd8a25033769621e5a135740116295e /libcpp/files.cc
parent7f65f94917866c6b18d9698eec6451c1bf21e0f9 (diff)
downloadgcc-061a4e35c81f24c6ec5e56214469d229f1808971.zip
gcc-061a4e35c81f24c6ec5e56214469d229f1808971.tar.gz
gcc-061a4e35c81f24c6ec5e56214469d229f1808971.tar.bz2
passes: Remove limit on the number of params
Having a limit of 2 params for NEXT_PASS was just done because I didn't think there was a way to handle arbitrary number of params. But I found that we can handle this via a static const variable array (constexpr so we know it is true or false at compile time) and just loop over the array. Note I keep around NEXT_PASS_WITH_ARG and NEXT_PASS macros instead of always using NEXT_PASS_WITH_ARGS macro to make sure these cases get optimized for -O0 (stage1). Tested INSERT_PASS_AFTER/INSERT_PASS_BEFORE manually by changing config/i386/i386-passes.def's stv lines to have a 2nd argument and checked the resuling pass-instances.def to see the NEXT_PASS_WITH_ARGS was correctly done. changes from v1: * v2: Handle INSERT_PASS_AFTER/INSERT_PASS_BEFORE too. Bootstrapped and tested on x86_64-linux-gnu. gcc/ChangeLog: * gen-pass-instances.awk: Remove the limit of the params. * pass_manager.h (NEXT_PASS_WITH_ARG2): Rename to ... (NEXT_PASS_WITH_ARGS): This. * passes.cc (NEXT_PASS_WITH_ARG2): Rename to ... (NEXT_PASS_WITH_ARGS): This and support more than 2 params by using a constexpr array. Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
Diffstat (limited to 'libcpp/files.cc')
0 files changed, 0 insertions, 0 deletions