aboutsummaryrefslogtreecommitdiff
path: root/libgcc/enable-execute-stack-empty.c
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2023-11-11 17:28:59 +0000
committerRichard Sandiford <richard.sandiford@arm.com>2023-11-11 17:28:59 +0000
commit493b0038d7d04986c7de977074d095e4eb7d9a27 (patch)
treed9d956aafeba00666f048fe7b27e3d127a310000 /libgcc/enable-execute-stack-empty.c
parent718228a6f479fe252e0e6f71933c2465b7b480a9 (diff)
downloadgcc-493b0038d7d04986c7de977074d095e4eb7d9a27.zip
gcc-493b0038d7d04986c7de977074d095e4eb7d9a27.tar.gz
gcc-493b0038d7d04986c7de977074d095e4eb7d9a27.tar.bz2
mode-switching: Add a target-configurable confluence operator
The mode-switching pass assumed that all of an entity's modes were mutually exclusive. However, the upcoming SME changes have an entity with some overlapping modes, so that there is sometimes a "superunion" mode that contains two given modes. We can use this relationship to pass something more helpful than "don't know" to the emit hook. This patch adds a new hook that targets can use to specify a mode confluence operator. With mutually exclusive modes, it's possible to compute a block's incoming and outgoing modes by looking at its availability sets. With the confluence operator, we instead need to solve a full dataflow problem. However, when emitting a mode transition, the upcoming SME use of mode-switching benefits from having as much information as possible about the starting mode. Calculating this information is definitely worth the compile time. The dataflow problem is written to work before and after the LCM problem has been solved. A later patch makes use of this. While there (since git blame would ping me for the reindented code), I used a lambda to avoid the cut-&-pasted loops. gcc/ * target.def (mode_switching.confluence): New hook. * doc/tm.texi (TARGET_MODE_CONFLUENCE): New @hook. * doc/tm.texi.in: Regenerate. * mode-switching.cc (confluence_info): New variable. (mode_confluence, forward_confluence_n, forward_transfer): New functions. (optimize_mode_switching): Use them to calculate mode_in when TARGET_MODE_CONFLUENCE is defined.
Diffstat (limited to 'libgcc/enable-execute-stack-empty.c')
0 files changed, 0 insertions, 0 deletions