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/57359] store motion causes wrong code for union access at -O3 Date: Thu, 07 May 2020 10:12:35 +0000 [thread overview] Message-ID: <bug-57359-4-geOwHApFkt@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-57359-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57359 --- Comment #32 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>: https://gcc.gnu.org/g:283cb9ea6293e813e48a1b769e1e0779918ea20a commit r11-161-g283cb9ea6293e813e48a1b769e1e0779918ea20a Author: Richard Biener <rguenther@suse.de> Date: Mon Apr 27 14:45:54 2020 +0200 tree-optimization/57359 - rewrite SM code This rewrites store-motion to process candidates where we can ensure order preserving separately and with no need to disambiguate against all stores. Those candidates we cannot handle this way are validated to be independent on all stores (w/o TBAA) and then processed as "unordered" (all conditionally executed stores are so as well). This will necessary cause FAIL: gcc.dg/graphite/pr80906.c scan-tree-dump graphite "isl AST to Gimple succeeded" because the SM previously performed is not valid for exactly the PR57359 reason, we still perform SM of qc for the innermost loop but that's not enough. There is still room for improvements because we still check some constraints for the order preserving cases that are only necessary in the current strict way for the unordered ones. Leaving that for the furture. 2020-05-07 Richard Biener <rguenther@suse.de> PR tree-optimization/57359 * tree-ssa-loop-im.c (im_mem_ref::indep_loop): Remove. (in_mem_ref::dep_loop): Repurpose. (LOOP_DEP_BIT): Remove. (enum dep_kind): New. (enum dep_state): Likewise. (record_loop_dependence): New function to populate the dependence cache. (query_loop_dependence): New function to query the dependence cache. (memory_accesses::refs_in_loop): Rename to ... (memory_accesses::refs_loaded_in_loop): ... this and change to only record loads. (outermost_indep_loop): Adjust. (mem_ref_alloc): Likewise. (gather_mem_refs_stmt): Likewise. (mem_refs_may_alias_p): Add tbaa_p parameter and pass it down. (struct sm_aux): New. (execute_sm): Split code generation on exits, record state into new hash-map. (enum sm_kind): New. (execute_sm_exit): Exit code generation part. (sm_seq_push_down): Helper for sm_seq_valid_bb performing dependence checking on stores reached from exits. (sm_seq_valid_bb): New function gathering SM stores on exits. (hoist_memory_references): Re-implement. (refs_independent_p): Add tbaa_p parameter and pass it down. (record_dep_loop): Remove. (ref_indep_loop_p_1): Fold into ... (ref_indep_loop_p): ... this and generalize for three kinds of dependence queries. (can_sm_ref_p): Adjust according to hoist_memory_references changes. (store_motion_loop): Don't do anything if the set of SM candidates is empty. (tree_ssa_lim_initialize): Adjust. (tree_ssa_lim_finalize): Likewise. * gcc.dg/torture/pr57359-1.c: New testcase. * gcc.dg/torture/pr57359-1.c: Likewise. * gcc.dg/tree-ssa/ssa-lim-14.c: Likewise. * gcc.dg/graphite/pr80906.c: XFAIL.
next prev parent reply other threads:[~2020-05-07 10:12 UTC|newest] Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top 2013-05-21 18:20 [Bug rtl-optimization/57359] New: wrong code for union access at -O3 on x86_64-linux dhazeghi at yahoo dot com 2013-05-21 18:26 ` [Bug rtl-optimization/57359] " pinskia at gcc dot gnu.org 2013-05-21 18:33 ` jakub at gcc dot gnu.org 2013-05-23 19:51 ` dhazeghi at yahoo dot com 2013-05-29 21:14 ` dhazeghi at yahoo dot com 2013-05-30 7:13 ` jakub at gcc dot gnu.org 2013-05-31 8:48 ` rguenth at gcc dot gnu.org 2013-05-31 16:32 ` dhazeghi at yahoo dot com 2013-05-31 21:07 ` joseph at codesourcery dot com 2013-06-03 19:15 ` dhazeghi at yahoo dot com 2013-06-04 12:37 ` [Bug tree-optimization/57359] " rguenth at gcc dot gnu.org 2020-04-20 7:15 ` [Bug tree-optimization/57359] store motion causes wrong code for union access at -O3 rguenth at gcc dot gnu.org 2020-04-20 8:57 ` rguenth at gcc dot gnu.org 2020-04-20 10:50 ` rguenth at gcc dot gnu.org 2020-04-20 12:03 ` rguenth at gcc dot gnu.org 2020-04-20 12:34 ` pascal_cuoq at hotmail dot com 2020-04-20 12:39 ` rguenther at suse dot de 2020-04-21 7:22 ` rguenth at gcc dot gnu.org 2020-04-27 9:17 ` rguenth at gcc dot gnu.org 2020-04-27 9:35 ` rguenth at gcc dot gnu.org 2020-04-27 12:48 ` rguenth at gcc dot gnu.org 2020-04-30 12:25 ` rguenth at gcc dot gnu.org 2020-05-07 10:12 ` cvs-commit at gcc dot gnu.org [this message] 2020-05-07 10:13 ` rguenth at gcc dot gnu.org 2020-05-11 12:56 ` rguenth at gcc dot gnu.org 2020-05-11 12:56 ` rguenth at gcc dot gnu.org 2020-05-11 14:53 ` rguenth at gcc dot gnu.org 2020-05-11 14:57 ` rguenth at gcc dot gnu.org 2020-05-12 6:26 ` rguenth at gcc dot gnu.org 2020-05-12 11:53 ` ro at gcc dot gnu.org 2020-05-12 12:13 ` rguenth at gcc dot gnu.org 2020-05-18 9:50 ` rguenth at gcc dot gnu.org 2020-06-11 15:55 ` 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-57359-4-geOwHApFkt@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).