@@ -54,6 +54,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree-ssanames.h"
#include "gimple-ssa.h"
#include "tree-dfa.h"
+#include "tree-dump.h"
/* Gimple parsing functions. */
@@ -114,10 +115,11 @@ c_parser_parse_gimple_body (c_parser *parser)
/* While we have SSA names in the IL we do not have a CFG built yet
and PHIs are represented using a PHI internal function. We do
have lowered control flow and exception handling (well, we do not
- have parser support for EH yet). */
- cfun->curr_properties = PROP_gimple_any | PROP_gimple_lcf | PROP_gimple_leh;
+ have parser support for EH yet). But as we still have BINDs
+ we have to go through lowering again. */
+ cfun->curr_properties = PROP_gimple_any;
- return;
+ dump_function (TDI_generic, current_function_decl);
}
/* Parse a compound statement in gimple function body.
@@ -696,6 +698,9 @@ c_parser_parse_ssa_name (c_parser *parser,
c_parser_error (parser, "base variable or SSA name not declared");
return error_mark_node;
}
+ if (VECTOR_TYPE_P (TREE_TYPE (parent))
+ || TREE_CODE (TREE_TYPE (parent)) == COMPLEX_TYPE)
+ DECL_GIMPLE_REG_P (parent) = 1;
name = make_ssa_name_fn (cfun, parent,
gimple_build_nop (), version);
}
@@ -12337,22 +12337,7 @@ gimplify_function_tree (tree fndecl)
&& !needs_to_live_in_memory (ret))
DECL_GIMPLE_REG_P (ret) = 1;
- if (!cfun->gimple_body)
- bind = gimplify_body (fndecl, true);
- else
- {
- gimple_seq seq;
- gimple *outer_stmt;
- seq = cfun->gimple_body;
- outer_stmt = gimple_seq_first_stmt (seq);
- if (gimple_code (outer_stmt) == GIMPLE_BIND
- && gimple_seq_first (seq) == gimple_seq_last (seq))
- bind = as_a <gbind *> (outer_stmt);
- else
- bind = gimple_build_bind (NULL_TREE, seq, NULL);
-
- DECL_SAVED_TREE (fndecl) = NULL_TREE;
- }
+ bind = gimplify_body (fndecl, true);
/* The tree body of the function is no longer needed, replace it
with the new GIMPLE body. */
@@ -7666,7 +7666,7 @@ dump_function_to_file (tree fndecl, FILE *file, int flags)
fprintf (file, "}\n");
}
- else if (DECL_SAVED_TREE (fndecl) == NULL)
+ else if (fun->curr_properties & PROP_gimple_any)
{
/* The function is now in GIMPLE form but the CFG has not been
built yet. Emit the single sequence of GIMPLE statements