tree-sra.c (modify_function): Record caller nodes after rebuild.

2014-06-03  Teresa Johnson  <tejohnson@google.com>

	* tree-sra.c (modify_function): Record caller nodes after rebuild.

From-SVN: r211180
This commit is contained in:
Teresa Johnson 2014-06-03 14:12:51 +00:00 committed by Teresa Johnson
parent 010bc40a6c
commit 878d361864
2 changed files with 8 additions and 1 deletions

View file

@ -1,3 +1,7 @@
2014-06-03 Teresa Johnson <tejohnson@google.com>
* tree-sra.c (modify_function): Record caller nodes after rebuild.
2014-06-02 Jason Merrill <jason@redhat.com>
PR c++/61020

View file

@ -4926,12 +4926,15 @@ modify_function (struct cgraph_node *node, ipa_parm_adjustment_vec adjustments)
{
struct cgraph_node *new_node;
bool cfg_changed;
vec<cgraph_edge_p> redirect_callers = collect_callers_of_node (node);
rebuild_cgraph_edges ();
free_dominance_info (CDI_DOMINATORS);
pop_cfun ();
/* This must be done after rebuilding cgraph edges for node above.
Otherwise any recursive calls to node that are recorded in
redirect_callers will be corrupted. */
vec<cgraph_edge_p> redirect_callers = collect_callers_of_node (node);
new_node = cgraph_function_versioning (node, redirect_callers,
NULL,
NULL, false, NULL, NULL, "isra");