diff options
author | Aldy Hernandez <aldyh@redhat.com> | 2021-10-05 15:03:34 +0200 |
---|---|---|
committer | Aldy Hernandez <aldyh@redhat.com> | 2021-10-05 18:24:30 +0200 |
commit | ec0124e0acb556cdf5dba0e8d0ca6b69d9537fcc (patch) | |
tree | 644adb390be49233e736f3aa2639fe2da2b23bcc /gcc/cp/constexpr.c | |
parent | 1f51e9af7b615838424214e6aaea0de793cb10fe (diff) | |
download | gcc-ec0124e0acb556cdf5dba0e8d0ca6b69d9537fcc.zip gcc-ec0124e0acb556cdf5dba0e8d0ca6b69d9537fcc.tar.gz gcc-ec0124e0acb556cdf5dba0e8d0ca6b69d9537fcc.tar.bz2 |
Loosen loop crossing restriction in threader.
Crossing loops is generally discouraged from the threader, but we can
make an exception when we don't cross the latch or enter another loop,
since this is just an early exit out of the loop.
In fact, the whole threaded path is logically outside the loop. This
has nice secondary effects. For example, objects on the threaded path
will no longer necessarily be live throughout the loop, so we can get
register allocation improvements. The threaded path can physically
move outside the loop resulting in better icache efficiency, etc.
Tested on x86-64 Linux, and on a visium-elf cross making sure that the
following tests do not have an abort in the final assembly:
gcc.c-torture/execute/960218-1.c
gcc.c-torture/execute/visium-pending-4.c
gcc.c-torture/execute/pr58209.c
gcc/ChangeLog:
* tree-ssa-threadupdate.c (jt_path_registry::cancel_invalid_paths):
Loosen restrictions
gcc/testsuite/ChangeLog:
* gcc.dg/tree-ssa/ssa-thread-valid.c: New test.
Diffstat (limited to 'gcc/cp/constexpr.c')
0 files changed, 0 insertions, 0 deletions