From f8b7e3ec43723c9f6bd4213794a33d6c57046103 Mon Sep 17 00:00:00 2001
From: hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Wed, 12 May 2010 21:32:59 +0000
Subject: 	* cgraphbuild.c (build_cgraph_edges, rebuild_cgraph_edges):
 Build 	indrect edges too. 	* cgraph.c (cgraph_create_indirect_edge): Take
 ecf_flags argument. 	(cgraph_clone_edge): Update. 
 (cgraph_node_remove_callees): Remove indirect calls too. 	* cgraph.h
 (cgraph_indirect_call_info): Add ecf_flags. 	(cgraph_create_indirect_edge):
 Update prototype. 	* ipa-reference.c (has_proper_scope_for_analysis):
 Rename to 	is_proper_for_analysis. 	(add_new_function,
 visited_nodes, function_insertion_hook_holder, 
 get_local_reference_vars_info, mark_address_taken, mark_address, 
 mark_load, mark_store, check_asm_memory_clobber, check_call, 
 scan_stmt_for_static_refs, scan_initializer_for_static_refs): Remove. 
 (ipa_init): Do not initialize visited_nodes; 
 function_insertion_hook_holder. 	(analyze_variable): Rewrite. 
 (analyze_function): Rewrite. 	(copy_local_bitmap): Remove. 
 (duplicate_node_dat): Do not duplicate local info. 	(generate_summary):
 Simplify to only walk cgraph. 	(write_node_summary_p,
 ipa_reference_write_summary, 	ipa_reference_read_summary): Remove. 
 (propagate): Do not remove function insertion; 	generate summary. 
 (pass_ipa_reference): NULLify summary handling fields. 	* lto-cgraph.c
 (lto_output_edge): Output ecf_flags. 	(input_edge): Input ecf_flags. 	*
 ipa-prop.c (ipa_note_parm_call): Expect edge to be around. 
 (update_indirect_edges_after_inlining): Ignore edges with unknown 	param.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159343 138bc75d-0d04-0410-961f-82ee72b054a4
---
 gcc/ipa-prop.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

(limited to 'gcc/ipa-prop.c')

diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c
index 7ab3a3e607c..d40fe448a3a 100644
--- a/gcc/ipa-prop.c
+++ b/gcc/ipa-prop.c
@@ -757,12 +757,8 @@ static void
 ipa_note_param_call (struct cgraph_node *node, int formal_id, gimple stmt)
 {
   struct cgraph_edge *cs;
-  basic_block bb = gimple_bb (stmt);
-  int freq;
 
-  freq = compute_call_stmt_bb_frequency (current_function_decl, bb);
-  cs = cgraph_create_indirect_edge (node, stmt, bb->count, freq,
-				    bb->loop_depth);
+  cs = cgraph_edge (node, stmt);
   cs->indirect_info->param_index = formal_id;
 }
 
@@ -1071,7 +1067,8 @@ update_indirect_edges_after_inlining (struct cgraph_edge *cs,
 
       /* If we ever use indirect edges for anything other than indirect
 	 inlining, we will need to skip those with negative param_indices. */
-      gcc_assert (ici->param_index >= 0);
+      if (ici->param_index == -1)
+	continue;
 
       /* We must check range due to calls with variable number of arguments:  */
       if (ici->param_index >= ipa_get_cs_argument_count (top))
-- 
cgit v1.2.1