* cgraph.c (cgraph_add_new_function): When in expansion state, do lowering.
* method.c: Include cgraph.h.
(use_thunk): Use cgraph_add_new_function instead of calling backend directly.
From-SVN: r136892
+2008-06-16 Jan Hubicka <jh@suse.cz>
+
+ * cgraph.c (cgraph_add_new_function): When in expansion state, do
+ lowering.
+
2008-06-16 Jan Hubicka <jh@suse.cz>
* tree-outof-ssa.c (pass_out_of_ssa): Do not depend on PROP_alias.
node->local.local = false;
node->local.finalized = true;
node->reachable = node->needed = true;
+ if (!lowered && cgraph_state == CGRAPH_STATE_EXPANSION)
+ {
+ push_cfun (DECL_STRUCT_FUNCTION (fndecl));
+ current_function_decl = fndecl;
+ tree_register_cfg_hooks ();
+ tree_lowering_passes (fndecl);
+ bitmap_obstack_initialize (NULL);
+ if (!gimple_in_ssa_p (DECL_STRUCT_FUNCTION (fndecl)))
+ execute_pass_list (pass_early_local_passes.pass.sub);
+ bitmap_obstack_release (NULL);
+ pop_cfun ();
+ current_function_decl = NULL;
+
+ lowered = true;
+ }
if (lowered)
node->lowered = true;
node->next_needed = cgraph_new_nodes;
+2008-06-16 Jan Hubicka <jh@suse.cz>
+
+ * method.c: Include cgraph.h.
+ (use_thunk): Use cgraph_add_new_function instead of calling backend
+ directly.
+
2008-06-15 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* parser.c: Fix comment typo.
#include "target.h"
#include "tree-pass.h"
#include "diagnostic.h"
+#include "cgraph.h"
/* Various flags to control the mangling process. */
pop_deferring_access_checks ();
thunk_fndecl = finish_function (0);
- tree_lowering_passes (thunk_fndecl);
- tree_rest_of_compilation (thunk_fndecl);
+ cgraph_add_new_function (thunk_fndecl, false);
}
pop_from_top_level ();