aboutsummaryrefslogtreecommitdiff
path: root/libcpp/directives.cc
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2023-06-19 14:19:47 +0200
committerRichard Biener <rguenther@suse.de>2023-06-20 12:48:24 +0200
commit9d597e00757eedfb6b6cf5e0b5138b8029aeb28e (patch)
treee599ce0f838750dd42bbe1fbe2a32ce17ced960f /libcpp/directives.cc
parent85107abeb71bbf6edc7dfb7691527be104c11735 (diff)
downloadgcc-9d597e00757eedfb6b6cf5e0b5138b8029aeb28e.zip
gcc-9d597e00757eedfb6b6cf5e0b5138b8029aeb28e.tar.gz
gcc-9d597e00757eedfb6b6cf5e0b5138b8029aeb28e.tar.bz2
Improve DSE to handle stores before __builtin_unreachable ()
DSE isn't good at identifying program points that end lifetime of variables that are not associated with virtual operands. But at least for those that end basic-blocks we can handle the simple case where this ending is in the same basic-block as the definition we want to elide. That should catch quite some common cases already. * tree-ssa-dse.cc (dse_classify_store): When we found no defs and the basic-block with the original definition ends in __builtin_unreachable[_trap] the store is dead. * gcc.dg/tree-ssa/ssa-dse-47.c: New testcase. * c-c++-common/asan/pr106558.c: Avoid undefined behavior due to missing return.
Diffstat (limited to 'libcpp/directives.cc')
0 files changed, 0 insertions, 0 deletions