diff options
author | Alexandre Oliva <oliva@adacore.com> | 2023-04-27 02:43:48 -0300 |
---|---|---|
committer | Alexandre Oliva <oliva@gnu.org> | 2023-04-28 01:39:40 -0300 |
commit | f9b9109036110f6a4296b935910db992dc6a34c1 (patch) | |
tree | 702258debc9c74e53d9e5de8e5b8bdf91276e828 /gcc/value-range.h | |
parent | 32a98ccd233101990c15bf898358b4367562a26f (diff) | |
download | gcc-f9b9109036110f6a4296b935910db992dc6a34c1.zip gcc-f9b9109036110f6a4296b935910db992dc6a34c1.tar.gz gcc-f9b9109036110f6a4296b935910db992dc6a34c1.tar.bz2 |
harden-conditionals: detach values before compares
The optimization barriers inserted after compares enable GCC to derive
information about the values from e.g. the taken paths, or the absence
of exceptions. Move them before the original compares, so that the
reversed compares test copies of the original operands, without
further optimizations.
for gcc/ChangeLog
* gimple-harden-conditionals.cc (insert_edge_check_and_trap):
Move detach value calls...
(pass_harden_conditional_branches::execute): ... here.
(pass_harden_compares::execute): Detach values before
compares.
for gcc/testsuite/ChangeLog
* c-c++-common/torture/harden-cond-comp.c: New.
Diffstat (limited to 'gcc/value-range.h')
0 files changed, 0 insertions, 0 deletions