Call update_address_taken before into-SSA

Message ID alpine.LSU.2.20.1905151454380.10704@zhemvz.fhfr.qr
State New
Headers show
  • Call update_address_taken before into-SSA
Related show

Commit Message

Richard Biener May 15, 2019, 12:56 p.m.
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

Only doing it when optimizing though.

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


2019-05-15  Richard Biener  <>

	* 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);