public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Richard Biener <rguenth@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-1764] Improve SLP codegen, avoiding unnecessary TREE_ADDRESSABLE Date: Wed, 20 Jul 2022 12:05:53 +0000 (GMT) [thread overview] Message-ID: <20220720120553.C8E0D3857B84@sourceware.org> (raw) https://gcc.gnu.org/g:5f59d0f2d9fa921c04d75c39592e603cfa2b1324 commit r13-1764-g5f59d0f2d9fa921c04d75c39592e603cfa2b1324 Author: Richard Biener <rguenther@suse.de> Date: Wed Jul 20 11:02:03 2022 +0200 Improve SLP codegen, avoiding unnecessary TREE_ADDRESSABLE The following adjusts vectorizer code generation to avoid splitting out address increments for invariant addresses which causes objects to get TREE_ADDRESSABLE when not necessary. * tree-vect-data-refs.cc (bump_vector_ptr): Return an invariant updated address when the input was invariant. Diff: --- gcc/tree-vect-data-refs.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gcc/tree-vect-data-refs.cc b/gcc/tree-vect-data-refs.cc index 609cacc4971..b279a82551e 100644 --- a/gcc/tree-vect-data-refs.cc +++ b/gcc/tree-vect-data-refs.cc @@ -5195,6 +5195,14 @@ bump_vector_ptr (vec_info *vinfo, if (TREE_CODE (dataref_ptr) == SSA_NAME) new_dataref_ptr = copy_ssa_name (dataref_ptr); + else if (is_gimple_min_invariant (dataref_ptr)) + /* When possible avoid emitting a separate increment stmt that will + force the addressed object addressable. */ + return build1 (ADDR_EXPR, TREE_TYPE (dataref_ptr), + fold_build2 (MEM_REF, + TREE_TYPE (TREE_TYPE (dataref_ptr)), + dataref_ptr, + fold_convert (ptr_type_node, update))); else new_dataref_ptr = make_ssa_name (TREE_TYPE (dataref_ptr)); incr_stmt = gimple_build_assign (new_dataref_ptr, POINTER_PLUS_EXPR,
reply other threads:[~2022-07-20 12:05 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20220720120553.C8E0D3857B84@sourceware.org \ --to=rguenth@gcc.gnu.org \ --cc=gcc-cvs@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).