[Bug tree-optimization/66013] Missed optimization after inlining va_list parameter, -m32 case

vries at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu May 7 22:17:00 GMT 2015


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66013

--- Comment #4 from vries at gcc dot gnu.org ---
Tentative patch:
...
diff --git a/gcc/tree-stdarg.c b/gcc/tree-stdarg.c
index efabda7..b334e79 100644
--- a/gcc/tree-stdarg.c
+++ b/gcc/tree-stdarg.c
@@ -62,6 +62,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree-cfg.h"
 #include "tree-pass.h"
 #include "tree-stdarg.h"
+#include "tree-ssa.h"

 /* A simple pass that attempts to optimize stdarg functions on architectures
    that need to save register arguments to stack on entry to stdarg functions.
@@ -1111,6 +1112,7 @@ expand_ifn_va_arg_1 (function *fun)

   free_dominance_info (CDI_DOMINATORS);
   update_ssa (TODO_update_ssa);
+  execute_update_addresses_taken ();
 }

 /* Expand IFN_VA_ARGs in FUN, if necessary.  */
...

We just update address_taken between ifn_va_arg expansion and the pass_stdarg
optimization.



More information about the Gcc-bugs mailing list