I've noticed we fail to rewrite vectors into SSA at the earliest
opportunity because FEs leave us with stray TREE_ADDRESSABLE set
or IL that is not suitable for SSA but can be easily rewritten.

The earliest opportunity to fix this is when we rewrite into SSA
where it has low overhead (no operand cache or extra SSA rewrite
necessary).

Only doing it when optimizing though.

Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk.

Richard.

2019-05-15  Richard Biener  <rguent...@suse.de>

        * tree-into-ssa.c (pass_build_ssa::execute): Run
        update_address_taken before going into SSA.

Index: gcc/tree-into-ssa.c
===================================================================
--- gcc/tree-into-ssa.c (revision 271202)
+++ gcc/tree-into-ssa.c (working copy)
@@ -2425,6 +2425,12 @@ pass_build_ssa::execute (function *fun)
   bitmap_head *dfs;
   basic_block bb;
 
+  /* Increase the set of variables we can rewrite into SSA form
+     by clearing TREE_ADDRESSABLE and setting DECL_GIMPLE_REG_P
+     and transform the IL to support this.  */
+  if (optimize)
+    execute_update_addresses_taken ();
+
   /* Initialize operand data structures.  */
   init_ssa_operands (fun);
 

Reply via email to