public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/104288] [11/12 Regression] EVRP null pointer check removal for strcmp (and maybe others) is not flow senative Date: Wed, 09 Feb 2022 14:10:11 +0000 [thread overview] Message-ID: <bug-104288-4-euMoqVsneL@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-104288-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104288 --- Comment #11 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Andrew Macleod <amacleod@gcc.gnu.org>: https://gcc.gnu.org/g:c6bb1db76b3ac127aff7dacf391fc1798a94bb7d commit r12-7128-gc6bb1db76b3ac127aff7dacf391fc1798a94bb7d Author: Andrew MacLeod <amacleod@redhat.com> Date: Mon Feb 7 15:52:16 2022 -0500 Register non-null side effects properly. This patch adjusts uses of nonnull to accurately reflect "somewhere in block". It also adds the ability to register statement side effects within a block for ranger which will apply for the rest of the block. PR tree-optimization/104288 gcc/ * gimple-range-cache.cc (non_null_ref::set_nonnull): New. (non_null_ref::adjust_range): Move to header. (ranger_cache::range_of_def): Don't check non-null. (ranger_cache::entry_range): Don't check non-null. (ranger_cache::range_on_edge): Check for nonnull on normal edges. (ranger_cache::update_to_nonnull): New. (non_null_loadstore): New. (ranger_cache::block_apply_nonnull): New. * gimple-range-cache.h (class non_null_ref): Update prototypes. (non_null_ref::adjust_range): Move to here and inline. (class ranger_cache): Update prototypes. * gimple-range-path.cc (path_range_query::range_defined_in_block): Do not search dominators. (path_range_query::adjust_for_non_null_uses): Ditto. * gimple-range.cc (gimple_ranger::range_of_expr): Check on-entry for def overrides. Do not check nonnull. (gimple_ranger::range_on_entry): Check dominators for nonnull. (gimple_ranger::range_on_edge): Check for nonnull on normal edges.. (gimple_ranger::register_side_effects): New. * gimple-range.h (gimple_ranger::register_side_effects): New. * tree-vrp.cc (rvrp_folder::fold_stmt): Call register_side_effects. gcc/testsuite/ * gcc.dg/pr104288.c: New.
next prev parent reply other threads:[~2022-02-09 14:10 UTC|newest] Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-01-30 10:09 [Bug c/104288] New: Null pointer check invalidly deleted nrk at disroot dot org 2022-01-30 10:26 ` [Bug middle-end/104288] [11/12 Regression] " pinskia at gcc dot gnu.org 2022-01-30 10:29 ` [Bug tree-optimization/104288] [11/12 Regression] EVRP null pointer check removal for strcmp (and maybe others) is not flow senative pinskia at gcc dot gnu.org 2022-01-30 11:03 ` jakub at gcc dot gnu.org 2022-01-31 8:21 ` rguenth at gcc dot gnu.org 2022-01-31 14:53 ` amacleod at redhat dot com 2022-01-31 15:34 ` jakub at gcc dot gnu.org 2022-01-31 22:39 ` amacleod at redhat dot com 2022-02-01 8:04 ` rguenther at suse dot de 2022-02-02 21:52 ` amacleod at redhat dot com 2022-02-08 15:03 ` cvs-commit at gcc dot gnu.org 2022-02-09 14:10 ` cvs-commit at gcc dot gnu.org [this message] 2022-02-09 14:11 ` amacleod at redhat dot com 2023-04-09 3:59 ` christian.prochaska@genode-labs.com 2023-04-09 4:12 ` pinskia at gcc dot gnu.org 2023-04-09 4:12 ` pinskia at gcc dot gnu.org 2023-04-09 7:07 ` christian.prochaska@genode-labs.com 2023-04-09 7:43 ` pinskia at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-104288-4-euMoqVsneL@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).