gcc/gcc/ipa-cp.c

1043 lines
30 KiB
C
Raw Normal View History

/* Interprocedural constant propagation
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
Contributed by Razya Ladelsky <RAZYA@il.ibm.com>
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 3, or (at your option) any later
version.
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
/* Interprocedural constant propagation. The aim of interprocedural constant
propagation (IPCP) is to find which function's argument has the same
constant value in each invocation throughout the whole program. For example,
consider the following program:
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
int g (int y)
{
printf ("value is %d",y);
}
int f (int x)
{
g (x);
}
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
int h (int y)
{
g (y);
}
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
void main (void)
{
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
f (3);
h (3);
}
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
The IPCP algorithm will find that g's formal argument y is always called
with the value 3.
The algorithm used is based on "Interprocedural Constant Propagation", by
Challahan David, Keith D Cooper, Ken Kennedy, Linda Torczon, Comp86, pg
152-161
The optimization is divided into three stages:
First stage - intraprocedural analysis
=======================================
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
This phase computes jump_function and modification flags.
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
A jump function for a callsite represents the values passed as an actual
arguments of a given callsite. There are three types of values:
Pass through - the caller's formal parameter is passed as an actual argument.
Constant - a constant is passed as an actual argument.
Unknown - neither of the above.
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
The jump function info, ipa_jump_func, is stored in ipa_edge_args
structure (defined in ipa_prop.h and pointed to by cgraph_node->aux)
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
modified_flags are defined in ipa_node_params structure
(defined in ipa_prop.h and pointed to by cgraph_edge->aux).
-ipcp_init_stage() is the first stage driver.
Second stage - interprocedural analysis
========================================
This phase does the interprocedural constant propagation.
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
It computes lattices for all formal parameters in the program
and their value that may be:
TOP - unknown.
BOTTOM - non constant.
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
CONSTANT - constant value.
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
Lattice describing a formal parameter p will have a constant value if all
callsites invoking this function have the same constant value passed to p.
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
The lattices are stored in ipcp_lattice which is itself in ipa_node_params
structure (defined in ipa_prop.h and pointed to by cgraph_edge->aux).
-ipcp_iterate_stage() is the second stage driver.
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
Third phase - transformation of function code
============================================
Propagates the constant-valued formals into the function.
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
For each function whose parameters are constants, we create its clone.
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
Then we process the clone in two ways:
1. We insert an assignment statement 'parameter = const' at the beginning
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
of the cloned function.
2. For read-only parameters that do not live in memory, we replace all their
uses with the constant.
cgraph.c: Fix typos in comments. gcc/ * cgraph.c: Fix typos in comments. (cgraph_availability_names): Fix string typo. * fold-const.c: Fix typos in comments. (fold_binary): Fix typo in warning. * genautomata.c: Fix typos in comments. (check_presence_pattern_sets): Fix typo in local variable. (output_description): Fix typo in output. * ggc-zone.c (ggc_pch_finish): Fix typo in error message. * hwint.h: Likewise. * matrix-reorg.c (check_allocation_function): Likewise. * omega.c (smooth_weird_equations): Likewise. * auto-inc-dec.c: Fix typos in comments. * bb-reorder.c: Likewise. * builtins.c: Likewise. * c-common.c: Likewise. * c-cppbuiltin.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * cfgcleanup.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfglayout.c: Likewise. * cfgloopmanip.c: Likewise. * cgraphunit.c: Likewise. * coverage.c: Likewise. * dbxout.c: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * dfp.c: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * dse.c: Likewise. * dwarf2out.c: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * function.c: Likewise. * function.h: Likewise. * gcc.c: Likewise. * gcov-io.c: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattrtab.c: Likewise. * ggc-page.c: Likewise. * gimplify.c: Likewise. * gthr-lynx.h: Likewise. * haifa-sched.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.h: Likewise. * ipa-pure-const.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa.c: Likewise. * loop-doloop.c: Likewise. * mips-tfile.c: Likewise. * mkmap-flat.awk: Likewise. * mkmap-symver.awk: Likewise. * modulo-sched.c: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts.c: Likewise. * passes.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * pretty-print.h: Likewise. * profile.c: Likewise. * protoize.c: Likewise. * ra-conflict.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * regclass.c: Likewise. * regs.h: Likewise. * reload.c: Likewise. * rtl-error.c: Likewise. * rtlanal.c: Likewise. * scan.h: Likewise. * sched-rgn.c: Likewise. * see.c: Likewise. * stmt.c: Likewise. * target.h: Likewise. * tree-dfa.c: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-nested.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-sra.c: Likewise. * tree-ssa-alias-warnings.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-live.h: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa.c: Likewise. * tree-vect-analyze.c: Likewise. * tree-vect-transform.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vn.c: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * unwind-dw2-fde.c: Likewise. * unwind.inc: Likewise. * value-prof.c: Likewise. * vmsdbgout.c: Likewise. From-SVN: r136425
2008-06-06 07:42:00 +02:00
We also need to modify some callsites to call the cloned functions instead
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
of the original ones. For a callsite passing an argument found to be a
constant by IPCP, there are two different cases to handle:
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
1. A constant is passed as an argument. In this case the callsite in the
should be redirected to call the cloned callee.
2. A parameter (of the caller) passed as an argument (pass through
argument). In such cases both the caller and the callee have clones and
only the callsite in the cloned caller is redirected to call to the
cloned callee.
cgraph.c: Fix typos in comments. gcc/ * cgraph.c: Fix typos in comments. (cgraph_availability_names): Fix string typo. * fold-const.c: Fix typos in comments. (fold_binary): Fix typo in warning. * genautomata.c: Fix typos in comments. (check_presence_pattern_sets): Fix typo in local variable. (output_description): Fix typo in output. * ggc-zone.c (ggc_pch_finish): Fix typo in error message. * hwint.h: Likewise. * matrix-reorg.c (check_allocation_function): Likewise. * omega.c (smooth_weird_equations): Likewise. * auto-inc-dec.c: Fix typos in comments. * bb-reorder.c: Likewise. * builtins.c: Likewise. * c-common.c: Likewise. * c-cppbuiltin.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * cfgcleanup.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfglayout.c: Likewise. * cfgloopmanip.c: Likewise. * cgraphunit.c: Likewise. * coverage.c: Likewise. * dbxout.c: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * dfp.c: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * dse.c: Likewise. * dwarf2out.c: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * function.c: Likewise. * function.h: Likewise. * gcc.c: Likewise. * gcov-io.c: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattrtab.c: Likewise. * ggc-page.c: Likewise. * gimplify.c: Likewise. * gthr-lynx.h: Likewise. * haifa-sched.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.h: Likewise. * ipa-pure-const.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa.c: Likewise. * loop-doloop.c: Likewise. * mips-tfile.c: Likewise. * mkmap-flat.awk: Likewise. * mkmap-symver.awk: Likewise. * modulo-sched.c: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts.c: Likewise. * passes.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * pretty-print.h: Likewise. * profile.c: Likewise. * protoize.c: Likewise. * ra-conflict.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * regclass.c: Likewise. * regs.h: Likewise. * reload.c: Likewise. * rtl-error.c: Likewise. * rtlanal.c: Likewise. * scan.h: Likewise. * sched-rgn.c: Likewise. * see.c: Likewise. * stmt.c: Likewise. * target.h: Likewise. * tree-dfa.c: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-nested.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-sra.c: Likewise. * tree-ssa-alias-warnings.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-live.h: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa.c: Likewise. * tree-vect-analyze.c: Likewise. * tree-vect-transform.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vn.c: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * unwind-dw2-fde.c: Likewise. * unwind.inc: Likewise. * value-prof.c: Likewise. * vmsdbgout.c: Likewise. From-SVN: r136425
2008-06-06 07:42:00 +02:00
This update is done in two steps: First all cloned functions are created
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
during a traversal of the call graph, during which all callsites are
redirected to call the cloned function. Then the callsites are traversed
and many calls redirected back to fit the description above.
-ipcp_insert_stage() is the third phase driver.
*/
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "tree.h"
#include "target.h"
#include "cgraph.h"
#include "ipa-prop.h"
#include "tree-flow.h"
#include "tree-pass.h"
#include "flags.h"
#include "timevar.h"
#include "diagnostic.h"
#include "tree-dump.h"
#include "tree-inline.h"
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
/* Get the original node field of ipa_node_params associated with node NODE. */
static inline struct cgraph_node *
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
ipcp_get_orig_node (struct cgraph_node *node)
{
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
return IPA_NODE_REF (node)->ipcp_orig_node;
}
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
/* Return true if NODE describes a cloned/versioned function. */
static inline bool
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
ipcp_node_is_clone (struct cgraph_node *node)
{
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
return (ipcp_get_orig_node (node) != NULL);
}
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
/* Create ipa_node_params and its data structures for NEW_NODE. Set ORIG_NODE
as the ipcp_orig_node field in ipa_node_params. */
static void
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
ipcp_init_cloned_node (struct cgraph_node *orig_node,
struct cgraph_node *new_node)
{
ipa-cp.c (ipcp_init_cloned_node): Call ipa_check_create_node_params instead of ipa_create_node_params. 2008-07-08 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_init_cloned_node): Call ipa_check_create_node_params instead of ipa_create_node_params. (ipcp_driver): Allocate infos with ipa_check_create_node_params and ipa_check_create_edge_args, free them with free_all_ipa_structures_after_ipa_cp, call ipa_register_cgraph_hooks. * ipa-prop.c: Include flags.h and tree-inline.h. (ipa_node_params_vector): New variable. (ipa_edge_args_vector): New variable. (edge_removal_hook_holder): New variable. (node_removal_hook_holder): New variable. (edge_duplication_hook_holder): New variable. (node_duplication_hook_holder): New variable. (ipa_detect_param_modifications): Check for presence of modified flags. (ipa_compute_jump_functions): Check for presence of jump functions. (ipa_free_edge_args_substructures): New function. (ipa_create_node_params): Removed. (ipa_free_all_edge_args): Changed to deallocate the on-the-side vector. (ipa_free_node_params_substructures): New function. (ipa_free_all_node_params): Changed to deallocate the on-the-side vector. (ipa_edge_removal_hook): New function. (ipa_node_removal_hook): New function. (duplicate_array): New function. (ipa_edge_duplication_hook): New function. (ipa_node_duplication_hook): New function. (ipa_register_cgraph_hooks): New function. (ipa_unregister_cgraph_hooks): New function. (free_all_ipa_structures_after_ipa_cp): New function. * ipa-prop.h: Include vec.h. (ipa_node_params_t): New typedef with vector types for it. (ipa_edge_args_t): New typedef with vector types for it. (IPA_NODE_REF): Changed to access an on-the-side vector. (IPA_EDGE_REF): Changed to access an on-the-side vector. (ipa_check_create_node_params): New function. (ipa_check_create_edge_args): New function. * Makefile.in (IPA_PROP_H): New variable for ipa-prop.h. Converted all users. From-SVN: r137620
2008-07-08 15:25:24 +02:00
ipa_check_create_node_params ();
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
IPA_NODE_REF (new_node)->ipcp_orig_node = orig_node;
ipa-cp.c (ipcp_init_stage): Calls ipa_set_called_with_variable_arg instead of setting number of formal... 2008-04-30 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_init_stage): Calls ipa_set_called_with_variable_arg instead of setting number of formal parameters to zero. (ipcp_init_stage): Do not set the number of actual parameters to zero either. (ipcp_propagate_stage): Explicitly skipping all calls to nodes which are called with variable number of arguments. (ipcp_insert_stage): Explicitely skipping all nodes which are called with variable number of arguments. (ipcp_callsite_param_print): Skipps callsites to nodes with varaible number of parameters. * ipa-prop.h (struct ipa_node_params): Added flag called_with_var_arguments (ipa_set_param_count): Added. Changed sole setter to use it. (ipa_get_param_count): Added. All readers of param_count converted to use it instead. (ipa_set_called_with_variable_arg): Added. (ipa_is_called_with_var_arguments): Added. (ipa_get_ith_param): Added. All readers of param_decls converted to use it instead. (ipa_set_cs_argument_count): Added, sole writer to argument_count changed to use it. (ipa_get_cs_argument_count): Added, all readers of argument_count changed to cal it. (ipa_get_ith_jump_func): Added. Accessors of jump values changed to use it. * ipa-prop.h (struct ipcp_formal): Renamed to ipcp_lattice (struct ipcp_lattice): Renamed cval_type to type (struct ipa_node_params): ipcp_cval renamed to ipcp_lattices * ipa-cp.c (ipcp_cval_get_cvalue): Changed return value to tree (ipcp_cval_set_cvalue): Changed type of parameter value to tree (ipcp_insert_stage): Changed the type of variable cvalue to tree (ipcp_replace_map_create): Changed the type of parameter cvalue to tree (build_const_val): Changed the type of parameter cvalue to tree (ipcp_propagate_const): Changed the type of parameter cvalue to tree (ipcp_method_cval_set_cvalue_type): Renamed parameter cval_type1 to type * ipa-prop.h (struct ipcp_formal): Replaced cvalue with tree called constant * ipa-prop.c (ipa_methodlist_init): Renamed to ipa_init_func_list (ipa_methodlist_not_empty): Removed, the sole user now checks directly (ipa_add_method): Renamed to ipa_push_func_to_list (ipa_remove_method): Renamed to ipa_pop_func_from_list (ipa_callsite_param_count): Removed. (ipa_callsite_param_count_set): Removed. (ipa_callsite_param): Removed. (ipa_callsite_callee): Removed. (ipa_callsite_compute_param): Renamed to ipa_compute_jump_functions (ipa_callsite_compute_count): Renamed to ipa_count_arguments (ipa_method_formal_count): Removed. (ipa_method_formal_count_set): Removed. (ipa_method_get_tree): Removed. (ipa_method_tree_map_create): Removed. (ipa_method_compute_tree_map): Renamed to ipa_create_param_decls_array (ipa_create_param_decls_array): Creates the array itself (ipa_create_param_decls_array): Temporary variable info instead of a few dereferences. (ipa_method_formal_compute_count): Renamed to ipa_count_formal_params (ipa_method_compute_modify): Renamed to ipa_detect_param_modifications (get_type): Removed. (ipa_jf_get_info_type): Removed. (ipa_node_create): Renamed to ipa_create_node_params (ipa_free): Renamed to ipa_free_all_node_params (ipa_nodes_create): Renamed to ipa_create_all_node_params (ipa_edges_create): Renamed to ipa_create_all_edge_args (ipa_edges_free): Renamed to ipa_free_all_edge_args (ipa_nodes_free): Integrated into ipa_free_all_node_params and removed (ipa_free_all_node_params): Deallocation to jump_functions moved to ipa_free_all_edge_args (ipa_method_tree_print): Renamed to ipa_print_all_tree_maps (ipa_method_modify_print): Renamed to ipa_print_all_params_modified (ipa_create_methodlist_node): Removed. (ipa_methodlist_method): Removed. (ipa_methodlist_method_set): Removed. (ipa_methodlist_next_method): Removed. (ipa_methodlist_next_method_set): Removed. (ipa_method_is_modified): Removed. (ipa_method_modify_create): Removed. (ipa_method_modify_init): Temporary variable info instead of a few dereferences. (ipa_detect_param_modifications): Temporary variable info instead of a few dereferences. (ipa_compute_jump_functions): Temporary variable info instead of a few dereferences. (ipa_method_modify_set): Removed. (ipa_method_tree_map): Renamed to ipa_get_param_decl_index (ipa_get_param_decl_index): Now accepts struct ipa_node_params rather than craph_node as the first parameter. (ipa_method_modify_stmt): Renamed to ipa_check_stmt_modifications (ipa_method_modify_init): Removed. (ipa_compute_jump_functions): Added a temp variable instead of repeatadly dereferencing the cgraph_edge.aux pointer (ipa_callsite_param_set_type): Removed. (ipa_compute_jump_functions): i renamed to index and moved to an inner block (ipa_callsite_param_set_info_type_formal): Removed. (ipa_callsite_param_set_info_type): Removed. (ipa_callsite_param_map_create): Removed. (ipa_callsite_tree): Removed. (ipa_callsite_caller): Removed. (ipa_pop_func_from_list): return_method removed to return_func * ipa-prop.h (enum cvalue_type): Renamed to ipa_lattice_type, prefixed all values with IPA_. Changed all users. (enum jump_func_type): Rnamed UNKNOWN_IPATYPE to IPA_UNKNOWN, CONST_IPATYPE to IPA_CONST, CONST_IPATYPE_REF to IPA_CONST_REF and FORMAL_IPATYPE IPA_PASS_THROUGH. (union parameter_info): Renamed to jump_func_value. (union jump_func_value): Renamed value to constant (struct ipa_jump_func): Renamed info_type to value (struct ipa_node): Renamed to ipa_node_params (struct ipa_node_params): Renamed ipa_arg_num to param_count (struct ipa_node_params): Renamed ipa_param_tree to param_decls (struct ipa_node_params): Renamed ipa_mod to modified_flags (struct ipa_edge): Renamed to ipa_edge_args (struct ipa_edge_args): Renamed ipa_param_num to argument_count (struct ipa_edge_args): Renamed ipa_param_map to jump_functions (struct ipa_methodlist): Renamed to ipa_func_list (struct ipa_func_list): method_p renamed to node, next_method renamed to next (ipa_methodlist_p): Removed, switched all users to struct pointer (IS_VALID_TREE_MAP_INDEX): Renamed to IS_VALID_JUMP_FUNC_INDEX From-SVN: r134818
2008-04-30 12:01:59 +02:00
ipa_count_formal_params (new_node);
ipa_create_param_decls_array (new_node);
}
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
/* Return scale for NODE. */
static inline gcov_type
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
ipcp_get_node_scale (struct cgraph_node *node)
{
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
return IPA_NODE_REF (node)->count_scale;
}
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
/* Set COUNT as scale for NODE. */
static inline void
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
ipcp_set_node_scale (struct cgraph_node *node, gcov_type count)
{
IPA_NODE_REF (node)->count_scale = count;
}
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
/* Return whether LAT is a constant lattice. */
static inline bool
ipcp_lat_is_const (struct ipcp_lattice *lat)
{
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
if (lat->type == IPA_CONST_VALUE || lat->type == IPA_CONST_VALUE_REF)
return true;
else
return false;
}
ipa-cp.c (ipcp_print_edge_profiles): Test for node->analyzed rather than for DECL_SAVED_TREE. 2008-07-23 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_print_edge_profiles): Test for node->analyzed rather than for DECL_SAVED_TREE. * ipa-prop.c: Include diagnostic.h. (ipa_check_stmt_modifications): Check LHS of GIMPLE_MODIFY_EXPRs thoroughly. (ipa_detect_param_modifications): Function rewritten from scratch. (ipa_compute_jump_functions): Changed accesses to modification flags. (ipa_free_node_params_substructures): Update flags destruction. (ipa_node_duplication_hook): Update flags duplication. (ipa_print_all_params_modified): Updated flag access. * ipa-prop.h (struct ipa_param_flags): New structure. (struct ipa_node_params): New field modification_analysis_done, modified_flags changed into param_flags. (ipa_is_ith_param_modified): Changed to use new flags. * Makefile.in (ipa-prop.o): Add $(DIAGNOSTIC_H) to dependencies. * ipa-prop.c (ipa_print_all_jump_functions): Moved here from ipa-cp.c and split into two functions. (ipa_print_node_jump_functions): New function. (compute_scalar_jump_functions): New function. (type_like_member_ptr_p): New function. (compute_pass_through_member_ptrs): New function. (fill_member_ptr_cst_jump_function): New function. (determine_cst_member_ptr): New function. (compute_cst_member_ptr_arguments): New function. (ipa_compute_jump_functions): Complete rewrite. * ipa-prop.h (enum jump_func_type): Make explicit that we depend on IPA_UNKNOWN being zero. Added value IPA_CONST_MEMBER_PTR. (struct ipa_member_ptr_cst): New structure. (union jump_func_value): New field member_cst. * ipa-cp.c (ipcp_lat_is_insertable): New function. (ipcp_lattice_from_jfunc): Produces bottom lattices for unhandled jump function types. (ipcp_print_all_lattices): Slight fprintf rearrangement. (ipcp_print_all_structures): Call ipa_print_all_jump_functions instead of ipcp_print_all_jump_functions. (ipcp_insert_stage): Use ipcp_lat_is_insertable, create replace maps only for replacable scalars. * doc/invoke.texi (Optimize options): Add description of -findirect-inlining. * common.opt (flag_indirect_inlining): New flag. * opts.c (decode_options): Set flag_indirect_inlining when optimize >= 3. * ipa-inline.c: Include ipa-prop.h. (inline_indirect_intraprocedural_analysis): New function. (inline_generate_summary): Allocate parameter and argument info structures, call inline_indirect_intraprocedural_analysis on each node when doing indirect inlining and deallocate indirect inlining data structures in the end. * ipa-prop.c (ipa_create_param_decls_array): Return if already done. (free_all_ipa_structures_after_iinln): New function. (free_all_ipa_structures_after_ipa_cp): Checks whether iinln will be done. * Makefile.in (ipa-inline.o): Added $(IPA_PROP_H) to dependencies. * cgraphbuild.c (compute_call_stmt_bb_frequency): New function. (build_cgraph_edges): Call compute_call_stmt_bb_frequency instead of computing the frequency separately. (rebuild_cgraph_edges): Call compute_call_stmt_bb_frequency instead of computing the frequency separately. * ipa-cp.c (ipcp_print_all_structures): Replace a call to ipa_print_all_param_modified with a call to ipa_print_all_param_flags. * ipa-prop.c (ipa_get_member_ptr_load_param): New function. (ipa_get_stmt_member_ptr_load_param): New function. (ipa_is_ssa_with_stmt_def): New function. (ipa_note_param_call): New function. (ipa_analyze_call_uses): New function. (ipa_analyze_stmt_uses): New function. (ipa_analyze_params_uses): New function. (ipa_free_node_params_substructures): Also free the param_calls linked list. (ipa_node_duplication_hook): Also duplicate the param_calls linked list. (ipa_print_node_param_flags): New function. (ipa_print_all_params_modified): Renamed to ipa_print_all_param_flags. (ipa_print_all_param_flags): Calls ipa_print_node_param_flags. * ipa-prop.h (struct ipa_param_flags): New field called. (struct ipa_param_call_note): New structure. (struct ipa_node_params): New fields param_calls and uses_analysis_done. (ipa_is_ith_param_called): New function. * ipa-inline.c (inline_indirect_intraprocedural_analysis): Call ipa_analyze_params_uses and dump parameter flags. * ipa-inline.c (cgraph_decide_recursive_inlining): Call ipa_propagate_indirect_call_infos if performing indirect inlining, pass a new parameter new_edges to it. (add_new_edges_to_heap): New fucntion. (cgraph_decide_inlining_of_small_functions): New vector new_indirect_edges for newly found indirect edges , call ipa_propagate_indirect_call_infos after inlining. (cgraph_decide_inlining): Call ipa_propagate_indirect_call_infos after inlining if performing indirect inlining. Call free_all_ipa_structures_after_iinln when doing so too. (inline_generate_summary): Do not call free_all_ipa_structures_after_iinln here. * ipa-prop.c (update_jump_functions_after_inlining): New function. (print_edge_addition_message): New function. (update_call_notes_after_inlining): New function. (propagate_info_to_inlined_callees): New function. (ipa_propagate_indirect_call_infos): New function. * ipa-prop.h: Include cgraph.h (struct ipa_param_call_note): Fields reordered, new field processed. * cgraph.h (cgraph_edge): Shrink loop_nest field to 31 bits, add a new flag indirect_call. * cgraphunit.c (verify_cgraph_node): Allow indirect edges not to have rediscovered call statements. * cgraph.c (cgraph_create_edge): Initialize indirect_call to zero. (dump_cgraph_node): Dump also the indirect_call flag. (cgraph_clone_edge): Copy also the indirect_call flag. * tree-inline.c (copy_bb): Do not check for fndecls from call expressions, check for edge availability when moving clones. (get_indirect_callee_fndecl): New function. (expand_call_inline): If callee declaration is not apprent from the statement, try calling get_indirect_callee_fndecl. Do not issue warnings or call sorry when not inlinings an indirect edge. * Makefile.in (IPA_PROP_H): Added $(CGRAPH_H) to dependencies. * ipa-prop.c (ipa_print_node_param_flags): Make the dump format a bit more frandly to matching. * testsuite/g++.dg/ipa/iinline-1.C: New testcase. * testsuite/gcc.dg/ipa/iinline-1.c: New testcase. * testsuite/gcc.dg/ipa/modif-1.c: New testcase. From-SVN: r138092
2008-07-23 21:45:45 +02:00
/* Return whether LAT is a constant lattice that ipa-cp can actually insert
into the code (i.e. constants excluding member pointers and pointers). */
static inline bool
ipcp_lat_is_insertable (struct ipcp_lattice *lat)
{
if ((lat->type == IPA_CONST_VALUE || lat->type == IPA_CONST_VALUE_REF)
&& !POINTER_TYPE_P (TREE_TYPE (lat->constant)))
return true;
else
return false;
}
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
/* Return true if LAT1 and LAT2 are equal. */
static inline bool
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
ipcp_lats_are_equal (struct ipcp_lattice *lat1, struct ipcp_lattice *lat2)
{
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
gcc_assert (ipcp_lat_is_const (lat1) && ipcp_lat_is_const (lat2));
if (lat1->type != lat2->type)
return false;
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
if (operand_equal_p (lat1->constant, lat2->constant, 0))
return true;
return false;
}
/* Compute Meet arithmetics:
ipa-cp.c (ipcp_init_stage): Calls ipa_set_called_with_variable_arg instead of setting number of formal... 2008-04-30 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_init_stage): Calls ipa_set_called_with_variable_arg instead of setting number of formal parameters to zero. (ipcp_init_stage): Do not set the number of actual parameters to zero either. (ipcp_propagate_stage): Explicitly skipping all calls to nodes which are called with variable number of arguments. (ipcp_insert_stage): Explicitely skipping all nodes which are called with variable number of arguments. (ipcp_callsite_param_print): Skipps callsites to nodes with varaible number of parameters. * ipa-prop.h (struct ipa_node_params): Added flag called_with_var_arguments (ipa_set_param_count): Added. Changed sole setter to use it. (ipa_get_param_count): Added. All readers of param_count converted to use it instead. (ipa_set_called_with_variable_arg): Added. (ipa_is_called_with_var_arguments): Added. (ipa_get_ith_param): Added. All readers of param_decls converted to use it instead. (ipa_set_cs_argument_count): Added, sole writer to argument_count changed to use it. (ipa_get_cs_argument_count): Added, all readers of argument_count changed to cal it. (ipa_get_ith_jump_func): Added. Accessors of jump values changed to use it. * ipa-prop.h (struct ipcp_formal): Renamed to ipcp_lattice (struct ipcp_lattice): Renamed cval_type to type (struct ipa_node_params): ipcp_cval renamed to ipcp_lattices * ipa-cp.c (ipcp_cval_get_cvalue): Changed return value to tree (ipcp_cval_set_cvalue): Changed type of parameter value to tree (ipcp_insert_stage): Changed the type of variable cvalue to tree (ipcp_replace_map_create): Changed the type of parameter cvalue to tree (build_const_val): Changed the type of parameter cvalue to tree (ipcp_propagate_const): Changed the type of parameter cvalue to tree (ipcp_method_cval_set_cvalue_type): Renamed parameter cval_type1 to type * ipa-prop.h (struct ipcp_formal): Replaced cvalue with tree called constant * ipa-prop.c (ipa_methodlist_init): Renamed to ipa_init_func_list (ipa_methodlist_not_empty): Removed, the sole user now checks directly (ipa_add_method): Renamed to ipa_push_func_to_list (ipa_remove_method): Renamed to ipa_pop_func_from_list (ipa_callsite_param_count): Removed. (ipa_callsite_param_count_set): Removed. (ipa_callsite_param): Removed. (ipa_callsite_callee): Removed. (ipa_callsite_compute_param): Renamed to ipa_compute_jump_functions (ipa_callsite_compute_count): Renamed to ipa_count_arguments (ipa_method_formal_count): Removed. (ipa_method_formal_count_set): Removed. (ipa_method_get_tree): Removed. (ipa_method_tree_map_create): Removed. (ipa_method_compute_tree_map): Renamed to ipa_create_param_decls_array (ipa_create_param_decls_array): Creates the array itself (ipa_create_param_decls_array): Temporary variable info instead of a few dereferences. (ipa_method_formal_compute_count): Renamed to ipa_count_formal_params (ipa_method_compute_modify): Renamed to ipa_detect_param_modifications (get_type): Removed. (ipa_jf_get_info_type): Removed. (ipa_node_create): Renamed to ipa_create_node_params (ipa_free): Renamed to ipa_free_all_node_params (ipa_nodes_create): Renamed to ipa_create_all_node_params (ipa_edges_create): Renamed to ipa_create_all_edge_args (ipa_edges_free): Renamed to ipa_free_all_edge_args (ipa_nodes_free): Integrated into ipa_free_all_node_params and removed (ipa_free_all_node_params): Deallocation to jump_functions moved to ipa_free_all_edge_args (ipa_method_tree_print): Renamed to ipa_print_all_tree_maps (ipa_method_modify_print): Renamed to ipa_print_all_params_modified (ipa_create_methodlist_node): Removed. (ipa_methodlist_method): Removed. (ipa_methodlist_method_set): Removed. (ipa_methodlist_next_method): Removed. (ipa_methodlist_next_method_set): Removed. (ipa_method_is_modified): Removed. (ipa_method_modify_create): Removed. (ipa_method_modify_init): Temporary variable info instead of a few dereferences. (ipa_detect_param_modifications): Temporary variable info instead of a few dereferences. (ipa_compute_jump_functions): Temporary variable info instead of a few dereferences. (ipa_method_modify_set): Removed. (ipa_method_tree_map): Renamed to ipa_get_param_decl_index (ipa_get_param_decl_index): Now accepts struct ipa_node_params rather than craph_node as the first parameter. (ipa_method_modify_stmt): Renamed to ipa_check_stmt_modifications (ipa_method_modify_init): Removed. (ipa_compute_jump_functions): Added a temp variable instead of repeatadly dereferencing the cgraph_edge.aux pointer (ipa_callsite_param_set_type): Removed. (ipa_compute_jump_functions): i renamed to index and moved to an inner block (ipa_callsite_param_set_info_type_formal): Removed. (ipa_callsite_param_set_info_type): Removed. (ipa_callsite_param_map_create): Removed. (ipa_callsite_tree): Removed. (ipa_callsite_caller): Removed. (ipa_pop_func_from_list): return_method removed to return_func * ipa-prop.h (enum cvalue_type): Renamed to ipa_lattice_type, prefixed all values with IPA_. Changed all users. (enum jump_func_type): Rnamed UNKNOWN_IPATYPE to IPA_UNKNOWN, CONST_IPATYPE to IPA_CONST, CONST_IPATYPE_REF to IPA_CONST_REF and FORMAL_IPATYPE IPA_PASS_THROUGH. (union parameter_info): Renamed to jump_func_value. (union jump_func_value): Renamed value to constant (struct ipa_jump_func): Renamed info_type to value (struct ipa_node): Renamed to ipa_node_params (struct ipa_node_params): Renamed ipa_arg_num to param_count (struct ipa_node_params): Renamed ipa_param_tree to param_decls (struct ipa_node_params): Renamed ipa_mod to modified_flags (struct ipa_edge): Renamed to ipa_edge_args (struct ipa_edge_args): Renamed ipa_param_num to argument_count (struct ipa_edge_args): Renamed ipa_param_map to jump_functions (struct ipa_methodlist): Renamed to ipa_func_list (struct ipa_func_list): method_p renamed to node, next_method renamed to next (ipa_methodlist_p): Removed, switched all users to struct pointer (IS_VALID_TREE_MAP_INDEX): Renamed to IS_VALID_JUMP_FUNC_INDEX From-SVN: r134818
2008-04-30 12:01:59 +02:00
Meet (IPA_BOTTOM, x) = IPA_BOTTOM
Meet (IPA_TOP,x) = x
Meet (const_a,const_b) = IPA_BOTTOM, if const_a != const_b.
MEET (const_a,const_b) = const_a, if const_a == const_b.*/
static void
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
ipa_lattice_meet (struct ipcp_lattice *res, struct ipcp_lattice *lat1,
struct ipcp_lattice *lat2)
{
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
if (lat1->type == IPA_BOTTOM || lat2->type == IPA_BOTTOM)
{
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
res->type = IPA_BOTTOM;
return;
}
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
if (lat1->type == IPA_TOP)
{
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
res->type = lat2->type;
res->constant = lat2->constant;
return;
}
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
if (lat2->type == IPA_TOP)
{
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
res->type = lat1->type;
res->constant = lat1->constant;
return;
}
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
if (!ipcp_lats_are_equal (lat1, lat2))
{
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
res->type = IPA_BOTTOM;
return;
}
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
res->type = lat1->type;
res->constant = lat1->constant;
}
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
/* Return the lattice corresponding to the Ith formal parameter of the function
described by INFO. */
ipa-cp.c (ipcp_init_stage): Calls ipa_set_called_with_variable_arg instead of setting number of formal... 2008-04-30 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_init_stage): Calls ipa_set_called_with_variable_arg instead of setting number of formal parameters to zero. (ipcp_init_stage): Do not set the number of actual parameters to zero either. (ipcp_propagate_stage): Explicitly skipping all calls to nodes which are called with variable number of arguments. (ipcp_insert_stage): Explicitely skipping all nodes which are called with variable number of arguments. (ipcp_callsite_param_print): Skipps callsites to nodes with varaible number of parameters. * ipa-prop.h (struct ipa_node_params): Added flag called_with_var_arguments (ipa_set_param_count): Added. Changed sole setter to use it. (ipa_get_param_count): Added. All readers of param_count converted to use it instead. (ipa_set_called_with_variable_arg): Added. (ipa_is_called_with_var_arguments): Added. (ipa_get_ith_param): Added. All readers of param_decls converted to use it instead. (ipa_set_cs_argument_count): Added, sole writer to argument_count changed to use it. (ipa_get_cs_argument_count): Added, all readers of argument_count changed to cal it. (ipa_get_ith_jump_func): Added. Accessors of jump values changed to use it. * ipa-prop.h (struct ipcp_formal): Renamed to ipcp_lattice (struct ipcp_lattice): Renamed cval_type to type (struct ipa_node_params): ipcp_cval renamed to ipcp_lattices * ipa-cp.c (ipcp_cval_get_cvalue): Changed return value to tree (ipcp_cval_set_cvalue): Changed type of parameter value to tree (ipcp_insert_stage): Changed the type of variable cvalue to tree (ipcp_replace_map_create): Changed the type of parameter cvalue to tree (build_const_val): Changed the type of parameter cvalue to tree (ipcp_propagate_const): Changed the type of parameter cvalue to tree (ipcp_method_cval_set_cvalue_type): Renamed parameter cval_type1 to type * ipa-prop.h (struct ipcp_formal): Replaced cvalue with tree called constant * ipa-prop.c (ipa_methodlist_init): Renamed to ipa_init_func_list (ipa_methodlist_not_empty): Removed, the sole user now checks directly (ipa_add_method): Renamed to ipa_push_func_to_list (ipa_remove_method): Renamed to ipa_pop_func_from_list (ipa_callsite_param_count): Removed. (ipa_callsite_param_count_set): Removed. (ipa_callsite_param): Removed. (ipa_callsite_callee): Removed. (ipa_callsite_compute_param): Renamed to ipa_compute_jump_functions (ipa_callsite_compute_count): Renamed to ipa_count_arguments (ipa_method_formal_count): Removed. (ipa_method_formal_count_set): Removed. (ipa_method_get_tree): Removed. (ipa_method_tree_map_create): Removed. (ipa_method_compute_tree_map): Renamed to ipa_create_param_decls_array (ipa_create_param_decls_array): Creates the array itself (ipa_create_param_decls_array): Temporary variable info instead of a few dereferences. (ipa_method_formal_compute_count): Renamed to ipa_count_formal_params (ipa_method_compute_modify): Renamed to ipa_detect_param_modifications (get_type): Removed. (ipa_jf_get_info_type): Removed. (ipa_node_create): Renamed to ipa_create_node_params (ipa_free): Renamed to ipa_free_all_node_params (ipa_nodes_create): Renamed to ipa_create_all_node_params (ipa_edges_create): Renamed to ipa_create_all_edge_args (ipa_edges_free): Renamed to ipa_free_all_edge_args (ipa_nodes_free): Integrated into ipa_free_all_node_params and removed (ipa_free_all_node_params): Deallocation to jump_functions moved to ipa_free_all_edge_args (ipa_method_tree_print): Renamed to ipa_print_all_tree_maps (ipa_method_modify_print): Renamed to ipa_print_all_params_modified (ipa_create_methodlist_node): Removed. (ipa_methodlist_method): Removed. (ipa_methodlist_method_set): Removed. (ipa_methodlist_next_method): Removed. (ipa_methodlist_next_method_set): Removed. (ipa_method_is_modified): Removed. (ipa_method_modify_create): Removed. (ipa_method_modify_init): Temporary variable info instead of a few dereferences. (ipa_detect_param_modifications): Temporary variable info instead of a few dereferences. (ipa_compute_jump_functions): Temporary variable info instead of a few dereferences. (ipa_method_modify_set): Removed. (ipa_method_tree_map): Renamed to ipa_get_param_decl_index (ipa_get_param_decl_index): Now accepts struct ipa_node_params rather than craph_node as the first parameter. (ipa_method_modify_stmt): Renamed to ipa_check_stmt_modifications (ipa_method_modify_init): Removed. (ipa_compute_jump_functions): Added a temp variable instead of repeatadly dereferencing the cgraph_edge.aux pointer (ipa_callsite_param_set_type): Removed. (ipa_compute_jump_functions): i renamed to index and moved to an inner block (ipa_callsite_param_set_info_type_formal): Removed. (ipa_callsite_param_set_info_type): Removed. (ipa_callsite_param_map_create): Removed. (ipa_callsite_tree): Removed. (ipa_callsite_caller): Removed. (ipa_pop_func_from_list): return_method removed to return_func * ipa-prop.h (enum cvalue_type): Renamed to ipa_lattice_type, prefixed all values with IPA_. Changed all users. (enum jump_func_type): Rnamed UNKNOWN_IPATYPE to IPA_UNKNOWN, CONST_IPATYPE to IPA_CONST, CONST_IPATYPE_REF to IPA_CONST_REF and FORMAL_IPATYPE IPA_PASS_THROUGH. (union parameter_info): Renamed to jump_func_value. (union jump_func_value): Renamed value to constant (struct ipa_jump_func): Renamed info_type to value (struct ipa_node): Renamed to ipa_node_params (struct ipa_node_params): Renamed ipa_arg_num to param_count (struct ipa_node_params): Renamed ipa_param_tree to param_decls (struct ipa_node_params): Renamed ipa_mod to modified_flags (struct ipa_edge): Renamed to ipa_edge_args (struct ipa_edge_args): Renamed ipa_param_num to argument_count (struct ipa_edge_args): Renamed ipa_param_map to jump_functions (struct ipa_methodlist): Renamed to ipa_func_list (struct ipa_func_list): method_p renamed to node, next_method renamed to next (ipa_methodlist_p): Removed, switched all users to struct pointer (IS_VALID_TREE_MAP_INDEX): Renamed to IS_VALID_JUMP_FUNC_INDEX From-SVN: r134818
2008-04-30 12:01:59 +02:00
static inline struct ipcp_lattice *
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
ipcp_get_ith_lattice (struct ipa_node_params *info, int i)
{
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
return &(info->ipcp_lattices[i]);
}
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
/* Given the jump function JFUNC, compute the lattice LAT that describes the
value coming down the callsite. INFO describes the caller node so that
pass-through jump functions can be evaluated. */
static void
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
ipcp_lattice_from_jfunc (struct ipa_node_params *info, struct ipcp_lattice *lat,
struct ipa_jump_func *jfunc)
{
ipa-cp.c (ipcp_print_edge_profiles): Test for node->analyzed rather than for DECL_SAVED_TREE. 2008-07-23 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_print_edge_profiles): Test for node->analyzed rather than for DECL_SAVED_TREE. * ipa-prop.c: Include diagnostic.h. (ipa_check_stmt_modifications): Check LHS of GIMPLE_MODIFY_EXPRs thoroughly. (ipa_detect_param_modifications): Function rewritten from scratch. (ipa_compute_jump_functions): Changed accesses to modification flags. (ipa_free_node_params_substructures): Update flags destruction. (ipa_node_duplication_hook): Update flags duplication. (ipa_print_all_params_modified): Updated flag access. * ipa-prop.h (struct ipa_param_flags): New structure. (struct ipa_node_params): New field modification_analysis_done, modified_flags changed into param_flags. (ipa_is_ith_param_modified): Changed to use new flags. * Makefile.in (ipa-prop.o): Add $(DIAGNOSTIC_H) to dependencies. * ipa-prop.c (ipa_print_all_jump_functions): Moved here from ipa-cp.c and split into two functions. (ipa_print_node_jump_functions): New function. (compute_scalar_jump_functions): New function. (type_like_member_ptr_p): New function. (compute_pass_through_member_ptrs): New function. (fill_member_ptr_cst_jump_function): New function. (determine_cst_member_ptr): New function. (compute_cst_member_ptr_arguments): New function. (ipa_compute_jump_functions): Complete rewrite. * ipa-prop.h (enum jump_func_type): Make explicit that we depend on IPA_UNKNOWN being zero. Added value IPA_CONST_MEMBER_PTR. (struct ipa_member_ptr_cst): New structure. (union jump_func_value): New field member_cst. * ipa-cp.c (ipcp_lat_is_insertable): New function. (ipcp_lattice_from_jfunc): Produces bottom lattices for unhandled jump function types. (ipcp_print_all_lattices): Slight fprintf rearrangement. (ipcp_print_all_structures): Call ipa_print_all_jump_functions instead of ipcp_print_all_jump_functions. (ipcp_insert_stage): Use ipcp_lat_is_insertable, create replace maps only for replacable scalars. * doc/invoke.texi (Optimize options): Add description of -findirect-inlining. * common.opt (flag_indirect_inlining): New flag. * opts.c (decode_options): Set flag_indirect_inlining when optimize >= 3. * ipa-inline.c: Include ipa-prop.h. (inline_indirect_intraprocedural_analysis): New function. (inline_generate_summary): Allocate parameter and argument info structures, call inline_indirect_intraprocedural_analysis on each node when doing indirect inlining and deallocate indirect inlining data structures in the end. * ipa-prop.c (ipa_create_param_decls_array): Return if already done. (free_all_ipa_structures_after_iinln): New function. (free_all_ipa_structures_after_ipa_cp): Checks whether iinln will be done. * Makefile.in (ipa-inline.o): Added $(IPA_PROP_H) to dependencies. * cgraphbuild.c (compute_call_stmt_bb_frequency): New function. (build_cgraph_edges): Call compute_call_stmt_bb_frequency instead of computing the frequency separately. (rebuild_cgraph_edges): Call compute_call_stmt_bb_frequency instead of computing the frequency separately. * ipa-cp.c (ipcp_print_all_structures): Replace a call to ipa_print_all_param_modified with a call to ipa_print_all_param_flags. * ipa-prop.c (ipa_get_member_ptr_load_param): New function. (ipa_get_stmt_member_ptr_load_param): New function. (ipa_is_ssa_with_stmt_def): New function. (ipa_note_param_call): New function. (ipa_analyze_call_uses): New function. (ipa_analyze_stmt_uses): New function. (ipa_analyze_params_uses): New function. (ipa_free_node_params_substructures): Also free the param_calls linked list. (ipa_node_duplication_hook): Also duplicate the param_calls linked list. (ipa_print_node_param_flags): New function. (ipa_print_all_params_modified): Renamed to ipa_print_all_param_flags. (ipa_print_all_param_flags): Calls ipa_print_node_param_flags. * ipa-prop.h (struct ipa_param_flags): New field called. (struct ipa_param_call_note): New structure. (struct ipa_node_params): New fields param_calls and uses_analysis_done. (ipa_is_ith_param_called): New function. * ipa-inline.c (inline_indirect_intraprocedural_analysis): Call ipa_analyze_params_uses and dump parameter flags. * ipa-inline.c (cgraph_decide_recursive_inlining): Call ipa_propagate_indirect_call_infos if performing indirect inlining, pass a new parameter new_edges to it. (add_new_edges_to_heap): New fucntion. (cgraph_decide_inlining_of_small_functions): New vector new_indirect_edges for newly found indirect edges , call ipa_propagate_indirect_call_infos after inlining. (cgraph_decide_inlining): Call ipa_propagate_indirect_call_infos after inlining if performing indirect inlining. Call free_all_ipa_structures_after_iinln when doing so too. (inline_generate_summary): Do not call free_all_ipa_structures_after_iinln here. * ipa-prop.c (update_jump_functions_after_inlining): New function. (print_edge_addition_message): New function. (update_call_notes_after_inlining): New function. (propagate_info_to_inlined_callees): New function. (ipa_propagate_indirect_call_infos): New function. * ipa-prop.h: Include cgraph.h (struct ipa_param_call_note): Fields reordered, new field processed. * cgraph.h (cgraph_edge): Shrink loop_nest field to 31 bits, add a new flag indirect_call. * cgraphunit.c (verify_cgraph_node): Allow indirect edges not to have rediscovered call statements. * cgraph.c (cgraph_create_edge): Initialize indirect_call to zero. (dump_cgraph_node): Dump also the indirect_call flag. (cgraph_clone_edge): Copy also the indirect_call flag. * tree-inline.c (copy_bb): Do not check for fndecls from call expressions, check for edge availability when moving clones. (get_indirect_callee_fndecl): New function. (expand_call_inline): If callee declaration is not apprent from the statement, try calling get_indirect_callee_fndecl. Do not issue warnings or call sorry when not inlinings an indirect edge. * Makefile.in (IPA_PROP_H): Added $(CGRAPH_H) to dependencies. * ipa-prop.c (ipa_print_node_param_flags): Make the dump format a bit more frandly to matching. * testsuite/g++.dg/ipa/iinline-1.C: New testcase. * testsuite/gcc.dg/ipa/iinline-1.c: New testcase. * testsuite/gcc.dg/ipa/modif-1.c: New testcase. From-SVN: r138092
2008-07-23 21:45:45 +02:00
if (jfunc->type == IPA_CONST)
{
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
lat->type = IPA_CONST_VALUE;
lat->constant = jfunc->value.constant;
}
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
else if (jfunc->type == IPA_CONST_REF)
{
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
lat->type = IPA_CONST_VALUE_REF;
lat->constant = jfunc->value.constant;
}
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
else if (jfunc->type == IPA_PASS_THROUGH)
{
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
struct ipcp_lattice *caller_lat;
caller_lat = ipcp_get_ith_lattice (info, jfunc->value.formal_id);
lat->type = caller_lat->type;
lat->constant = caller_lat->constant;
}
ipa-cp.c (ipcp_print_edge_profiles): Test for node->analyzed rather than for DECL_SAVED_TREE. 2008-07-23 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_print_edge_profiles): Test for node->analyzed rather than for DECL_SAVED_TREE. * ipa-prop.c: Include diagnostic.h. (ipa_check_stmt_modifications): Check LHS of GIMPLE_MODIFY_EXPRs thoroughly. (ipa_detect_param_modifications): Function rewritten from scratch. (ipa_compute_jump_functions): Changed accesses to modification flags. (ipa_free_node_params_substructures): Update flags destruction. (ipa_node_duplication_hook): Update flags duplication. (ipa_print_all_params_modified): Updated flag access. * ipa-prop.h (struct ipa_param_flags): New structure. (struct ipa_node_params): New field modification_analysis_done, modified_flags changed into param_flags. (ipa_is_ith_param_modified): Changed to use new flags. * Makefile.in (ipa-prop.o): Add $(DIAGNOSTIC_H) to dependencies. * ipa-prop.c (ipa_print_all_jump_functions): Moved here from ipa-cp.c and split into two functions. (ipa_print_node_jump_functions): New function. (compute_scalar_jump_functions): New function. (type_like_member_ptr_p): New function. (compute_pass_through_member_ptrs): New function. (fill_member_ptr_cst_jump_function): New function. (determine_cst_member_ptr): New function. (compute_cst_member_ptr_arguments): New function. (ipa_compute_jump_functions): Complete rewrite. * ipa-prop.h (enum jump_func_type): Make explicit that we depend on IPA_UNKNOWN being zero. Added value IPA_CONST_MEMBER_PTR. (struct ipa_member_ptr_cst): New structure. (union jump_func_value): New field member_cst. * ipa-cp.c (ipcp_lat_is_insertable): New function. (ipcp_lattice_from_jfunc): Produces bottom lattices for unhandled jump function types. (ipcp_print_all_lattices): Slight fprintf rearrangement. (ipcp_print_all_structures): Call ipa_print_all_jump_functions instead of ipcp_print_all_jump_functions. (ipcp_insert_stage): Use ipcp_lat_is_insertable, create replace maps only for replacable scalars. * doc/invoke.texi (Optimize options): Add description of -findirect-inlining. * common.opt (flag_indirect_inlining): New flag. * opts.c (decode_options): Set flag_indirect_inlining when optimize >= 3. * ipa-inline.c: Include ipa-prop.h. (inline_indirect_intraprocedural_analysis): New function. (inline_generate_summary): Allocate parameter and argument info structures, call inline_indirect_intraprocedural_analysis on each node when doing indirect inlining and deallocate indirect inlining data structures in the end. * ipa-prop.c (ipa_create_param_decls_array): Return if already done. (free_all_ipa_structures_after_iinln): New function. (free_all_ipa_structures_after_ipa_cp): Checks whether iinln will be done. * Makefile.in (ipa-inline.o): Added $(IPA_PROP_H) to dependencies. * cgraphbuild.c (compute_call_stmt_bb_frequency): New function. (build_cgraph_edges): Call compute_call_stmt_bb_frequency instead of computing the frequency separately. (rebuild_cgraph_edges): Call compute_call_stmt_bb_frequency instead of computing the frequency separately. * ipa-cp.c (ipcp_print_all_structures): Replace a call to ipa_print_all_param_modified with a call to ipa_print_all_param_flags. * ipa-prop.c (ipa_get_member_ptr_load_param): New function. (ipa_get_stmt_member_ptr_load_param): New function. (ipa_is_ssa_with_stmt_def): New function. (ipa_note_param_call): New function. (ipa_analyze_call_uses): New function. (ipa_analyze_stmt_uses): New function. (ipa_analyze_params_uses): New function. (ipa_free_node_params_substructures): Also free the param_calls linked list. (ipa_node_duplication_hook): Also duplicate the param_calls linked list. (ipa_print_node_param_flags): New function. (ipa_print_all_params_modified): Renamed to ipa_print_all_param_flags. (ipa_print_all_param_flags): Calls ipa_print_node_param_flags. * ipa-prop.h (struct ipa_param_flags): New field called. (struct ipa_param_call_note): New structure. (struct ipa_node_params): New fields param_calls and uses_analysis_done. (ipa_is_ith_param_called): New function. * ipa-inline.c (inline_indirect_intraprocedural_analysis): Call ipa_analyze_params_uses and dump parameter flags. * ipa-inline.c (cgraph_decide_recursive_inlining): Call ipa_propagate_indirect_call_infos if performing indirect inlining, pass a new parameter new_edges to it. (add_new_edges_to_heap): New fucntion. (cgraph_decide_inlining_of_small_functions): New vector new_indirect_edges for newly found indirect edges , call ipa_propagate_indirect_call_infos after inlining. (cgraph_decide_inlining): Call ipa_propagate_indirect_call_infos after inlining if performing indirect inlining. Call free_all_ipa_structures_after_iinln when doing so too. (inline_generate_summary): Do not call free_all_ipa_structures_after_iinln here. * ipa-prop.c (update_jump_functions_after_inlining): New function. (print_edge_addition_message): New function. (update_call_notes_after_inlining): New function. (propagate_info_to_inlined_callees): New function. (ipa_propagate_indirect_call_infos): New function. * ipa-prop.h: Include cgraph.h (struct ipa_param_call_note): Fields reordered, new field processed. * cgraph.h (cgraph_edge): Shrink loop_nest field to 31 bits, add a new flag indirect_call. * cgraphunit.c (verify_cgraph_node): Allow indirect edges not to have rediscovered call statements. * cgraph.c (cgraph_create_edge): Initialize indirect_call to zero. (dump_cgraph_node): Dump also the indirect_call flag. (cgraph_clone_edge): Copy also the indirect_call flag. * tree-inline.c (copy_bb): Do not check for fndecls from call expressions, check for edge availability when moving clones. (get_indirect_callee_fndecl): New function. (expand_call_inline): If callee declaration is not apprent from the statement, try calling get_indirect_callee_fndecl. Do not issue warnings or call sorry when not inlinings an indirect edge. * Makefile.in (IPA_PROP_H): Added $(CGRAPH_H) to dependencies. * ipa-prop.c (ipa_print_node_param_flags): Make the dump format a bit more frandly to matching. * testsuite/g++.dg/ipa/iinline-1.C: New testcase. * testsuite/gcc.dg/ipa/iinline-1.c: New testcase. * testsuite/gcc.dg/ipa/modif-1.c: New testcase. From-SVN: r138092
2008-07-23 21:45:45 +02:00
else
lat->type = IPA_BOTTOM;
}
builtins.c (expand_builtin_profile_func): Avoid C++ keywords. * builtins.c (expand_builtin_profile_func): Avoid C++ keywords. * calls.c (avoid_likely_spilled_reg): Likewise. * cfgexpand.c (gimple_assign_rhs_to_tree): Likewise. * cgraph.c (cgraph_clone_edge, cgraph_clone_node): Likewise. * config/i386/i386.c (ix86_expand_special_args_builtin, ix86_secondary_reload): Likewise. * except.c (struct eh_region, gen_eh_region_catch, remove_unreachable_regions, duplicate_eh_regions, assign_filter_values, build_post_landing_pads, sjlj_find_directly_reachable_regions, remove_eh_handler, reachable_next_level, foreach_reachable_handler, can_throw_internal_1, can_throw_external_1, collect_one_action_chain): Likewise. * expr.c (expand_expr_real_1, vector_mode_valid_p): Likewise. * fold-const.c (twoval_comparison_p, eval_subst): Likewise. * function.c (update_temp_slot_address, instantiate_new_reg, instantiate_virtual_regs_in_rtx, instantiate_virtual_regs_in_insn): Likewise. * gimple.c (extract_ops_from_tree, gimple_seq_copy): Likewise. * gimplify.c (gimplify_call_expr, gimplify_init_constructor, gimplify_cleanup_point_expr): Likewise. * ipa-cp.c (ipcp_lattice_changed): Likewise. * passes.c (next_pass_1): Likewise. * print-tree.c (print_node_brief, print_node): Likewise. * profile.c (branch_prob): Likewise. * tree-dump.c (dump_register): Likewise. * tree-eh.c (replace_goto_queue_cond_clause, lower_catch): Likewise. * tree-inline.c (remap_ssa_name, remap_type_1, remap_blocks, copy_statement_list, remap_gimple_op_r, copy_tree_body_r, copy_edges_for_bb, copy_cfg_body, copy_tree_r, copy_arguments_for_versioning, copy_static_chain): Likewise. * tree-into-ssa.c (names_replaced_by, add_to_repl_tbl, add_new_name_mapping, register_new_name_mapping): Likewise. * tree-mudflap.c (mf_xform_derefs): Likewise. * tree-predcom.c (struct chain, dump_chain, replace_ref_with, get_init_expr, combine_chains): Likewise. * tree-pretty-print.c (dump_generic_node): Likewise. * tree-ssa-structalias.c (create_variable_info_for): Likewise. * tree-vrp.c (simplify_cond_using_ranges): Likewise. * tree.c (substitute_in_expr, iterative_hash_expr): Likewise. * value-prof.c (gimple_duplicate_stmt_histograms): Likewise. From-SVN: r138809
2008-08-06 17:57:09 +02:00
/* True when OLD_LAT and NEW_LAT values are not the same. */
static bool
builtins.c (expand_builtin_profile_func): Avoid C++ keywords. * builtins.c (expand_builtin_profile_func): Avoid C++ keywords. * calls.c (avoid_likely_spilled_reg): Likewise. * cfgexpand.c (gimple_assign_rhs_to_tree): Likewise. * cgraph.c (cgraph_clone_edge, cgraph_clone_node): Likewise. * config/i386/i386.c (ix86_expand_special_args_builtin, ix86_secondary_reload): Likewise. * except.c (struct eh_region, gen_eh_region_catch, remove_unreachable_regions, duplicate_eh_regions, assign_filter_values, build_post_landing_pads, sjlj_find_directly_reachable_regions, remove_eh_handler, reachable_next_level, foreach_reachable_handler, can_throw_internal_1, can_throw_external_1, collect_one_action_chain): Likewise. * expr.c (expand_expr_real_1, vector_mode_valid_p): Likewise. * fold-const.c (twoval_comparison_p, eval_subst): Likewise. * function.c (update_temp_slot_address, instantiate_new_reg, instantiate_virtual_regs_in_rtx, instantiate_virtual_regs_in_insn): Likewise. * gimple.c (extract_ops_from_tree, gimple_seq_copy): Likewise. * gimplify.c (gimplify_call_expr, gimplify_init_constructor, gimplify_cleanup_point_expr): Likewise. * ipa-cp.c (ipcp_lattice_changed): Likewise. * passes.c (next_pass_1): Likewise. * print-tree.c (print_node_brief, print_node): Likewise. * profile.c (branch_prob): Likewise. * tree-dump.c (dump_register): Likewise. * tree-eh.c (replace_goto_queue_cond_clause, lower_catch): Likewise. * tree-inline.c (remap_ssa_name, remap_type_1, remap_blocks, copy_statement_list, remap_gimple_op_r, copy_tree_body_r, copy_edges_for_bb, copy_cfg_body, copy_tree_r, copy_arguments_for_versioning, copy_static_chain): Likewise. * tree-into-ssa.c (names_replaced_by, add_to_repl_tbl, add_new_name_mapping, register_new_name_mapping): Likewise. * tree-mudflap.c (mf_xform_derefs): Likewise. * tree-predcom.c (struct chain, dump_chain, replace_ref_with, get_init_expr, combine_chains): Likewise. * tree-pretty-print.c (dump_generic_node): Likewise. * tree-ssa-structalias.c (create_variable_info_for): Likewise. * tree-vrp.c (simplify_cond_using_ranges): Likewise. * tree.c (substitute_in_expr, iterative_hash_expr): Likewise. * value-prof.c (gimple_duplicate_stmt_histograms): Likewise. From-SVN: r138809
2008-08-06 17:57:09 +02:00
ipcp_lattice_changed (struct ipcp_lattice *old_lat,
struct ipcp_lattice *new_lat)
{
builtins.c (expand_builtin_profile_func): Avoid C++ keywords. * builtins.c (expand_builtin_profile_func): Avoid C++ keywords. * calls.c (avoid_likely_spilled_reg): Likewise. * cfgexpand.c (gimple_assign_rhs_to_tree): Likewise. * cgraph.c (cgraph_clone_edge, cgraph_clone_node): Likewise. * config/i386/i386.c (ix86_expand_special_args_builtin, ix86_secondary_reload): Likewise. * except.c (struct eh_region, gen_eh_region_catch, remove_unreachable_regions, duplicate_eh_regions, assign_filter_values, build_post_landing_pads, sjlj_find_directly_reachable_regions, remove_eh_handler, reachable_next_level, foreach_reachable_handler, can_throw_internal_1, can_throw_external_1, collect_one_action_chain): Likewise. * expr.c (expand_expr_real_1, vector_mode_valid_p): Likewise. * fold-const.c (twoval_comparison_p, eval_subst): Likewise. * function.c (update_temp_slot_address, instantiate_new_reg, instantiate_virtual_regs_in_rtx, instantiate_virtual_regs_in_insn): Likewise. * gimple.c (extract_ops_from_tree, gimple_seq_copy): Likewise. * gimplify.c (gimplify_call_expr, gimplify_init_constructor, gimplify_cleanup_point_expr): Likewise. * ipa-cp.c (ipcp_lattice_changed): Likewise. * passes.c (next_pass_1): Likewise. * print-tree.c (print_node_brief, print_node): Likewise. * profile.c (branch_prob): Likewise. * tree-dump.c (dump_register): Likewise. * tree-eh.c (replace_goto_queue_cond_clause, lower_catch): Likewise. * tree-inline.c (remap_ssa_name, remap_type_1, remap_blocks, copy_statement_list, remap_gimple_op_r, copy_tree_body_r, copy_edges_for_bb, copy_cfg_body, copy_tree_r, copy_arguments_for_versioning, copy_static_chain): Likewise. * tree-into-ssa.c (names_replaced_by, add_to_repl_tbl, add_new_name_mapping, register_new_name_mapping): Likewise. * tree-mudflap.c (mf_xform_derefs): Likewise. * tree-predcom.c (struct chain, dump_chain, replace_ref_with, get_init_expr, combine_chains): Likewise. * tree-pretty-print.c (dump_generic_node): Likewise. * tree-ssa-structalias.c (create_variable_info_for): Likewise. * tree-vrp.c (simplify_cond_using_ranges): Likewise. * tree.c (substitute_in_expr, iterative_hash_expr): Likewise. * value-prof.c (gimple_duplicate_stmt_histograms): Likewise. From-SVN: r138809
2008-08-06 17:57:09 +02:00
if (old_lat->type == new_lat->type)
{
builtins.c (expand_builtin_profile_func): Avoid C++ keywords. * builtins.c (expand_builtin_profile_func): Avoid C++ keywords. * calls.c (avoid_likely_spilled_reg): Likewise. * cfgexpand.c (gimple_assign_rhs_to_tree): Likewise. * cgraph.c (cgraph_clone_edge, cgraph_clone_node): Likewise. * config/i386/i386.c (ix86_expand_special_args_builtin, ix86_secondary_reload): Likewise. * except.c (struct eh_region, gen_eh_region_catch, remove_unreachable_regions, duplicate_eh_regions, assign_filter_values, build_post_landing_pads, sjlj_find_directly_reachable_regions, remove_eh_handler, reachable_next_level, foreach_reachable_handler, can_throw_internal_1, can_throw_external_1, collect_one_action_chain): Likewise. * expr.c (expand_expr_real_1, vector_mode_valid_p): Likewise. * fold-const.c (twoval_comparison_p, eval_subst): Likewise. * function.c (update_temp_slot_address, instantiate_new_reg, instantiate_virtual_regs_in_rtx, instantiate_virtual_regs_in_insn): Likewise. * gimple.c (extract_ops_from_tree, gimple_seq_copy): Likewise. * gimplify.c (gimplify_call_expr, gimplify_init_constructor, gimplify_cleanup_point_expr): Likewise. * ipa-cp.c (ipcp_lattice_changed): Likewise. * passes.c (next_pass_1): Likewise. * print-tree.c (print_node_brief, print_node): Likewise. * profile.c (branch_prob): Likewise. * tree-dump.c (dump_register): Likewise. * tree-eh.c (replace_goto_queue_cond_clause, lower_catch): Likewise. * tree-inline.c (remap_ssa_name, remap_type_1, remap_blocks, copy_statement_list, remap_gimple_op_r, copy_tree_body_r, copy_edges_for_bb, copy_cfg_body, copy_tree_r, copy_arguments_for_versioning, copy_static_chain): Likewise. * tree-into-ssa.c (names_replaced_by, add_to_repl_tbl, add_new_name_mapping, register_new_name_mapping): Likewise. * tree-mudflap.c (mf_xform_derefs): Likewise. * tree-predcom.c (struct chain, dump_chain, replace_ref_with, get_init_expr, combine_chains): Likewise. * tree-pretty-print.c (dump_generic_node): Likewise. * tree-ssa-structalias.c (create_variable_info_for): Likewise. * tree-vrp.c (simplify_cond_using_ranges): Likewise. * tree.c (substitute_in_expr, iterative_hash_expr): Likewise. * value-prof.c (gimple_duplicate_stmt_histograms): Likewise. From-SVN: r138809
2008-08-06 17:57:09 +02:00
if (!ipcp_lat_is_const (old_lat))
return false;
builtins.c (expand_builtin_profile_func): Avoid C++ keywords. * builtins.c (expand_builtin_profile_func): Avoid C++ keywords. * calls.c (avoid_likely_spilled_reg): Likewise. * cfgexpand.c (gimple_assign_rhs_to_tree): Likewise. * cgraph.c (cgraph_clone_edge, cgraph_clone_node): Likewise. * config/i386/i386.c (ix86_expand_special_args_builtin, ix86_secondary_reload): Likewise. * except.c (struct eh_region, gen_eh_region_catch, remove_unreachable_regions, duplicate_eh_regions, assign_filter_values, build_post_landing_pads, sjlj_find_directly_reachable_regions, remove_eh_handler, reachable_next_level, foreach_reachable_handler, can_throw_internal_1, can_throw_external_1, collect_one_action_chain): Likewise. * expr.c (expand_expr_real_1, vector_mode_valid_p): Likewise. * fold-const.c (twoval_comparison_p, eval_subst): Likewise. * function.c (update_temp_slot_address, instantiate_new_reg, instantiate_virtual_regs_in_rtx, instantiate_virtual_regs_in_insn): Likewise. * gimple.c (extract_ops_from_tree, gimple_seq_copy): Likewise. * gimplify.c (gimplify_call_expr, gimplify_init_constructor, gimplify_cleanup_point_expr): Likewise. * ipa-cp.c (ipcp_lattice_changed): Likewise. * passes.c (next_pass_1): Likewise. * print-tree.c (print_node_brief, print_node): Likewise. * profile.c (branch_prob): Likewise. * tree-dump.c (dump_register): Likewise. * tree-eh.c (replace_goto_queue_cond_clause, lower_catch): Likewise. * tree-inline.c (remap_ssa_name, remap_type_1, remap_blocks, copy_statement_list, remap_gimple_op_r, copy_tree_body_r, copy_edges_for_bb, copy_cfg_body, copy_tree_r, copy_arguments_for_versioning, copy_static_chain): Likewise. * tree-into-ssa.c (names_replaced_by, add_to_repl_tbl, add_new_name_mapping, register_new_name_mapping): Likewise. * tree-mudflap.c (mf_xform_derefs): Likewise. * tree-predcom.c (struct chain, dump_chain, replace_ref_with, get_init_expr, combine_chains): Likewise. * tree-pretty-print.c (dump_generic_node): Likewise. * tree-ssa-structalias.c (create_variable_info_for): Likewise. * tree-vrp.c (simplify_cond_using_ranges): Likewise. * tree.c (substitute_in_expr, iterative_hash_expr): Likewise. * value-prof.c (gimple_duplicate_stmt_histograms): Likewise. From-SVN: r138809
2008-08-06 17:57:09 +02:00
if (ipcp_lats_are_equal (old_lat, new_lat))
return false;
}
return true;
}
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
/* Print all ipcp_lattices of all functions to F. */
static void
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
ipcp_print_all_lattices (FILE * f)
{
struct cgraph_node *node;
int i, count;
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
fprintf (f, "\nLATTICE PRINT\n");
for (node = cgraph_nodes; node; node = node->next)
{
struct ipa_node_params *info;
if (!node->analyzed)
continue;
info = IPA_NODE_REF (node);
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
fprintf (f, "Printing lattices %s:\n", cgraph_node_name (node));
count = ipa_get_param_count (info);
for (i = 0; i < count; i++)
{
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
struct ipcp_lattice *lat = ipcp_get_ith_lattice (info, i);
ipa-cp.c (ipcp_print_edge_profiles): Test for node->analyzed rather than for DECL_SAVED_TREE. 2008-07-23 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_print_edge_profiles): Test for node->analyzed rather than for DECL_SAVED_TREE. * ipa-prop.c: Include diagnostic.h. (ipa_check_stmt_modifications): Check LHS of GIMPLE_MODIFY_EXPRs thoroughly. (ipa_detect_param_modifications): Function rewritten from scratch. (ipa_compute_jump_functions): Changed accesses to modification flags. (ipa_free_node_params_substructures): Update flags destruction. (ipa_node_duplication_hook): Update flags duplication. (ipa_print_all_params_modified): Updated flag access. * ipa-prop.h (struct ipa_param_flags): New structure. (struct ipa_node_params): New field modification_analysis_done, modified_flags changed into param_flags. (ipa_is_ith_param_modified): Changed to use new flags. * Makefile.in (ipa-prop.o): Add $(DIAGNOSTIC_H) to dependencies. * ipa-prop.c (ipa_print_all_jump_functions): Moved here from ipa-cp.c and split into two functions. (ipa_print_node_jump_functions): New function. (compute_scalar_jump_functions): New function. (type_like_member_ptr_p): New function. (compute_pass_through_member_ptrs): New function. (fill_member_ptr_cst_jump_function): New function. (determine_cst_member_ptr): New function. (compute_cst_member_ptr_arguments): New function. (ipa_compute_jump_functions): Complete rewrite. * ipa-prop.h (enum jump_func_type): Make explicit that we depend on IPA_UNKNOWN being zero. Added value IPA_CONST_MEMBER_PTR. (struct ipa_member_ptr_cst): New structure. (union jump_func_value): New field member_cst. * ipa-cp.c (ipcp_lat_is_insertable): New function. (ipcp_lattice_from_jfunc): Produces bottom lattices for unhandled jump function types. (ipcp_print_all_lattices): Slight fprintf rearrangement. (ipcp_print_all_structures): Call ipa_print_all_jump_functions instead of ipcp_print_all_jump_functions. (ipcp_insert_stage): Use ipcp_lat_is_insertable, create replace maps only for replacable scalars. * doc/invoke.texi (Optimize options): Add description of -findirect-inlining. * common.opt (flag_indirect_inlining): New flag. * opts.c (decode_options): Set flag_indirect_inlining when optimize >= 3. * ipa-inline.c: Include ipa-prop.h. (inline_indirect_intraprocedural_analysis): New function. (inline_generate_summary): Allocate parameter and argument info structures, call inline_indirect_intraprocedural_analysis on each node when doing indirect inlining and deallocate indirect inlining data structures in the end. * ipa-prop.c (ipa_create_param_decls_array): Return if already done. (free_all_ipa_structures_after_iinln): New function. (free_all_ipa_structures_after_ipa_cp): Checks whether iinln will be done. * Makefile.in (ipa-inline.o): Added $(IPA_PROP_H) to dependencies. * cgraphbuild.c (compute_call_stmt_bb_frequency): New function. (build_cgraph_edges): Call compute_call_stmt_bb_frequency instead of computing the frequency separately. (rebuild_cgraph_edges): Call compute_call_stmt_bb_frequency instead of computing the frequency separately. * ipa-cp.c (ipcp_print_all_structures): Replace a call to ipa_print_all_param_modified with a call to ipa_print_all_param_flags. * ipa-prop.c (ipa_get_member_ptr_load_param): New function. (ipa_get_stmt_member_ptr_load_param): New function. (ipa_is_ssa_with_stmt_def): New function. (ipa_note_param_call): New function. (ipa_analyze_call_uses): New function. (ipa_analyze_stmt_uses): New function. (ipa_analyze_params_uses): New function. (ipa_free_node_params_substructures): Also free the param_calls linked list. (ipa_node_duplication_hook): Also duplicate the param_calls linked list. (ipa_print_node_param_flags): New function. (ipa_print_all_params_modified): Renamed to ipa_print_all_param_flags. (ipa_print_all_param_flags): Calls ipa_print_node_param_flags. * ipa-prop.h (struct ipa_param_flags): New field called. (struct ipa_param_call_note): New structure. (struct ipa_node_params): New fields param_calls and uses_analysis_done. (ipa_is_ith_param_called): New function. * ipa-inline.c (inline_indirect_intraprocedural_analysis): Call ipa_analyze_params_uses and dump parameter flags. * ipa-inline.c (cgraph_decide_recursive_inlining): Call ipa_propagate_indirect_call_infos if performing indirect inlining, pass a new parameter new_edges to it. (add_new_edges_to_heap): New fucntion. (cgraph_decide_inlining_of_small_functions): New vector new_indirect_edges for newly found indirect edges , call ipa_propagate_indirect_call_infos after inlining. (cgraph_decide_inlining): Call ipa_propagate_indirect_call_infos after inlining if performing indirect inlining. Call free_all_ipa_structures_after_iinln when doing so too. (inline_generate_summary): Do not call free_all_ipa_structures_after_iinln here. * ipa-prop.c (update_jump_functions_after_inlining): New function. (print_edge_addition_message): New function. (update_call_notes_after_inlining): New function. (propagate_info_to_inlined_callees): New function. (ipa_propagate_indirect_call_infos): New function. * ipa-prop.h: Include cgraph.h (struct ipa_param_call_note): Fields reordered, new field processed. * cgraph.h (cgraph_edge): Shrink loop_nest field to 31 bits, add a new flag indirect_call. * cgraphunit.c (verify_cgraph_node): Allow indirect edges not to have rediscovered call statements. * cgraph.c (cgraph_create_edge): Initialize indirect_call to zero. (dump_cgraph_node): Dump also the indirect_call flag. (cgraph_clone_edge): Copy also the indirect_call flag. * tree-inline.c (copy_bb): Do not check for fndecls from call expressions, check for edge availability when moving clones. (get_indirect_callee_fndecl): New function. (expand_call_inline): If callee declaration is not apprent from the statement, try calling get_indirect_callee_fndecl. Do not issue warnings or call sorry when not inlinings an indirect edge. * Makefile.in (IPA_PROP_H): Added $(CGRAPH_H) to dependencies. * ipa-prop.c (ipa_print_node_param_flags): Make the dump format a bit more frandly to matching. * testsuite/g++.dg/ipa/iinline-1.C: New testcase. * testsuite/gcc.dg/ipa/iinline-1.c: New testcase. * testsuite/gcc.dg/ipa/modif-1.c: New testcase. From-SVN: r138092
2008-07-23 21:45:45 +02:00
fprintf (f, " param [%d]: ", i);
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
if (lat->type == IPA_CONST_VALUE || lat->type == IPA_CONST_VALUE_REF)
{
fprintf (f, "type is CONST ");
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
print_generic_expr (f, lat->constant, 0);
fprintf (f, "\n");
}
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
else if (lat->type == IPA_TOP)
ipa-cp.c (ipcp_print_edge_profiles): Test for node->analyzed rather than for DECL_SAVED_TREE. 2008-07-23 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_print_edge_profiles): Test for node->analyzed rather than for DECL_SAVED_TREE. * ipa-prop.c: Include diagnostic.h. (ipa_check_stmt_modifications): Check LHS of GIMPLE_MODIFY_EXPRs thoroughly. (ipa_detect_param_modifications): Function rewritten from scratch. (ipa_compute_jump_functions): Changed accesses to modification flags. (ipa_free_node_params_substructures): Update flags destruction. (ipa_node_duplication_hook): Update flags duplication. (ipa_print_all_params_modified): Updated flag access. * ipa-prop.h (struct ipa_param_flags): New structure. (struct ipa_node_params): New field modification_analysis_done, modified_flags changed into param_flags. (ipa_is_ith_param_modified): Changed to use new flags. * Makefile.in (ipa-prop.o): Add $(DIAGNOSTIC_H) to dependencies. * ipa-prop.c (ipa_print_all_jump_functions): Moved here from ipa-cp.c and split into two functions. (ipa_print_node_jump_functions): New function. (compute_scalar_jump_functions): New function. (type_like_member_ptr_p): New function. (compute_pass_through_member_ptrs): New function. (fill_member_ptr_cst_jump_function): New function. (determine_cst_member_ptr): New function. (compute_cst_member_ptr_arguments): New function. (ipa_compute_jump_functions): Complete rewrite. * ipa-prop.h (enum jump_func_type): Make explicit that we depend on IPA_UNKNOWN being zero. Added value IPA_CONST_MEMBER_PTR. (struct ipa_member_ptr_cst): New structure. (union jump_func_value): New field member_cst. * ipa-cp.c (ipcp_lat_is_insertable): New function. (ipcp_lattice_from_jfunc): Produces bottom lattices for unhandled jump function types. (ipcp_print_all_lattices): Slight fprintf rearrangement. (ipcp_print_all_structures): Call ipa_print_all_jump_functions instead of ipcp_print_all_jump_functions. (ipcp_insert_stage): Use ipcp_lat_is_insertable, create replace maps only for replacable scalars. * doc/invoke.texi (Optimize options): Add description of -findirect-inlining. * common.opt (flag_indirect_inlining): New flag. * opts.c (decode_options): Set flag_indirect_inlining when optimize >= 3. * ipa-inline.c: Include ipa-prop.h. (inline_indirect_intraprocedural_analysis): New function. (inline_generate_summary): Allocate parameter and argument info structures, call inline_indirect_intraprocedural_analysis on each node when doing indirect inlining and deallocate indirect inlining data structures in the end. * ipa-prop.c (ipa_create_param_decls_array): Return if already done. (free_all_ipa_structures_after_iinln): New function. (free_all_ipa_structures_after_ipa_cp): Checks whether iinln will be done. * Makefile.in (ipa-inline.o): Added $(IPA_PROP_H) to dependencies. * cgraphbuild.c (compute_call_stmt_bb_frequency): New function. (build_cgraph_edges): Call compute_call_stmt_bb_frequency instead of computing the frequency separately. (rebuild_cgraph_edges): Call compute_call_stmt_bb_frequency instead of computing the frequency separately. * ipa-cp.c (ipcp_print_all_structures): Replace a call to ipa_print_all_param_modified with a call to ipa_print_all_param_flags. * ipa-prop.c (ipa_get_member_ptr_load_param): New function. (ipa_get_stmt_member_ptr_load_param): New function. (ipa_is_ssa_with_stmt_def): New function. (ipa_note_param_call): New function. (ipa_analyze_call_uses): New function. (ipa_analyze_stmt_uses): New function. (ipa_analyze_params_uses): New function. (ipa_free_node_params_substructures): Also free the param_calls linked list. (ipa_node_duplication_hook): Also duplicate the param_calls linked list. (ipa_print_node_param_flags): New function. (ipa_print_all_params_modified): Renamed to ipa_print_all_param_flags. (ipa_print_all_param_flags): Calls ipa_print_node_param_flags. * ipa-prop.h (struct ipa_param_flags): New field called. (struct ipa_param_call_note): New structure. (struct ipa_node_params): New fields param_calls and uses_analysis_done. (ipa_is_ith_param_called): New function. * ipa-inline.c (inline_indirect_intraprocedural_analysis): Call ipa_analyze_params_uses and dump parameter flags. * ipa-inline.c (cgraph_decide_recursive_inlining): Call ipa_propagate_indirect_call_infos if performing indirect inlining, pass a new parameter new_edges to it. (add_new_edges_to_heap): New fucntion. (cgraph_decide_inlining_of_small_functions): New vector new_indirect_edges for newly found indirect edges , call ipa_propagate_indirect_call_infos after inlining. (cgraph_decide_inlining): Call ipa_propagate_indirect_call_infos after inlining if performing indirect inlining. Call free_all_ipa_structures_after_iinln when doing so too. (inline_generate_summary): Do not call free_all_ipa_structures_after_iinln here. * ipa-prop.c (update_jump_functions_after_inlining): New function. (print_edge_addition_message): New function. (update_call_notes_after_inlining): New function. (propagate_info_to_inlined_callees): New function. (ipa_propagate_indirect_call_infos): New function. * ipa-prop.h: Include cgraph.h (struct ipa_param_call_note): Fields reordered, new field processed. * cgraph.h (cgraph_edge): Shrink loop_nest field to 31 bits, add a new flag indirect_call. * cgraphunit.c (verify_cgraph_node): Allow indirect edges not to have rediscovered call statements. * cgraph.c (cgraph_create_edge): Initialize indirect_call to zero. (dump_cgraph_node): Dump also the indirect_call flag. (cgraph_clone_edge): Copy also the indirect_call flag. * tree-inline.c (copy_bb): Do not check for fndecls from call expressions, check for edge availability when moving clones. (get_indirect_callee_fndecl): New function. (expand_call_inline): If callee declaration is not apprent from the statement, try calling get_indirect_callee_fndecl. Do not issue warnings or call sorry when not inlinings an indirect edge. * Makefile.in (IPA_PROP_H): Added $(CGRAPH_H) to dependencies. * ipa-prop.c (ipa_print_node_param_flags): Make the dump format a bit more frandly to matching. * testsuite/g++.dg/ipa/iinline-1.C: New testcase. * testsuite/gcc.dg/ipa/iinline-1.c: New testcase. * testsuite/gcc.dg/ipa/modif-1.c: New testcase. From-SVN: r138092
2008-07-23 21:45:45 +02:00
fprintf (f, "type is TOP\n");
else
ipa-cp.c (ipcp_print_edge_profiles): Test for node->analyzed rather than for DECL_SAVED_TREE. 2008-07-23 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_print_edge_profiles): Test for node->analyzed rather than for DECL_SAVED_TREE. * ipa-prop.c: Include diagnostic.h. (ipa_check_stmt_modifications): Check LHS of GIMPLE_MODIFY_EXPRs thoroughly. (ipa_detect_param_modifications): Function rewritten from scratch. (ipa_compute_jump_functions): Changed accesses to modification flags. (ipa_free_node_params_substructures): Update flags destruction. (ipa_node_duplication_hook): Update flags duplication. (ipa_print_all_params_modified): Updated flag access. * ipa-prop.h (struct ipa_param_flags): New structure. (struct ipa_node_params): New field modification_analysis_done, modified_flags changed into param_flags. (ipa_is_ith_param_modified): Changed to use new flags. * Makefile.in (ipa-prop.o): Add $(DIAGNOSTIC_H) to dependencies. * ipa-prop.c (ipa_print_all_jump_functions): Moved here from ipa-cp.c and split into two functions. (ipa_print_node_jump_functions): New function. (compute_scalar_jump_functions): New function. (type_like_member_ptr_p): New function. (compute_pass_through_member_ptrs): New function. (fill_member_ptr_cst_jump_function): New function. (determine_cst_member_ptr): New function. (compute_cst_member_ptr_arguments): New function. (ipa_compute_jump_functions): Complete rewrite. * ipa-prop.h (enum jump_func_type): Make explicit that we depend on IPA_UNKNOWN being zero. Added value IPA_CONST_MEMBER_PTR. (struct ipa_member_ptr_cst): New structure. (union jump_func_value): New field member_cst. * ipa-cp.c (ipcp_lat_is_insertable): New function. (ipcp_lattice_from_jfunc): Produces bottom lattices for unhandled jump function types. (ipcp_print_all_lattices): Slight fprintf rearrangement. (ipcp_print_all_structures): Call ipa_print_all_jump_functions instead of ipcp_print_all_jump_functions. (ipcp_insert_stage): Use ipcp_lat_is_insertable, create replace maps only for replacable scalars. * doc/invoke.texi (Optimize options): Add description of -findirect-inlining. * common.opt (flag_indirect_inlining): New flag. * opts.c (decode_options): Set flag_indirect_inlining when optimize >= 3. * ipa-inline.c: Include ipa-prop.h. (inline_indirect_intraprocedural_analysis): New function. (inline_generate_summary): Allocate parameter and argument info structures, call inline_indirect_intraprocedural_analysis on each node when doing indirect inlining and deallocate indirect inlining data structures in the end. * ipa-prop.c (ipa_create_param_decls_array): Return if already done. (free_all_ipa_structures_after_iinln): New function. (free_all_ipa_structures_after_ipa_cp): Checks whether iinln will be done. * Makefile.in (ipa-inline.o): Added $(IPA_PROP_H) to dependencies. * cgraphbuild.c (compute_call_stmt_bb_frequency): New function. (build_cgraph_edges): Call compute_call_stmt_bb_frequency instead of computing the frequency separately. (rebuild_cgraph_edges): Call compute_call_stmt_bb_frequency instead of computing the frequency separately. * ipa-cp.c (ipcp_print_all_structures): Replace a call to ipa_print_all_param_modified with a call to ipa_print_all_param_flags. * ipa-prop.c (ipa_get_member_ptr_load_param): New function. (ipa_get_stmt_member_ptr_load_param): New function. (ipa_is_ssa_with_stmt_def): New function. (ipa_note_param_call): New function. (ipa_analyze_call_uses): New function. (ipa_analyze_stmt_uses): New function. (ipa_analyze_params_uses): New function. (ipa_free_node_params_substructures): Also free the param_calls linked list. (ipa_node_duplication_hook): Also duplicate the param_calls linked list. (ipa_print_node_param_flags): New function. (ipa_print_all_params_modified): Renamed to ipa_print_all_param_flags. (ipa_print_all_param_flags): Calls ipa_print_node_param_flags. * ipa-prop.h (struct ipa_param_flags): New field called. (struct ipa_param_call_note): New structure. (struct ipa_node_params): New fields param_calls and uses_analysis_done. (ipa_is_ith_param_called): New function. * ipa-inline.c (inline_indirect_intraprocedural_analysis): Call ipa_analyze_params_uses and dump parameter flags. * ipa-inline.c (cgraph_decide_recursive_inlining): Call ipa_propagate_indirect_call_infos if performing indirect inlining, pass a new parameter new_edges to it. (add_new_edges_to_heap): New fucntion. (cgraph_decide_inlining_of_small_functions): New vector new_indirect_edges for newly found indirect edges , call ipa_propagate_indirect_call_infos after inlining. (cgraph_decide_inlining): Call ipa_propagate_indirect_call_infos after inlining if performing indirect inlining. Call free_all_ipa_structures_after_iinln when doing so too. (inline_generate_summary): Do not call free_all_ipa_structures_after_iinln here. * ipa-prop.c (update_jump_functions_after_inlining): New function. (print_edge_addition_message): New function. (update_call_notes_after_inlining): New function. (propagate_info_to_inlined_callees): New function. (ipa_propagate_indirect_call_infos): New function. * ipa-prop.h: Include cgraph.h (struct ipa_param_call_note): Fields reordered, new field processed. * cgraph.h (cgraph_edge): Shrink loop_nest field to 31 bits, add a new flag indirect_call. * cgraphunit.c (verify_cgraph_node): Allow indirect edges not to have rediscovered call statements. * cgraph.c (cgraph_create_edge): Initialize indirect_call to zero. (dump_cgraph_node): Dump also the indirect_call flag. (cgraph_clone_edge): Copy also the indirect_call flag. * tree-inline.c (copy_bb): Do not check for fndecls from call expressions, check for edge availability when moving clones. (get_indirect_callee_fndecl): New function. (expand_call_inline): If callee declaration is not apprent from the statement, try calling get_indirect_callee_fndecl. Do not issue warnings or call sorry when not inlinings an indirect edge. * Makefile.in (IPA_PROP_H): Added $(CGRAPH_H) to dependencies. * ipa-prop.c (ipa_print_node_param_flags): Make the dump format a bit more frandly to matching. * testsuite/g++.dg/ipa/iinline-1.C: New testcase. * testsuite/gcc.dg/ipa/iinline-1.c: New testcase. * testsuite/gcc.dg/ipa/modif-1.c: New testcase. From-SVN: r138092
2008-07-23 21:45:45 +02:00
fprintf (f, "type is BOTTOM\n");
}
}
}
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
/* Initialize ipcp_lattices array. The lattices corresponding to supported
types (integers, real types and Fortran constants defined as const_decls)
are initialized to IPA_TOP, the rest of them to IPA_BOTTOM. */
static void
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
ipcp_initialize_node_lattices (struct cgraph_node *node)
{
int i;
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
struct ipa_node_params *info = IPA_NODE_REF (node);
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
info->ipcp_lattices = XCNEWVEC (struct ipcp_lattice,
ipa_get_param_count (info));
for (i = 0; i < ipa_get_param_count (info) ; i++)
{
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
tree parm_tree = ipa_get_ith_param (info, i);
struct ipcp_lattice *lat = ipcp_get_ith_lattice (info, i);
if (INTEGRAL_TYPE_P (TREE_TYPE (parm_tree))
|| SCALAR_FLOAT_TYPE_P (TREE_TYPE (parm_tree))
|| POINTER_TYPE_P (TREE_TYPE (parm_tree)))
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
lat->type = IPA_TOP;
else
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
lat->type = IPA_BOTTOM;
}
}
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
/* Create a new assignment statement and make it the first statement in the
function. PARM1 is the lhs of the assignment and VAL is the rhs. */
static void
backport: ChangeLog.tuples: ChangeLog from gimple-tuples-branch. 2008-07-28 Richard Guenther <rguenther@suse.de> Merge from gimple-tuples-branch. * ChangeLog.tuples: ChangeLog from gimple-tuples-branch. * gimple.def: New file. * gsstruct.def: Likewise. * gimple-iterator.c: Likewise. * gimple-pretty-print.c: Likewise. * tree-gimple.c: Removed. Merged into ... * gimple.c: ... here. New file. * tree-gimple.h: Removed. Merged into ... * gimple.h: ... here. New file. * Makefile.in: Add dependencies on GIMPLE_H and tree-iterator.h. * configure.ac: Added support for ENABLE_GIMPLE_CHECKING and the --enable-checking=gimple flag. * config.in: Likewise. * configure: Regenerated. * tree-ssa-operands.h: Tuplified. * tree-vrp.c: Likewise. * tree-loop-linear.c: Likewise. * tree-into-ssa.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-dump.c: Likewise. * tree-complex.c: Likewise. * cgraphbuild.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-pretty-print.c: Likewise. * tracer.c: Likewise. * gengtype.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * tree-ssa-loop-manip.c: Likewise. * value-prof.c: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-tailcall.c: Likewise. * value-prof.h: Likewise. * tree.c: Likewise. * tree.h: Likewise. * tree-pass.h: Likewise. * ipa-cp.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-scalar-evolution.h: Likewise. * target.h: Likewise. * lambda-mat.c: Likewise. * tree-phinodes.c: Likewise. * diagnostic.h: Likewise. * builtins.c: Likewise. * tree-ssa-alias-warnings.c: Likewise. * cfghooks.c: Likewise. * fold-const.c: Likewise. * cfghooks.h: Likewise. * omp-low.c: Likewise. * tree-ssa-dse.c: Likewise. * ipa-reference.c: Likewise. * tree-ssa-uncprop.c: Likewise. * toplev.c: Likewise. * tree-gimple.c: Likewise. * tree-gimple.h: Likewise. * tree-chrec.c: Likewise. * tree-chrec.h: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-sccvn.h: Likewise. * cgraphunit.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-nomudflap.c: Likewise. * tree-call-cdce.c: Likewise. * ipa-pure-const.c: Likewise. * c-format.c: Likewise. * tree-stdarg.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-nrv.c: Likewise. * tree-ssa-propagate.c: Likewise. * ipa-utils.c: Likewise. * tree-ssa-propagate.h: Likewise. * tree-ssa-alias.c: Likewise. * gimple-low.c: Likewise. * tree-ssa-sink.c: Likewise. * ipa-inline.c: Likewise. * c-semantics.c: Likewise. * dwarf2out.c: Likewise. * expr.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * predict.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-parloops.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * matrix-reorg.c: Likewise. * c-decl.c: Likewise. * tree-eh.c: Likewise. * c-pretty-print.c: Likewise. * lambda-trans.c: Likewise. * function.c: Likewise. * langhooks.c: Likewise. * ebitmap.h: Likewise. * tree-vectorizer.c: Likewise. * function.h: Likewise. * langhooks.h: Likewise. * tree-vectorizer.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * domwalk.c: Likewise. * tree-if-conv.c: Likewise. * profile.c: Likewise. * domwalk.h: Likewise. * tree-data-ref.c: Likewise. * tree-data-ref.h: Likewise. * tree-flow-inline.h: Likewise. * tree-affine.c: Likewise. * tree-vect-analyze.c: Likewise. * c-typeck.c: Likewise. * gimplify.c: Likewise. * coretypes.h: Likewise. * tree-ssa-phiopt.c: Likewise. * calls.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree.def: Likewise. * tree-dfa.c: Likewise. * except.c: Likewise. * except.h: Likewise. * cfgexpand.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-live.c: Likewise. * tree-sra.c: Likewise. * tree-ssa-live.h: Likewise. * tree-predcom.c: Likewise. * lambda.h: Likewise. * tree-mudflap.c: Likewise. * ipa-prop.c: Likewise. * print-tree.c: Likewise. * tree-ssa-copy.c: Likewise. * ipa-prop.h: Likewise. * tree-ssa-forwprop.c: Likewise. * ggc-page.c: Likewise. * c-omp.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-nested.c: Likewise. * tree-ssa.c: Likewise. * lambda-code.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-inline.c: Likewise. * tree-inline.h: Likewise. * tree-iterator.c: Likewise. * tree-optimize.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-vect-transform.c: Likewise. * tree-object-size.c: Likewise. * tree-outof-ssa.c: Likewise. * cfgloop.c: Likewise. * system.h: Likewise. * tree-profile.c: Likewise. * cfgloop.h: Likewise. * c-gimplify.c: Likewise. * c-common.c: Likewise. * tree-vect-generic.c: Likewise. * tree-flow.h: Likewise. * c-common.h: Likewise. * basic-block.h: Likewise. * tree-ssa-structalias.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-ssa-structalias.h: Likewise. * tree-cfg.c: Likewise. * passes.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * tree-ssa-reassoc.c: Likewise. * cfgrtl.c: Likewise. * varpool.c: Likewise. * stmt.c: Likewise. * tree-ssanames.c: Likewise. * tree-ssa-threadedge.c: Likewise. * langhooks-def.h: Likewise. * tree-ssa-operands.c: Likewise. * config/alpha/alpha.c: Likewise. * config/frv/frv.c: Likewise. * config/s390/s390.c: Likewise. * config/m32c/m32c.c: Likewise. * config/m32c/m32c-protos.h: Likewise. * config/spu/spu.c: Likewise. * config/sparc/sparc.c: Likewise. * config/i386/i386.c: Likewise. * config/sh/sh.c: Likewise. * config/xtensa/xtensa.c: Likewise. * config/stormy16/stormy16.c: Likewise. * config/ia64/ia64.c: Likewise. * config/rs6000/rs6000.c: Likewise. * config/pa/pa.c: Likewise. * config/mips/mips.c: Likewise. From-SVN: r138207
2008-07-28 16:33:56 +02:00
constant_val_insert (tree parm1 ATTRIBUTE_UNUSED, tree val ATTRIBUTE_UNUSED)
{
backport: ChangeLog.tuples: ChangeLog from gimple-tuples-branch. 2008-07-28 Richard Guenther <rguenther@suse.de> Merge from gimple-tuples-branch. * ChangeLog.tuples: ChangeLog from gimple-tuples-branch. * gimple.def: New file. * gsstruct.def: Likewise. * gimple-iterator.c: Likewise. * gimple-pretty-print.c: Likewise. * tree-gimple.c: Removed. Merged into ... * gimple.c: ... here. New file. * tree-gimple.h: Removed. Merged into ... * gimple.h: ... here. New file. * Makefile.in: Add dependencies on GIMPLE_H and tree-iterator.h. * configure.ac: Added support for ENABLE_GIMPLE_CHECKING and the --enable-checking=gimple flag. * config.in: Likewise. * configure: Regenerated. * tree-ssa-operands.h: Tuplified. * tree-vrp.c: Likewise. * tree-loop-linear.c: Likewise. * tree-into-ssa.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-dump.c: Likewise. * tree-complex.c: Likewise. * cgraphbuild.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-pretty-print.c: Likewise. * tracer.c: Likewise. * gengtype.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * tree-ssa-loop-manip.c: Likewise. * value-prof.c: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-tailcall.c: Likewise. * value-prof.h: Likewise. * tree.c: Likewise. * tree.h: Likewise. * tree-pass.h: Likewise. * ipa-cp.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-scalar-evolution.h: Likewise. * target.h: Likewise. * lambda-mat.c: Likewise. * tree-phinodes.c: Likewise. * diagnostic.h: Likewise. * builtins.c: Likewise. * tree-ssa-alias-warnings.c: Likewise. * cfghooks.c: Likewise. * fold-const.c: Likewise. * cfghooks.h: Likewise. * omp-low.c: Likewise. * tree-ssa-dse.c: Likewise. * ipa-reference.c: Likewise. * tree-ssa-uncprop.c: Likewise. * toplev.c: Likewise. * tree-gimple.c: Likewise. * tree-gimple.h: Likewise. * tree-chrec.c: Likewise. * tree-chrec.h: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-sccvn.h: Likewise. * cgraphunit.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-nomudflap.c: Likewise. * tree-call-cdce.c: Likewise. * ipa-pure-const.c: Likewise. * c-format.c: Likewise. * tree-stdarg.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-nrv.c: Likewise. * tree-ssa-propagate.c: Likewise. * ipa-utils.c: Likewise. * tree-ssa-propagate.h: Likewise. * tree-ssa-alias.c: Likewise. * gimple-low.c: Likewise. * tree-ssa-sink.c: Likewise. * ipa-inline.c: Likewise. * c-semantics.c: Likewise. * dwarf2out.c: Likewise. * expr.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * predict.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-parloops.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * matrix-reorg.c: Likewise. * c-decl.c: Likewise. * tree-eh.c: Likewise. * c-pretty-print.c: Likewise. * lambda-trans.c: Likewise. * function.c: Likewise. * langhooks.c: Likewise. * ebitmap.h: Likewise. * tree-vectorizer.c: Likewise. * function.h: Likewise. * langhooks.h: Likewise. * tree-vectorizer.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * domwalk.c: Likewise. * tree-if-conv.c: Likewise. * profile.c: Likewise. * domwalk.h: Likewise. * tree-data-ref.c: Likewise. * tree-data-ref.h: Likewise. * tree-flow-inline.h: Likewise. * tree-affine.c: Likewise. * tree-vect-analyze.c: Likewise. * c-typeck.c: Likewise. * gimplify.c: Likewise. * coretypes.h: Likewise. * tree-ssa-phiopt.c: Likewise. * calls.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree.def: Likewise. * tree-dfa.c: Likewise. * except.c: Likewise. * except.h: Likewise. * cfgexpand.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-live.c: Likewise. * tree-sra.c: Likewise. * tree-ssa-live.h: Likewise. * tree-predcom.c: Likewise. * lambda.h: Likewise. * tree-mudflap.c: Likewise. * ipa-prop.c: Likewise. * print-tree.c: Likewise. * tree-ssa-copy.c: Likewise. * ipa-prop.h: Likewise. * tree-ssa-forwprop.c: Likewise. * ggc-page.c: Likewise. * c-omp.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-nested.c: Likewise. * tree-ssa.c: Likewise. * lambda-code.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-inline.c: Likewise. * tree-inline.h: Likewise. * tree-iterator.c: Likewise. * tree-optimize.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-vect-transform.c: Likewise. * tree-object-size.c: Likewise. * tree-outof-ssa.c: Likewise. * cfgloop.c: Likewise. * system.h: Likewise. * tree-profile.c: Likewise. * cfgloop.h: Likewise. * c-gimplify.c: Likewise. * c-common.c: Likewise. * tree-vect-generic.c: Likewise. * tree-flow.h: Likewise. * c-common.h: Likewise. * basic-block.h: Likewise. * tree-ssa-structalias.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-ssa-structalias.h: Likewise. * tree-cfg.c: Likewise. * passes.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * tree-ssa-reassoc.c: Likewise. * cfgrtl.c: Likewise. * varpool.c: Likewise. * stmt.c: Likewise. * tree-ssanames.c: Likewise. * tree-ssa-threadedge.c: Likewise. * langhooks-def.h: Likewise. * tree-ssa-operands.c: Likewise. * config/alpha/alpha.c: Likewise. * config/frv/frv.c: Likewise. * config/s390/s390.c: Likewise. * config/m32c/m32c.c: Likewise. * config/m32c/m32c-protos.h: Likewise. * config/spu/spu.c: Likewise. * config/sparc/sparc.c: Likewise. * config/i386/i386.c: Likewise. * config/sh/sh.c: Likewise. * config/xtensa/xtensa.c: Likewise. * config/stormy16/stormy16.c: Likewise. * config/ia64/ia64.c: Likewise. * config/rs6000/rs6000.c: Likewise. * config/pa/pa.c: Likewise. * config/mips/mips.c: Likewise. From-SVN: r138207
2008-07-28 16:33:56 +02:00
gimple init_stmt = NULL;
edge e_step;
backport: ChangeLog.tuples: ChangeLog from gimple-tuples-branch. 2008-07-28 Richard Guenther <rguenther@suse.de> Merge from gimple-tuples-branch. * ChangeLog.tuples: ChangeLog from gimple-tuples-branch. * gimple.def: New file. * gsstruct.def: Likewise. * gimple-iterator.c: Likewise. * gimple-pretty-print.c: Likewise. * tree-gimple.c: Removed. Merged into ... * gimple.c: ... here. New file. * tree-gimple.h: Removed. Merged into ... * gimple.h: ... here. New file. * Makefile.in: Add dependencies on GIMPLE_H and tree-iterator.h. * configure.ac: Added support for ENABLE_GIMPLE_CHECKING and the --enable-checking=gimple flag. * config.in: Likewise. * configure: Regenerated. * tree-ssa-operands.h: Tuplified. * tree-vrp.c: Likewise. * tree-loop-linear.c: Likewise. * tree-into-ssa.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-dump.c: Likewise. * tree-complex.c: Likewise. * cgraphbuild.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-pretty-print.c: Likewise. * tracer.c: Likewise. * gengtype.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * tree-ssa-loop-manip.c: Likewise. * value-prof.c: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-tailcall.c: Likewise. * value-prof.h: Likewise. * tree.c: Likewise. * tree.h: Likewise. * tree-pass.h: Likewise. * ipa-cp.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-scalar-evolution.h: Likewise. * target.h: Likewise. * lambda-mat.c: Likewise. * tree-phinodes.c: Likewise. * diagnostic.h: Likewise. * builtins.c: Likewise. * tree-ssa-alias-warnings.c: Likewise. * cfghooks.c: Likewise. * fold-const.c: Likewise. * cfghooks.h: Likewise. * omp-low.c: Likewise. * tree-ssa-dse.c: Likewise. * ipa-reference.c: Likewise. * tree-ssa-uncprop.c: Likewise. * toplev.c: Likewise. * tree-gimple.c: Likewise. * tree-gimple.h: Likewise. * tree-chrec.c: Likewise. * tree-chrec.h: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-sccvn.h: Likewise. * cgraphunit.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-nomudflap.c: Likewise. * tree-call-cdce.c: Likewise. * ipa-pure-const.c: Likewise. * c-format.c: Likewise. * tree-stdarg.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-nrv.c: Likewise. * tree-ssa-propagate.c: Likewise. * ipa-utils.c: Likewise. * tree-ssa-propagate.h: Likewise. * tree-ssa-alias.c: Likewise. * gimple-low.c: Likewise. * tree-ssa-sink.c: Likewise. * ipa-inline.c: Likewise. * c-semantics.c: Likewise. * dwarf2out.c: Likewise. * expr.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * predict.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-parloops.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * matrix-reorg.c: Likewise. * c-decl.c: Likewise. * tree-eh.c: Likewise. * c-pretty-print.c: Likewise. * lambda-trans.c: Likewise. * function.c: Likewise. * langhooks.c: Likewise. * ebitmap.h: Likewise. * tree-vectorizer.c: Likewise. * function.h: Likewise. * langhooks.h: Likewise. * tree-vectorizer.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * domwalk.c: Likewise. * tree-if-conv.c: Likewise. * profile.c: Likewise. * domwalk.h: Likewise. * tree-data-ref.c: Likewise. * tree-data-ref.h: Likewise. * tree-flow-inline.h: Likewise. * tree-affine.c: Likewise. * tree-vect-analyze.c: Likewise. * c-typeck.c: Likewise. * gimplify.c: Likewise. * coretypes.h: Likewise. * tree-ssa-phiopt.c: Likewise. * calls.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree.def: Likewise. * tree-dfa.c: Likewise. * except.c: Likewise. * except.h: Likewise. * cfgexpand.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-live.c: Likewise. * tree-sra.c: Likewise. * tree-ssa-live.h: Likewise. * tree-predcom.c: Likewise. * lambda.h: Likewise. * tree-mudflap.c: Likewise. * ipa-prop.c: Likewise. * print-tree.c: Likewise. * tree-ssa-copy.c: Likewise. * ipa-prop.h: Likewise. * tree-ssa-forwprop.c: Likewise. * ggc-page.c: Likewise. * c-omp.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-nested.c: Likewise. * tree-ssa.c: Likewise. * lambda-code.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-inline.c: Likewise. * tree-inline.h: Likewise. * tree-iterator.c: Likewise. * tree-optimize.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-vect-transform.c: Likewise. * tree-object-size.c: Likewise. * tree-outof-ssa.c: Likewise. * cfgloop.c: Likewise. * system.h: Likewise. * tree-profile.c: Likewise. * cfgloop.h: Likewise. * c-gimplify.c: Likewise. * c-common.c: Likewise. * tree-vect-generic.c: Likewise. * tree-flow.h: Likewise. * c-common.h: Likewise. * basic-block.h: Likewise. * tree-ssa-structalias.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-ssa-structalias.h: Likewise. * tree-cfg.c: Likewise. * passes.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * tree-ssa-reassoc.c: Likewise. * cfgrtl.c: Likewise. * varpool.c: Likewise. * stmt.c: Likewise. * tree-ssanames.c: Likewise. * tree-ssa-threadedge.c: Likewise. * langhooks-def.h: Likewise. * tree-ssa-operands.c: Likewise. * config/alpha/alpha.c: Likewise. * config/frv/frv.c: Likewise. * config/s390/s390.c: Likewise. * config/m32c/m32c.c: Likewise. * config/m32c/m32c-protos.h: Likewise. * config/spu/spu.c: Likewise. * config/sparc/sparc.c: Likewise. * config/i386/i386.c: Likewise. * config/sh/sh.c: Likewise. * config/xtensa/xtensa.c: Likewise. * config/stormy16/stormy16.c: Likewise. * config/ia64/ia64.c: Likewise. * config/rs6000/rs6000.c: Likewise. * config/pa/pa.c: Likewise. * config/mips/mips.c: Likewise. From-SVN: r138207
2008-07-28 16:33:56 +02:00
init_stmt = gimple_build_assign (parm1, val);
gcc_assert (init_stmt);
e_step = single_succ_edge (ENTRY_BLOCK_PTR_FOR_FUNCTION (cfun));
gsi_insert_on_edge_immediate (e_step, init_stmt);
}
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
/* build INTEGER_CST tree with type TREE_TYPE and value according to LAT.
Return the tree. */
static tree
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
build_const_val (struct ipcp_lattice *lat, tree tree_type)
{
tree const_val = NULL;
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
gcc_assert (ipcp_lat_is_const (lat));
const_val = fold_convert (tree_type, lat->constant);
return const_val;
}
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
/* Build the tree representing the constant and call constant_val_insert(). */
static void
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
ipcp_propagate_one_const (struct cgraph_node *node, int param,
struct ipcp_lattice *lat)
{
tree const_val;
tree parm_tree;
if (dump_file)
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
fprintf (dump_file, "propagating const to %s\n", cgraph_node_name (node));
parm_tree = ipa_get_ith_param (IPA_NODE_REF (node), param);
const_val = build_const_val (lat, TREE_TYPE (parm_tree));
constant_val_insert (parm_tree, const_val);
}
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
/* Compute the proper scale for NODE. It is the ratio between the number of
direct calls (represented on the incoming cgraph_edges) and sum of all
invocations of NODE (represented as count in cgraph_node). */
static void
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
ipcp_compute_node_scale (struct cgraph_node *node)
{
gcov_type sum;
struct cgraph_edge *cs;
sum = 0;
/* Compute sum of all counts of callers. */
for (cs = node->callers; cs != NULL; cs = cs->next_caller)
sum += cs->count;
if (node->count == 0)
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
ipcp_set_node_scale (node, 0);
else
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
ipcp_set_node_scale (node, sum * REG_BR_PROB_BASE / node->count);
}
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
/* Initialization and computation of IPCP data structures. This is the initial
intraprocedural analysis of functions, which gathers information to be
propagated later on. */
static void
ipcp_init_stage (void)
{
struct cgraph_node *node;
struct cgraph_edge *cs;
for (node = cgraph_nodes; node; node = node->next)
{
if (!node->analyzed)
continue;
/* Unreachable nodes should have been eliminated before ipcp. */
gcc_assert (node->needed || node->reachable);
ipa-cp.c (ipcp_init_stage): Calls ipa_set_called_with_variable_arg instead of setting number of formal... 2008-04-30 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_init_stage): Calls ipa_set_called_with_variable_arg instead of setting number of formal parameters to zero. (ipcp_init_stage): Do not set the number of actual parameters to zero either. (ipcp_propagate_stage): Explicitly skipping all calls to nodes which are called with variable number of arguments. (ipcp_insert_stage): Explicitely skipping all nodes which are called with variable number of arguments. (ipcp_callsite_param_print): Skipps callsites to nodes with varaible number of parameters. * ipa-prop.h (struct ipa_node_params): Added flag called_with_var_arguments (ipa_set_param_count): Added. Changed sole setter to use it. (ipa_get_param_count): Added. All readers of param_count converted to use it instead. (ipa_set_called_with_variable_arg): Added. (ipa_is_called_with_var_arguments): Added. (ipa_get_ith_param): Added. All readers of param_decls converted to use it instead. (ipa_set_cs_argument_count): Added, sole writer to argument_count changed to use it. (ipa_get_cs_argument_count): Added, all readers of argument_count changed to cal it. (ipa_get_ith_jump_func): Added. Accessors of jump values changed to use it. * ipa-prop.h (struct ipcp_formal): Renamed to ipcp_lattice (struct ipcp_lattice): Renamed cval_type to type (struct ipa_node_params): ipcp_cval renamed to ipcp_lattices * ipa-cp.c (ipcp_cval_get_cvalue): Changed return value to tree (ipcp_cval_set_cvalue): Changed type of parameter value to tree (ipcp_insert_stage): Changed the type of variable cvalue to tree (ipcp_replace_map_create): Changed the type of parameter cvalue to tree (build_const_val): Changed the type of parameter cvalue to tree (ipcp_propagate_const): Changed the type of parameter cvalue to tree (ipcp_method_cval_set_cvalue_type): Renamed parameter cval_type1 to type * ipa-prop.h (struct ipcp_formal): Replaced cvalue with tree called constant * ipa-prop.c (ipa_methodlist_init): Renamed to ipa_init_func_list (ipa_methodlist_not_empty): Removed, the sole user now checks directly (ipa_add_method): Renamed to ipa_push_func_to_list (ipa_remove_method): Renamed to ipa_pop_func_from_list (ipa_callsite_param_count): Removed. (ipa_callsite_param_count_set): Removed. (ipa_callsite_param): Removed. (ipa_callsite_callee): Removed. (ipa_callsite_compute_param): Renamed to ipa_compute_jump_functions (ipa_callsite_compute_count): Renamed to ipa_count_arguments (ipa_method_formal_count): Removed. (ipa_method_formal_count_set): Removed. (ipa_method_get_tree): Removed. (ipa_method_tree_map_create): Removed. (ipa_method_compute_tree_map): Renamed to ipa_create_param_decls_array (ipa_create_param_decls_array): Creates the array itself (ipa_create_param_decls_array): Temporary variable info instead of a few dereferences. (ipa_method_formal_compute_count): Renamed to ipa_count_formal_params (ipa_method_compute_modify): Renamed to ipa_detect_param_modifications (get_type): Removed. (ipa_jf_get_info_type): Removed. (ipa_node_create): Renamed to ipa_create_node_params (ipa_free): Renamed to ipa_free_all_node_params (ipa_nodes_create): Renamed to ipa_create_all_node_params (ipa_edges_create): Renamed to ipa_create_all_edge_args (ipa_edges_free): Renamed to ipa_free_all_edge_args (ipa_nodes_free): Integrated into ipa_free_all_node_params and removed (ipa_free_all_node_params): Deallocation to jump_functions moved to ipa_free_all_edge_args (ipa_method_tree_print): Renamed to ipa_print_all_tree_maps (ipa_method_modify_print): Renamed to ipa_print_all_params_modified (ipa_create_methodlist_node): Removed. (ipa_methodlist_method): Removed. (ipa_methodlist_method_set): Removed. (ipa_methodlist_next_method): Removed. (ipa_methodlist_next_method_set): Removed. (ipa_method_is_modified): Removed. (ipa_method_modify_create): Removed. (ipa_method_modify_init): Temporary variable info instead of a few dereferences. (ipa_detect_param_modifications): Temporary variable info instead of a few dereferences. (ipa_compute_jump_functions): Temporary variable info instead of a few dereferences. (ipa_method_modify_set): Removed. (ipa_method_tree_map): Renamed to ipa_get_param_decl_index (ipa_get_param_decl_index): Now accepts struct ipa_node_params rather than craph_node as the first parameter. (ipa_method_modify_stmt): Renamed to ipa_check_stmt_modifications (ipa_method_modify_init): Removed. (ipa_compute_jump_functions): Added a temp variable instead of repeatadly dereferencing the cgraph_edge.aux pointer (ipa_callsite_param_set_type): Removed. (ipa_compute_jump_functions): i renamed to index and moved to an inner block (ipa_callsite_param_set_info_type_formal): Removed. (ipa_callsite_param_set_info_type): Removed. (ipa_callsite_param_map_create): Removed. (ipa_callsite_tree): Removed. (ipa_callsite_caller): Removed. (ipa_pop_func_from_list): return_method removed to return_func * ipa-prop.h (enum cvalue_type): Renamed to ipa_lattice_type, prefixed all values with IPA_. Changed all users. (enum jump_func_type): Rnamed UNKNOWN_IPATYPE to IPA_UNKNOWN, CONST_IPATYPE to IPA_CONST, CONST_IPATYPE_REF to IPA_CONST_REF and FORMAL_IPATYPE IPA_PASS_THROUGH. (union parameter_info): Renamed to jump_func_value. (union jump_func_value): Renamed value to constant (struct ipa_jump_func): Renamed info_type to value (struct ipa_node): Renamed to ipa_node_params (struct ipa_node_params): Renamed ipa_arg_num to param_count (struct ipa_node_params): Renamed ipa_param_tree to param_decls (struct ipa_node_params): Renamed ipa_mod to modified_flags (struct ipa_edge): Renamed to ipa_edge_args (struct ipa_edge_args): Renamed ipa_param_num to argument_count (struct ipa_edge_args): Renamed ipa_param_map to jump_functions (struct ipa_methodlist): Renamed to ipa_func_list (struct ipa_func_list): method_p renamed to node, next_method renamed to next (ipa_methodlist_p): Removed, switched all users to struct pointer (IS_VALID_TREE_MAP_INDEX): Renamed to IS_VALID_JUMP_FUNC_INDEX From-SVN: r134818
2008-04-30 12:01:59 +02:00
ipa_count_formal_params (node);
ipa_create_param_decls_array (node);
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
ipcp_initialize_node_lattices (node);
ipa-cp.c (ipcp_init_stage): Calls ipa_set_called_with_variable_arg instead of setting number of formal... 2008-04-30 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_init_stage): Calls ipa_set_called_with_variable_arg instead of setting number of formal parameters to zero. (ipcp_init_stage): Do not set the number of actual parameters to zero either. (ipcp_propagate_stage): Explicitly skipping all calls to nodes which are called with variable number of arguments. (ipcp_insert_stage): Explicitely skipping all nodes which are called with variable number of arguments. (ipcp_callsite_param_print): Skipps callsites to nodes with varaible number of parameters. * ipa-prop.h (struct ipa_node_params): Added flag called_with_var_arguments (ipa_set_param_count): Added. Changed sole setter to use it. (ipa_get_param_count): Added. All readers of param_count converted to use it instead. (ipa_set_called_with_variable_arg): Added. (ipa_is_called_with_var_arguments): Added. (ipa_get_ith_param): Added. All readers of param_decls converted to use it instead. (ipa_set_cs_argument_count): Added, sole writer to argument_count changed to use it. (ipa_get_cs_argument_count): Added, all readers of argument_count changed to cal it. (ipa_get_ith_jump_func): Added. Accessors of jump values changed to use it. * ipa-prop.h (struct ipcp_formal): Renamed to ipcp_lattice (struct ipcp_lattice): Renamed cval_type to type (struct ipa_node_params): ipcp_cval renamed to ipcp_lattices * ipa-cp.c (ipcp_cval_get_cvalue): Changed return value to tree (ipcp_cval_set_cvalue): Changed type of parameter value to tree (ipcp_insert_stage): Changed the type of variable cvalue to tree (ipcp_replace_map_create): Changed the type of parameter cvalue to tree (build_const_val): Changed the type of parameter cvalue to tree (ipcp_propagate_const): Changed the type of parameter cvalue to tree (ipcp_method_cval_set_cvalue_type): Renamed parameter cval_type1 to type * ipa-prop.h (struct ipcp_formal): Replaced cvalue with tree called constant * ipa-prop.c (ipa_methodlist_init): Renamed to ipa_init_func_list (ipa_methodlist_not_empty): Removed, the sole user now checks directly (ipa_add_method): Renamed to ipa_push_func_to_list (ipa_remove_method): Renamed to ipa_pop_func_from_list (ipa_callsite_param_count): Removed. (ipa_callsite_param_count_set): Removed. (ipa_callsite_param): Removed. (ipa_callsite_callee): Removed. (ipa_callsite_compute_param): Renamed to ipa_compute_jump_functions (ipa_callsite_compute_count): Renamed to ipa_count_arguments (ipa_method_formal_count): Removed. (ipa_method_formal_count_set): Removed. (ipa_method_get_tree): Removed. (ipa_method_tree_map_create): Removed. (ipa_method_compute_tree_map): Renamed to ipa_create_param_decls_array (ipa_create_param_decls_array): Creates the array itself (ipa_create_param_decls_array): Temporary variable info instead of a few dereferences. (ipa_method_formal_compute_count): Renamed to ipa_count_formal_params (ipa_method_compute_modify): Renamed to ipa_detect_param_modifications (get_type): Removed. (ipa_jf_get_info_type): Removed. (ipa_node_create): Renamed to ipa_create_node_params (ipa_free): Renamed to ipa_free_all_node_params (ipa_nodes_create): Renamed to ipa_create_all_node_params (ipa_edges_create): Renamed to ipa_create_all_edge_args (ipa_edges_free): Renamed to ipa_free_all_edge_args (ipa_nodes_free): Integrated into ipa_free_all_node_params and removed (ipa_free_all_node_params): Deallocation to jump_functions moved to ipa_free_all_edge_args (ipa_method_tree_print): Renamed to ipa_print_all_tree_maps (ipa_method_modify_print): Renamed to ipa_print_all_params_modified (ipa_create_methodlist_node): Removed. (ipa_methodlist_method): Removed. (ipa_methodlist_method_set): Removed. (ipa_methodlist_next_method): Removed. (ipa_methodlist_next_method_set): Removed. (ipa_method_is_modified): Removed. (ipa_method_modify_create): Removed. (ipa_method_modify_init): Temporary variable info instead of a few dereferences. (ipa_detect_param_modifications): Temporary variable info instead of a few dereferences. (ipa_compute_jump_functions): Temporary variable info instead of a few dereferences. (ipa_method_modify_set): Removed. (ipa_method_tree_map): Renamed to ipa_get_param_decl_index (ipa_get_param_decl_index): Now accepts struct ipa_node_params rather than craph_node as the first parameter. (ipa_method_modify_stmt): Renamed to ipa_check_stmt_modifications (ipa_method_modify_init): Removed. (ipa_compute_jump_functions): Added a temp variable instead of repeatadly dereferencing the cgraph_edge.aux pointer (ipa_callsite_param_set_type): Removed. (ipa_compute_jump_functions): i renamed to index and moved to an inner block (ipa_callsite_param_set_info_type_formal): Removed. (ipa_callsite_param_set_info_type): Removed. (ipa_callsite_param_map_create): Removed. (ipa_callsite_tree): Removed. (ipa_callsite_caller): Removed. (ipa_pop_func_from_list): return_method removed to return_func * ipa-prop.h (enum cvalue_type): Renamed to ipa_lattice_type, prefixed all values with IPA_. Changed all users. (enum jump_func_type): Rnamed UNKNOWN_IPATYPE to IPA_UNKNOWN, CONST_IPATYPE to IPA_CONST, CONST_IPATYPE_REF to IPA_CONST_REF and FORMAL_IPATYPE IPA_PASS_THROUGH. (union parameter_info): Renamed to jump_func_value. (union jump_func_value): Renamed value to constant (struct ipa_jump_func): Renamed info_type to value (struct ipa_node): Renamed to ipa_node_params (struct ipa_node_params): Renamed ipa_arg_num to param_count (struct ipa_node_params): Renamed ipa_param_tree to param_decls (struct ipa_node_params): Renamed ipa_mod to modified_flags (struct ipa_edge): Renamed to ipa_edge_args (struct ipa_edge_args): Renamed ipa_param_num to argument_count (struct ipa_edge_args): Renamed ipa_param_map to jump_functions (struct ipa_methodlist): Renamed to ipa_func_list (struct ipa_func_list): method_p renamed to node, next_method renamed to next (ipa_methodlist_p): Removed, switched all users to struct pointer (IS_VALID_TREE_MAP_INDEX): Renamed to IS_VALID_JUMP_FUNC_INDEX From-SVN: r134818
2008-04-30 12:01:59 +02:00
ipa_detect_param_modifications (node);
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
ipcp_compute_node_scale (node);
}
for (node = cgraph_nodes; node; node = node->next)
{
if (!node->analyzed)
continue;
/* building jump functions */
for (cs = node->callees; cs; cs = cs->next_callee)
{
if (!cs->callee->analyzed)
continue;
ipa-cp.c (ipcp_init_stage): Calls ipa_set_called_with_variable_arg instead of setting number of formal... 2008-04-30 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_init_stage): Calls ipa_set_called_with_variable_arg instead of setting number of formal parameters to zero. (ipcp_init_stage): Do not set the number of actual parameters to zero either. (ipcp_propagate_stage): Explicitly skipping all calls to nodes which are called with variable number of arguments. (ipcp_insert_stage): Explicitely skipping all nodes which are called with variable number of arguments. (ipcp_callsite_param_print): Skipps callsites to nodes with varaible number of parameters. * ipa-prop.h (struct ipa_node_params): Added flag called_with_var_arguments (ipa_set_param_count): Added. Changed sole setter to use it. (ipa_get_param_count): Added. All readers of param_count converted to use it instead. (ipa_set_called_with_variable_arg): Added. (ipa_is_called_with_var_arguments): Added. (ipa_get_ith_param): Added. All readers of param_decls converted to use it instead. (ipa_set_cs_argument_count): Added, sole writer to argument_count changed to use it. (ipa_get_cs_argument_count): Added, all readers of argument_count changed to cal it. (ipa_get_ith_jump_func): Added. Accessors of jump values changed to use it. * ipa-prop.h (struct ipcp_formal): Renamed to ipcp_lattice (struct ipcp_lattice): Renamed cval_type to type (struct ipa_node_params): ipcp_cval renamed to ipcp_lattices * ipa-cp.c (ipcp_cval_get_cvalue): Changed return value to tree (ipcp_cval_set_cvalue): Changed type of parameter value to tree (ipcp_insert_stage): Changed the type of variable cvalue to tree (ipcp_replace_map_create): Changed the type of parameter cvalue to tree (build_const_val): Changed the type of parameter cvalue to tree (ipcp_propagate_const): Changed the type of parameter cvalue to tree (ipcp_method_cval_set_cvalue_type): Renamed parameter cval_type1 to type * ipa-prop.h (struct ipcp_formal): Replaced cvalue with tree called constant * ipa-prop.c (ipa_methodlist_init): Renamed to ipa_init_func_list (ipa_methodlist_not_empty): Removed, the sole user now checks directly (ipa_add_method): Renamed to ipa_push_func_to_list (ipa_remove_method): Renamed to ipa_pop_func_from_list (ipa_callsite_param_count): Removed. (ipa_callsite_param_count_set): Removed. (ipa_callsite_param): Removed. (ipa_callsite_callee): Removed. (ipa_callsite_compute_param): Renamed to ipa_compute_jump_functions (ipa_callsite_compute_count): Renamed to ipa_count_arguments (ipa_method_formal_count): Removed. (ipa_method_formal_count_set): Removed. (ipa_method_get_tree): Removed. (ipa_method_tree_map_create): Removed. (ipa_method_compute_tree_map): Renamed to ipa_create_param_decls_array (ipa_create_param_decls_array): Creates the array itself (ipa_create_param_decls_array): Temporary variable info instead of a few dereferences. (ipa_method_formal_compute_count): Renamed to ipa_count_formal_params (ipa_method_compute_modify): Renamed to ipa_detect_param_modifications (get_type): Removed. (ipa_jf_get_info_type): Removed. (ipa_node_create): Renamed to ipa_create_node_params (ipa_free): Renamed to ipa_free_all_node_params (ipa_nodes_create): Renamed to ipa_create_all_node_params (ipa_edges_create): Renamed to ipa_create_all_edge_args (ipa_edges_free): Renamed to ipa_free_all_edge_args (ipa_nodes_free): Integrated into ipa_free_all_node_params and removed (ipa_free_all_node_params): Deallocation to jump_functions moved to ipa_free_all_edge_args (ipa_method_tree_print): Renamed to ipa_print_all_tree_maps (ipa_method_modify_print): Renamed to ipa_print_all_params_modified (ipa_create_methodlist_node): Removed. (ipa_methodlist_method): Removed. (ipa_methodlist_method_set): Removed. (ipa_methodlist_next_method): Removed. (ipa_methodlist_next_method_set): Removed. (ipa_method_is_modified): Removed. (ipa_method_modify_create): Removed. (ipa_method_modify_init): Temporary variable info instead of a few dereferences. (ipa_detect_param_modifications): Temporary variable info instead of a few dereferences. (ipa_compute_jump_functions): Temporary variable info instead of a few dereferences. (ipa_method_modify_set): Removed. (ipa_method_tree_map): Renamed to ipa_get_param_decl_index (ipa_get_param_decl_index): Now accepts struct ipa_node_params rather than craph_node as the first parameter. (ipa_method_modify_stmt): Renamed to ipa_check_stmt_modifications (ipa_method_modify_init): Removed. (ipa_compute_jump_functions): Added a temp variable instead of repeatadly dereferencing the cgraph_edge.aux pointer (ipa_callsite_param_set_type): Removed. (ipa_compute_jump_functions): i renamed to index and moved to an inner block (ipa_callsite_param_set_info_type_formal): Removed. (ipa_callsite_param_set_info_type): Removed. (ipa_callsite_param_map_create): Removed. (ipa_callsite_tree): Removed. (ipa_callsite_caller): Removed. (ipa_pop_func_from_list): return_method removed to return_func * ipa-prop.h (enum cvalue_type): Renamed to ipa_lattice_type, prefixed all values with IPA_. Changed all users. (enum jump_func_type): Rnamed UNKNOWN_IPATYPE to IPA_UNKNOWN, CONST_IPATYPE to IPA_CONST, CONST_IPATYPE_REF to IPA_CONST_REF and FORMAL_IPATYPE IPA_PASS_THROUGH. (union parameter_info): Renamed to jump_func_value. (union jump_func_value): Renamed value to constant (struct ipa_jump_func): Renamed info_type to value (struct ipa_node): Renamed to ipa_node_params (struct ipa_node_params): Renamed ipa_arg_num to param_count (struct ipa_node_params): Renamed ipa_param_tree to param_decls (struct ipa_node_params): Renamed ipa_mod to modified_flags (struct ipa_edge): Renamed to ipa_edge_args (struct ipa_edge_args): Renamed ipa_param_num to argument_count (struct ipa_edge_args): Renamed ipa_param_map to jump_functions (struct ipa_methodlist): Renamed to ipa_func_list (struct ipa_func_list): method_p renamed to node, next_method renamed to next (ipa_methodlist_p): Removed, switched all users to struct pointer (IS_VALID_TREE_MAP_INDEX): Renamed to IS_VALID_JUMP_FUNC_INDEX From-SVN: r134818
2008-04-30 12:01:59 +02:00
ipa_count_arguments (cs);
if (ipa_get_cs_argument_count (IPA_EDGE_REF (cs))
!= ipa_get_param_count (IPA_NODE_REF (cs->callee)))
{
/* Handle cases of functions with
a variable number of parameters. */
ipa-cp.c (ipcp_init_stage): Calls ipa_set_called_with_variable_arg instead of setting number of formal... 2008-04-30 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_init_stage): Calls ipa_set_called_with_variable_arg instead of setting number of formal parameters to zero. (ipcp_init_stage): Do not set the number of actual parameters to zero either. (ipcp_propagate_stage): Explicitly skipping all calls to nodes which are called with variable number of arguments. (ipcp_insert_stage): Explicitely skipping all nodes which are called with variable number of arguments. (ipcp_callsite_param_print): Skipps callsites to nodes with varaible number of parameters. * ipa-prop.h (struct ipa_node_params): Added flag called_with_var_arguments (ipa_set_param_count): Added. Changed sole setter to use it. (ipa_get_param_count): Added. All readers of param_count converted to use it instead. (ipa_set_called_with_variable_arg): Added. (ipa_is_called_with_var_arguments): Added. (ipa_get_ith_param): Added. All readers of param_decls converted to use it instead. (ipa_set_cs_argument_count): Added, sole writer to argument_count changed to use it. (ipa_get_cs_argument_count): Added, all readers of argument_count changed to cal it. (ipa_get_ith_jump_func): Added. Accessors of jump values changed to use it. * ipa-prop.h (struct ipcp_formal): Renamed to ipcp_lattice (struct ipcp_lattice): Renamed cval_type to type (struct ipa_node_params): ipcp_cval renamed to ipcp_lattices * ipa-cp.c (ipcp_cval_get_cvalue): Changed return value to tree (ipcp_cval_set_cvalue): Changed type of parameter value to tree (ipcp_insert_stage): Changed the type of variable cvalue to tree (ipcp_replace_map_create): Changed the type of parameter cvalue to tree (build_const_val): Changed the type of parameter cvalue to tree (ipcp_propagate_const): Changed the type of parameter cvalue to tree (ipcp_method_cval_set_cvalue_type): Renamed parameter cval_type1 to type * ipa-prop.h (struct ipcp_formal): Replaced cvalue with tree called constant * ipa-prop.c (ipa_methodlist_init): Renamed to ipa_init_func_list (ipa_methodlist_not_empty): Removed, the sole user now checks directly (ipa_add_method): Renamed to ipa_push_func_to_list (ipa_remove_method): Renamed to ipa_pop_func_from_list (ipa_callsite_param_count): Removed. (ipa_callsite_param_count_set): Removed. (ipa_callsite_param): Removed. (ipa_callsite_callee): Removed. (ipa_callsite_compute_param): Renamed to ipa_compute_jump_functions (ipa_callsite_compute_count): Renamed to ipa_count_arguments (ipa_method_formal_count): Removed. (ipa_method_formal_count_set): Removed. (ipa_method_get_tree): Removed. (ipa_method_tree_map_create): Removed. (ipa_method_compute_tree_map): Renamed to ipa_create_param_decls_array (ipa_create_param_decls_array): Creates the array itself (ipa_create_param_decls_array): Temporary variable info instead of a few dereferences. (ipa_method_formal_compute_count): Renamed to ipa_count_formal_params (ipa_method_compute_modify): Renamed to ipa_detect_param_modifications (get_type): Removed. (ipa_jf_get_info_type): Removed. (ipa_node_create): Renamed to ipa_create_node_params (ipa_free): Renamed to ipa_free_all_node_params (ipa_nodes_create): Renamed to ipa_create_all_node_params (ipa_edges_create): Renamed to ipa_create_all_edge_args (ipa_edges_free): Renamed to ipa_free_all_edge_args (ipa_nodes_free): Integrated into ipa_free_all_node_params and removed (ipa_free_all_node_params): Deallocation to jump_functions moved to ipa_free_all_edge_args (ipa_method_tree_print): Renamed to ipa_print_all_tree_maps (ipa_method_modify_print): Renamed to ipa_print_all_params_modified (ipa_create_methodlist_node): Removed. (ipa_methodlist_method): Removed. (ipa_methodlist_method_set): Removed. (ipa_methodlist_next_method): Removed. (ipa_methodlist_next_method_set): Removed. (ipa_method_is_modified): Removed. (ipa_method_modify_create): Removed. (ipa_method_modify_init): Temporary variable info instead of a few dereferences. (ipa_detect_param_modifications): Temporary variable info instead of a few dereferences. (ipa_compute_jump_functions): Temporary variable info instead of a few dereferences. (ipa_method_modify_set): Removed. (ipa_method_tree_map): Renamed to ipa_get_param_decl_index (ipa_get_param_decl_index): Now accepts struct ipa_node_params rather than craph_node as the first parameter. (ipa_method_modify_stmt): Renamed to ipa_check_stmt_modifications (ipa_method_modify_init): Removed. (ipa_compute_jump_functions): Added a temp variable instead of repeatadly dereferencing the cgraph_edge.aux pointer (ipa_callsite_param_set_type): Removed. (ipa_compute_jump_functions): i renamed to index and moved to an inner block (ipa_callsite_param_set_info_type_formal): Removed. (ipa_callsite_param_set_info_type): Removed. (ipa_callsite_param_map_create): Removed. (ipa_callsite_tree): Removed. (ipa_callsite_caller): Removed. (ipa_pop_func_from_list): return_method removed to return_func * ipa-prop.h (enum cvalue_type): Renamed to ipa_lattice_type, prefixed all values with IPA_. Changed all users. (enum jump_func_type): Rnamed UNKNOWN_IPATYPE to IPA_UNKNOWN, CONST_IPATYPE to IPA_CONST, CONST_IPATYPE_REF to IPA_CONST_REF and FORMAL_IPATYPE IPA_PASS_THROUGH. (union parameter_info): Renamed to jump_func_value. (union jump_func_value): Renamed value to constant (struct ipa_jump_func): Renamed info_type to value (struct ipa_node): Renamed to ipa_node_params (struct ipa_node_params): Renamed ipa_arg_num to param_count (struct ipa_node_params): Renamed ipa_param_tree to param_decls (struct ipa_node_params): Renamed ipa_mod to modified_flags (struct ipa_edge): Renamed to ipa_edge_args (struct ipa_edge_args): Renamed ipa_param_num to argument_count (struct ipa_edge_args): Renamed ipa_param_map to jump_functions (struct ipa_methodlist): Renamed to ipa_func_list (struct ipa_func_list): method_p renamed to node, next_method renamed to next (ipa_methodlist_p): Removed, switched all users to struct pointer (IS_VALID_TREE_MAP_INDEX): Renamed to IS_VALID_JUMP_FUNC_INDEX From-SVN: r134818
2008-04-30 12:01:59 +02:00
ipa_set_called_with_variable_arg (IPA_NODE_REF (cs->callee));
}
else
ipa-cp.c (ipcp_init_stage): Calls ipa_set_called_with_variable_arg instead of setting number of formal... 2008-04-30 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_init_stage): Calls ipa_set_called_with_variable_arg instead of setting number of formal parameters to zero. (ipcp_init_stage): Do not set the number of actual parameters to zero either. (ipcp_propagate_stage): Explicitly skipping all calls to nodes which are called with variable number of arguments. (ipcp_insert_stage): Explicitely skipping all nodes which are called with variable number of arguments. (ipcp_callsite_param_print): Skipps callsites to nodes with varaible number of parameters. * ipa-prop.h (struct ipa_node_params): Added flag called_with_var_arguments (ipa_set_param_count): Added. Changed sole setter to use it. (ipa_get_param_count): Added. All readers of param_count converted to use it instead. (ipa_set_called_with_variable_arg): Added. (ipa_is_called_with_var_arguments): Added. (ipa_get_ith_param): Added. All readers of param_decls converted to use it instead. (ipa_set_cs_argument_count): Added, sole writer to argument_count changed to use it. (ipa_get_cs_argument_count): Added, all readers of argument_count changed to cal it. (ipa_get_ith_jump_func): Added. Accessors of jump values changed to use it. * ipa-prop.h (struct ipcp_formal): Renamed to ipcp_lattice (struct ipcp_lattice): Renamed cval_type to type (struct ipa_node_params): ipcp_cval renamed to ipcp_lattices * ipa-cp.c (ipcp_cval_get_cvalue): Changed return value to tree (ipcp_cval_set_cvalue): Changed type of parameter value to tree (ipcp_insert_stage): Changed the type of variable cvalue to tree (ipcp_replace_map_create): Changed the type of parameter cvalue to tree (build_const_val): Changed the type of parameter cvalue to tree (ipcp_propagate_const): Changed the type of parameter cvalue to tree (ipcp_method_cval_set_cvalue_type): Renamed parameter cval_type1 to type * ipa-prop.h (struct ipcp_formal): Replaced cvalue with tree called constant * ipa-prop.c (ipa_methodlist_init): Renamed to ipa_init_func_list (ipa_methodlist_not_empty): Removed, the sole user now checks directly (ipa_add_method): Renamed to ipa_push_func_to_list (ipa_remove_method): Renamed to ipa_pop_func_from_list (ipa_callsite_param_count): Removed. (ipa_callsite_param_count_set): Removed. (ipa_callsite_param): Removed. (ipa_callsite_callee): Removed. (ipa_callsite_compute_param): Renamed to ipa_compute_jump_functions (ipa_callsite_compute_count): Renamed to ipa_count_arguments (ipa_method_formal_count): Removed. (ipa_method_formal_count_set): Removed. (ipa_method_get_tree): Removed. (ipa_method_tree_map_create): Removed. (ipa_method_compute_tree_map): Renamed to ipa_create_param_decls_array (ipa_create_param_decls_array): Creates the array itself (ipa_create_param_decls_array): Temporary variable info instead of a few dereferences. (ipa_method_formal_compute_count): Renamed to ipa_count_formal_params (ipa_method_compute_modify): Renamed to ipa_detect_param_modifications (get_type): Removed. (ipa_jf_get_info_type): Removed. (ipa_node_create): Renamed to ipa_create_node_params (ipa_free): Renamed to ipa_free_all_node_params (ipa_nodes_create): Renamed to ipa_create_all_node_params (ipa_edges_create): Renamed to ipa_create_all_edge_args (ipa_edges_free): Renamed to ipa_free_all_edge_args (ipa_nodes_free): Integrated into ipa_free_all_node_params and removed (ipa_free_all_node_params): Deallocation to jump_functions moved to ipa_free_all_edge_args (ipa_method_tree_print): Renamed to ipa_print_all_tree_maps (ipa_method_modify_print): Renamed to ipa_print_all_params_modified (ipa_create_methodlist_node): Removed. (ipa_methodlist_method): Removed. (ipa_methodlist_method_set): Removed. (ipa_methodlist_next_method): Removed. (ipa_methodlist_next_method_set): Removed. (ipa_method_is_modified): Removed. (ipa_method_modify_create): Removed. (ipa_method_modify_init): Temporary variable info instead of a few dereferences. (ipa_detect_param_modifications): Temporary variable info instead of a few dereferences. (ipa_compute_jump_functions): Temporary variable info instead of a few dereferences. (ipa_method_modify_set): Removed. (ipa_method_tree_map): Renamed to ipa_get_param_decl_index (ipa_get_param_decl_index): Now accepts struct ipa_node_params rather than craph_node as the first parameter. (ipa_method_modify_stmt): Renamed to ipa_check_stmt_modifications (ipa_method_modify_init): Removed. (ipa_compute_jump_functions): Added a temp variable instead of repeatadly dereferencing the cgraph_edge.aux pointer (ipa_callsite_param_set_type): Removed. (ipa_compute_jump_functions): i renamed to index and moved to an inner block (ipa_callsite_param_set_info_type_formal): Removed. (ipa_callsite_param_set_info_type): Removed. (ipa_callsite_param_map_create): Removed. (ipa_callsite_tree): Removed. (ipa_callsite_caller): Removed. (ipa_pop_func_from_list): return_method removed to return_func * ipa-prop.h (enum cvalue_type): Renamed to ipa_lattice_type, prefixed all values with IPA_. Changed all users. (enum jump_func_type): Rnamed UNKNOWN_IPATYPE to IPA_UNKNOWN, CONST_IPATYPE to IPA_CONST, CONST_IPATYPE_REF to IPA_CONST_REF and FORMAL_IPATYPE IPA_PASS_THROUGH. (union parameter_info): Renamed to jump_func_value. (union jump_func_value): Renamed value to constant (struct ipa_jump_func): Renamed info_type to value (struct ipa_node): Renamed to ipa_node_params (struct ipa_node_params): Renamed ipa_arg_num to param_count (struct ipa_node_params): Renamed ipa_param_tree to param_decls (struct ipa_node_params): Renamed ipa_mod to modified_flags (struct ipa_edge): Renamed to ipa_edge_args (struct ipa_edge_args): Renamed ipa_param_num to argument_count (struct ipa_edge_args): Renamed ipa_param_map to jump_functions (struct ipa_methodlist): Renamed to ipa_func_list (struct ipa_func_list): method_p renamed to node, next_method renamed to next (ipa_methodlist_p): Removed, switched all users to struct pointer (IS_VALID_TREE_MAP_INDEX): Renamed to IS_VALID_JUMP_FUNC_INDEX From-SVN: r134818
2008-04-30 12:01:59 +02:00
ipa_compute_jump_functions (cs);
}
}
}
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
/* Return true if there are some formal parameters whose value is IPA_TOP (in
the whole compilation unit). Change their values to IPA_BOTTOM, since they
most probably get their values from outside of this compilation unit. */
static bool
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
ipcp_change_tops_to_bottom (void)
{
int i, count;
struct cgraph_node *node;
bool prop_again;
prop_again = false;
for (node = cgraph_nodes; node; node = node->next)
{
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
struct ipa_node_params *info = IPA_NODE_REF (node);
count = ipa_get_param_count (info);
for (i = 0; i < count; i++)
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
{
struct ipcp_lattice *lat = ipcp_get_ith_lattice (info, i);
if (lat->type == IPA_TOP)
{
prop_again = true;
lat->type = IPA_BOTTOM;
}
}
}
return prop_again;
}
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
/* Interprocedural analysis. The algorithm propagates constants from the
caller's parameters to the callee's arguments. */
static void
ipcp_propagate_stage (void)
{
int i;
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
struct ipcp_lattice inc_lat = { IPA_BOTTOM, NULL };
struct ipcp_lattice new_lat = { IPA_BOTTOM, NULL };
struct ipcp_lattice *dest_lat;
struct cgraph_edge *cs;
struct ipa_jump_func *jump_func;
ipa-cp.c (ipcp_init_stage): Calls ipa_set_called_with_variable_arg instead of setting number of formal... 2008-04-30 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_init_stage): Calls ipa_set_called_with_variable_arg instead of setting number of formal parameters to zero. (ipcp_init_stage): Do not set the number of actual parameters to zero either. (ipcp_propagate_stage): Explicitly skipping all calls to nodes which are called with variable number of arguments. (ipcp_insert_stage): Explicitely skipping all nodes which are called with variable number of arguments. (ipcp_callsite_param_print): Skipps callsites to nodes with varaible number of parameters. * ipa-prop.h (struct ipa_node_params): Added flag called_with_var_arguments (ipa_set_param_count): Added. Changed sole setter to use it. (ipa_get_param_count): Added. All readers of param_count converted to use it instead. (ipa_set_called_with_variable_arg): Added. (ipa_is_called_with_var_arguments): Added. (ipa_get_ith_param): Added. All readers of param_decls converted to use it instead. (ipa_set_cs_argument_count): Added, sole writer to argument_count changed to use it. (ipa_get_cs_argument_count): Added, all readers of argument_count changed to cal it. (ipa_get_ith_jump_func): Added. Accessors of jump values changed to use it. * ipa-prop.h (struct ipcp_formal): Renamed to ipcp_lattice (struct ipcp_lattice): Renamed cval_type to type (struct ipa_node_params): ipcp_cval renamed to ipcp_lattices * ipa-cp.c (ipcp_cval_get_cvalue): Changed return value to tree (ipcp_cval_set_cvalue): Changed type of parameter value to tree (ipcp_insert_stage): Changed the type of variable cvalue to tree (ipcp_replace_map_create): Changed the type of parameter cvalue to tree (build_const_val): Changed the type of parameter cvalue to tree (ipcp_propagate_const): Changed the type of parameter cvalue to tree (ipcp_method_cval_set_cvalue_type): Renamed parameter cval_type1 to type * ipa-prop.h (struct ipcp_formal): Replaced cvalue with tree called constant * ipa-prop.c (ipa_methodlist_init): Renamed to ipa_init_func_list (ipa_methodlist_not_empty): Removed, the sole user now checks directly (ipa_add_method): Renamed to ipa_push_func_to_list (ipa_remove_method): Renamed to ipa_pop_func_from_list (ipa_callsite_param_count): Removed. (ipa_callsite_param_count_set): Removed. (ipa_callsite_param): Removed. (ipa_callsite_callee): Removed. (ipa_callsite_compute_param): Renamed to ipa_compute_jump_functions (ipa_callsite_compute_count): Renamed to ipa_count_arguments (ipa_method_formal_count): Removed. (ipa_method_formal_count_set): Removed. (ipa_method_get_tree): Removed. (ipa_method_tree_map_create): Removed. (ipa_method_compute_tree_map): Renamed to ipa_create_param_decls_array (ipa_create_param_decls_array): Creates the array itself (ipa_create_param_decls_array): Temporary variable info instead of a few dereferences. (ipa_method_formal_compute_count): Renamed to ipa_count_formal_params (ipa_method_compute_modify): Renamed to ipa_detect_param_modifications (get_type): Removed. (ipa_jf_get_info_type): Removed. (ipa_node_create): Renamed to ipa_create_node_params (ipa_free): Renamed to ipa_free_all_node_params (ipa_nodes_create): Renamed to ipa_create_all_node_params (ipa_edges_create): Renamed to ipa_create_all_edge_args (ipa_edges_free): Renamed to ipa_free_all_edge_args (ipa_nodes_free): Integrated into ipa_free_all_node_params and removed (ipa_free_all_node_params): Deallocation to jump_functions moved to ipa_free_all_edge_args (ipa_method_tree_print): Renamed to ipa_print_all_tree_maps (ipa_method_modify_print): Renamed to ipa_print_all_params_modified (ipa_create_methodlist_node): Removed. (ipa_methodlist_method): Removed. (ipa_methodlist_method_set): Removed. (ipa_methodlist_next_method): Removed. (ipa_methodlist_next_method_set): Removed. (ipa_method_is_modified): Removed. (ipa_method_modify_create): Removed. (ipa_method_modify_init): Temporary variable info instead of a few dereferences. (ipa_detect_param_modifications): Temporary variable info instead of a few dereferences. (ipa_compute_jump_functions): Temporary variable info instead of a few dereferences. (ipa_method_modify_set): Removed. (ipa_method_tree_map): Renamed to ipa_get_param_decl_index (ipa_get_param_decl_index): Now accepts struct ipa_node_params rather than craph_node as the first parameter. (ipa_method_modify_stmt): Renamed to ipa_check_stmt_modifications (ipa_method_modify_init): Removed. (ipa_compute_jump_functions): Added a temp variable instead of repeatadly dereferencing the cgraph_edge.aux pointer (ipa_callsite_param_set_type): Removed. (ipa_compute_jump_functions): i renamed to index and moved to an inner block (ipa_callsite_param_set_info_type_formal): Removed. (ipa_callsite_param_set_info_type): Removed. (ipa_callsite_param_map_create): Removed. (ipa_callsite_tree): Removed. (ipa_callsite_caller): Removed. (ipa_pop_func_from_list): return_method removed to return_func * ipa-prop.h (enum cvalue_type): Renamed to ipa_lattice_type, prefixed all values with IPA_. Changed all users. (enum jump_func_type): Rnamed UNKNOWN_IPATYPE to IPA_UNKNOWN, CONST_IPATYPE to IPA_CONST, CONST_IPATYPE_REF to IPA_CONST_REF and FORMAL_IPATYPE IPA_PASS_THROUGH. (union parameter_info): Renamed to jump_func_value. (union jump_func_value): Renamed value to constant (struct ipa_jump_func): Renamed info_type to value (struct ipa_node): Renamed to ipa_node_params (struct ipa_node_params): Renamed ipa_arg_num to param_count (struct ipa_node_params): Renamed ipa_param_tree to param_decls (struct ipa_node_params): Renamed ipa_mod to modified_flags (struct ipa_edge): Renamed to ipa_edge_args (struct ipa_edge_args): Renamed ipa_param_num to argument_count (struct ipa_edge_args): Renamed ipa_param_map to jump_functions (struct ipa_methodlist): Renamed to ipa_func_list (struct ipa_func_list): method_p renamed to node, next_method renamed to next (ipa_methodlist_p): Removed, switched all users to struct pointer (IS_VALID_TREE_MAP_INDEX): Renamed to IS_VALID_JUMP_FUNC_INDEX From-SVN: r134818
2008-04-30 12:01:59 +02:00
struct ipa_func_list *wl;
int count;
ipa_check_create_node_params ();
ipa_check_create_edge_args ();
ipa-cp.c (ipcp_init_stage): Calls ipa_set_called_with_variable_arg instead of setting number of formal... 2008-04-30 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_init_stage): Calls ipa_set_called_with_variable_arg instead of setting number of formal parameters to zero. (ipcp_init_stage): Do not set the number of actual parameters to zero either. (ipcp_propagate_stage): Explicitly skipping all calls to nodes which are called with variable number of arguments. (ipcp_insert_stage): Explicitely skipping all nodes which are called with variable number of arguments. (ipcp_callsite_param_print): Skipps callsites to nodes with varaible number of parameters. * ipa-prop.h (struct ipa_node_params): Added flag called_with_var_arguments (ipa_set_param_count): Added. Changed sole setter to use it. (ipa_get_param_count): Added. All readers of param_count converted to use it instead. (ipa_set_called_with_variable_arg): Added. (ipa_is_called_with_var_arguments): Added. (ipa_get_ith_param): Added. All readers of param_decls converted to use it instead. (ipa_set_cs_argument_count): Added, sole writer to argument_count changed to use it. (ipa_get_cs_argument_count): Added, all readers of argument_count changed to cal it. (ipa_get_ith_jump_func): Added. Accessors of jump values changed to use it. * ipa-prop.h (struct ipcp_formal): Renamed to ipcp_lattice (struct ipcp_lattice): Renamed cval_type to type (struct ipa_node_params): ipcp_cval renamed to ipcp_lattices * ipa-cp.c (ipcp_cval_get_cvalue): Changed return value to tree (ipcp_cval_set_cvalue): Changed type of parameter value to tree (ipcp_insert_stage): Changed the type of variable cvalue to tree (ipcp_replace_map_create): Changed the type of parameter cvalue to tree (build_const_val): Changed the type of parameter cvalue to tree (ipcp_propagate_const): Changed the type of parameter cvalue to tree (ipcp_method_cval_set_cvalue_type): Renamed parameter cval_type1 to type * ipa-prop.h (struct ipcp_formal): Replaced cvalue with tree called constant * ipa-prop.c (ipa_methodlist_init): Renamed to ipa_init_func_list (ipa_methodlist_not_empty): Removed, the sole user now checks directly (ipa_add_method): Renamed to ipa_push_func_to_list (ipa_remove_method): Renamed to ipa_pop_func_from_list (ipa_callsite_param_count): Removed. (ipa_callsite_param_count_set): Removed. (ipa_callsite_param): Removed. (ipa_callsite_callee): Removed. (ipa_callsite_compute_param): Renamed to ipa_compute_jump_functions (ipa_callsite_compute_count): Renamed to ipa_count_arguments (ipa_method_formal_count): Removed. (ipa_method_formal_count_set): Removed. (ipa_method_get_tree): Removed. (ipa_method_tree_map_create): Removed. (ipa_method_compute_tree_map): Renamed to ipa_create_param_decls_array (ipa_create_param_decls_array): Creates the array itself (ipa_create_param_decls_array): Temporary variable info instead of a few dereferences. (ipa_method_formal_compute_count): Renamed to ipa_count_formal_params (ipa_method_compute_modify): Renamed to ipa_detect_param_modifications (get_type): Removed. (ipa_jf_get_info_type): Removed. (ipa_node_create): Renamed to ipa_create_node_params (ipa_free): Renamed to ipa_free_all_node_params (ipa_nodes_create): Renamed to ipa_create_all_node_params (ipa_edges_create): Renamed to ipa_create_all_edge_args (ipa_edges_free): Renamed to ipa_free_all_edge_args (ipa_nodes_free): Integrated into ipa_free_all_node_params and removed (ipa_free_all_node_params): Deallocation to jump_functions moved to ipa_free_all_edge_args (ipa_method_tree_print): Renamed to ipa_print_all_tree_maps (ipa_method_modify_print): Renamed to ipa_print_all_params_modified (ipa_create_methodlist_node): Removed. (ipa_methodlist_method): Removed. (ipa_methodlist_method_set): Removed. (ipa_methodlist_next_method): Removed. (ipa_methodlist_next_method_set): Removed. (ipa_method_is_modified): Removed. (ipa_method_modify_create): Removed. (ipa_method_modify_init): Temporary variable info instead of a few dereferences. (ipa_detect_param_modifications): Temporary variable info instead of a few dereferences. (ipa_compute_jump_functions): Temporary variable info instead of a few dereferences. (ipa_method_modify_set): Removed. (ipa_method_tree_map): Renamed to ipa_get_param_decl_index (ipa_get_param_decl_index): Now accepts struct ipa_node_params rather than craph_node as the first parameter. (ipa_method_modify_stmt): Renamed to ipa_check_stmt_modifications (ipa_method_modify_init): Removed. (ipa_compute_jump_functions): Added a temp variable instead of repeatadly dereferencing the cgraph_edge.aux pointer (ipa_callsite_param_set_type): Removed. (ipa_compute_jump_functions): i renamed to index and moved to an inner block (ipa_callsite_param_set_info_type_formal): Removed. (ipa_callsite_param_set_info_type): Removed. (ipa_callsite_param_map_create): Removed. (ipa_callsite_tree): Removed. (ipa_callsite_caller): Removed. (ipa_pop_func_from_list): return_method removed to return_func * ipa-prop.h (enum cvalue_type): Renamed to ipa_lattice_type, prefixed all values with IPA_. Changed all users. (enum jump_func_type): Rnamed UNKNOWN_IPATYPE to IPA_UNKNOWN, CONST_IPATYPE to IPA_CONST, CONST_IPATYPE_REF to IPA_CONST_REF and FORMAL_IPATYPE IPA_PASS_THROUGH. (union parameter_info): Renamed to jump_func_value. (union jump_func_value): Renamed value to constant (struct ipa_jump_func): Renamed info_type to value (struct ipa_node): Renamed to ipa_node_params (struct ipa_node_params): Renamed ipa_arg_num to param_count (struct ipa_node_params): Renamed ipa_param_tree to param_decls (struct ipa_node_params): Renamed ipa_mod to modified_flags (struct ipa_edge): Renamed to ipa_edge_args (struct ipa_edge_args): Renamed ipa_param_num to argument_count (struct ipa_edge_args): Renamed ipa_param_map to jump_functions (struct ipa_methodlist): Renamed to ipa_func_list (struct ipa_func_list): method_p renamed to node, next_method renamed to next (ipa_methodlist_p): Removed, switched all users to struct pointer (IS_VALID_TREE_MAP_INDEX): Renamed to IS_VALID_JUMP_FUNC_INDEX From-SVN: r134818
2008-04-30 12:01:59 +02:00
/* Initialize worklist to contain all functions. */
wl = ipa_init_func_list ();
while (wl)
{
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
struct cgraph_node *node = ipa_pop_func_from_list (&wl);
struct ipa_node_params *info = IPA_NODE_REF (node);
for (cs = node->callees; cs; cs = cs->next_callee)
{
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
struct ipa_node_params *callee_info = IPA_NODE_REF (cs->callee);
struct ipa_edge_args *args = IPA_EDGE_REF (cs);
if (ipa_is_called_with_var_arguments (callee_info))
ipa-cp.c (ipcp_init_stage): Calls ipa_set_called_with_variable_arg instead of setting number of formal... 2008-04-30 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_init_stage): Calls ipa_set_called_with_variable_arg instead of setting number of formal parameters to zero. (ipcp_init_stage): Do not set the number of actual parameters to zero either. (ipcp_propagate_stage): Explicitly skipping all calls to nodes which are called with variable number of arguments. (ipcp_insert_stage): Explicitely skipping all nodes which are called with variable number of arguments. (ipcp_callsite_param_print): Skipps callsites to nodes with varaible number of parameters. * ipa-prop.h (struct ipa_node_params): Added flag called_with_var_arguments (ipa_set_param_count): Added. Changed sole setter to use it. (ipa_get_param_count): Added. All readers of param_count converted to use it instead. (ipa_set_called_with_variable_arg): Added. (ipa_is_called_with_var_arguments): Added. (ipa_get_ith_param): Added. All readers of param_decls converted to use it instead. (ipa_set_cs_argument_count): Added, sole writer to argument_count changed to use it. (ipa_get_cs_argument_count): Added, all readers of argument_count changed to cal it. (ipa_get_ith_jump_func): Added. Accessors of jump values changed to use it. * ipa-prop.h (struct ipcp_formal): Renamed to ipcp_lattice (struct ipcp_lattice): Renamed cval_type to type (struct ipa_node_params): ipcp_cval renamed to ipcp_lattices * ipa-cp.c (ipcp_cval_get_cvalue): Changed return value to tree (ipcp_cval_set_cvalue): Changed type of parameter value to tree (ipcp_insert_stage): Changed the type of variable cvalue to tree (ipcp_replace_map_create): Changed the type of parameter cvalue to tree (build_const_val): Changed the type of parameter cvalue to tree (ipcp_propagate_const): Changed the type of parameter cvalue to tree (ipcp_method_cval_set_cvalue_type): Renamed parameter cval_type1 to type * ipa-prop.h (struct ipcp_formal): Replaced cvalue with tree called constant * ipa-prop.c (ipa_methodlist_init): Renamed to ipa_init_func_list (ipa_methodlist_not_empty): Removed, the sole user now checks directly (ipa_add_method): Renamed to ipa_push_func_to_list (ipa_remove_method): Renamed to ipa_pop_func_from_list (ipa_callsite_param_count): Removed. (ipa_callsite_param_count_set): Removed. (ipa_callsite_param): Removed. (ipa_callsite_callee): Removed. (ipa_callsite_compute_param): Renamed to ipa_compute_jump_functions (ipa_callsite_compute_count): Renamed to ipa_count_arguments (ipa_method_formal_count): Removed. (ipa_method_formal_count_set): Removed. (ipa_method_get_tree): Removed. (ipa_method_tree_map_create): Removed. (ipa_method_compute_tree_map): Renamed to ipa_create_param_decls_array (ipa_create_param_decls_array): Creates the array itself (ipa_create_param_decls_array): Temporary variable info instead of a few dereferences. (ipa_method_formal_compute_count): Renamed to ipa_count_formal_params (ipa_method_compute_modify): Renamed to ipa_detect_param_modifications (get_type): Removed. (ipa_jf_get_info_type): Removed. (ipa_node_create): Renamed to ipa_create_node_params (ipa_free): Renamed to ipa_free_all_node_params (ipa_nodes_create): Renamed to ipa_create_all_node_params (ipa_edges_create): Renamed to ipa_create_all_edge_args (ipa_edges_free): Renamed to ipa_free_all_edge_args (ipa_nodes_free): Integrated into ipa_free_all_node_params and removed (ipa_free_all_node_params): Deallocation to jump_functions moved to ipa_free_all_edge_args (ipa_method_tree_print): Renamed to ipa_print_all_tree_maps (ipa_method_modify_print): Renamed to ipa_print_all_params_modified (ipa_create_methodlist_node): Removed. (ipa_methodlist_method): Removed. (ipa_methodlist_method_set): Removed. (ipa_methodlist_next_method): Removed. (ipa_methodlist_next_method_set): Removed. (ipa_method_is_modified): Removed. (ipa_method_modify_create): Removed. (ipa_method_modify_init): Temporary variable info instead of a few dereferences. (ipa_detect_param_modifications): Temporary variable info instead of a few dereferences. (ipa_compute_jump_functions): Temporary variable info instead of a few dereferences. (ipa_method_modify_set): Removed. (ipa_method_tree_map): Renamed to ipa_get_param_decl_index (ipa_get_param_decl_index): Now accepts struct ipa_node_params rather than craph_node as the first parameter. (ipa_method_modify_stmt): Renamed to ipa_check_stmt_modifications (ipa_method_modify_init): Removed. (ipa_compute_jump_functions): Added a temp variable instead of repeatadly dereferencing the cgraph_edge.aux pointer (ipa_callsite_param_set_type): Removed. (ipa_compute_jump_functions): i renamed to index and moved to an inner block (ipa_callsite_param_set_info_type_formal): Removed. (ipa_callsite_param_set_info_type): Removed. (ipa_callsite_param_map_create): Removed. (ipa_callsite_tree): Removed. (ipa_callsite_caller): Removed. (ipa_pop_func_from_list): return_method removed to return_func * ipa-prop.h (enum cvalue_type): Renamed to ipa_lattice_type, prefixed all values with IPA_. Changed all users. (enum jump_func_type): Rnamed UNKNOWN_IPATYPE to IPA_UNKNOWN, CONST_IPATYPE to IPA_CONST, CONST_IPATYPE_REF to IPA_CONST_REF and FORMAL_IPATYPE IPA_PASS_THROUGH. (union parameter_info): Renamed to jump_func_value. (union jump_func_value): Renamed value to constant (struct ipa_jump_func): Renamed info_type to value (struct ipa_node): Renamed to ipa_node_params (struct ipa_node_params): Renamed ipa_arg_num to param_count (struct ipa_node_params): Renamed ipa_param_tree to param_decls (struct ipa_node_params): Renamed ipa_mod to modified_flags (struct ipa_edge): Renamed to ipa_edge_args (struct ipa_edge_args): Renamed ipa_param_num to argument_count (struct ipa_edge_args): Renamed ipa_param_map to jump_functions (struct ipa_methodlist): Renamed to ipa_func_list (struct ipa_func_list): method_p renamed to node, next_method renamed to next (ipa_methodlist_p): Removed, switched all users to struct pointer (IS_VALID_TREE_MAP_INDEX): Renamed to IS_VALID_JUMP_FUNC_INDEX From-SVN: r134818
2008-04-30 12:01:59 +02:00
continue;
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
count = ipa_get_cs_argument_count (args);
for (i = 0; i < count; i++)
{
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
jump_func = ipa_get_ith_jump_func (args, i);
ipcp_lattice_from_jfunc (info, &inc_lat, jump_func);
dest_lat = ipcp_get_ith_lattice (callee_info, i);
ipa_lattice_meet (&new_lat, &inc_lat, dest_lat);
if (ipcp_lattice_changed (&new_lat, dest_lat))
{
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
dest_lat->type = new_lat.type;
dest_lat->constant = new_lat.constant;
ipa_push_func_to_list (&wl, cs->callee);
}
}
}
}
}
/* Call the constant propagation algorithm and re-call it if necessary
(if there are undetermined values left). */
static void
ipcp_iterate_stage (void)
{
ipcp_propagate_stage ();
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
if (ipcp_change_tops_to_bottom ())
/* Some lattices have changed from IPA_TOP to IPA_BOTTOM.
This change should be propagated. */
ipcp_propagate_stage ();
}
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
/* Check conditions to forbid constant insertion to function described by
NODE. */
static inline bool
ipcp_node_not_modifiable_p (struct cgraph_node *node)
{
/* ??? Handle pending sizes case. */
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
if (DECL_UNINLINABLE (node->decl))
return true;
return false;
}
/* Print count scale data structures. */
static void
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
ipcp_function_scale_print (FILE * f)
{
struct cgraph_node *node;
for (node = cgraph_nodes; node; node = node->next)
{
if (!node->analyzed)
continue;
fprintf (f, "printing scale for %s: ", cgraph_node_name (node));
fprintf (f, "value is " HOST_WIDE_INT_PRINT_DEC
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
" \n", (HOST_WIDE_INT) ipcp_get_node_scale (node));
}
}
/* Print counts of all cgraph nodes. */
static void
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
ipcp_print_func_profile_counts (FILE * f)
{
struct cgraph_node *node;
for (node = cgraph_nodes; node; node = node->next)
{
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
fprintf (f, "function %s: ", cgraph_node_name (node));
fprintf (f, "count is " HOST_WIDE_INT_PRINT_DEC
" \n", (HOST_WIDE_INT) node->count);
}
}
/* Print counts of all cgraph edges. */
static void
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
ipcp_print_call_profile_counts (FILE * f)
{
struct cgraph_node *node;
struct cgraph_edge *cs;
for (node = cgraph_nodes; node; node = node->next)
{
for (cs = node->callees; cs; cs = cs->next_callee)
{
fprintf (f, "%s -> %s ", cgraph_node_name (cs->caller),
cgraph_node_name (cs->callee));
fprintf (f, "count is " HOST_WIDE_INT_PRINT_DEC " \n",
(HOST_WIDE_INT) cs->count);
}
}
}
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
/* Print all counts and probabilities of cfg edges of all functions. */
static void
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
ipcp_print_edge_profiles (FILE * f)
{
struct cgraph_node *node;
basic_block bb;
edge_iterator ei;
edge e;
for (node = cgraph_nodes; node; node = node->next)
{
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
fprintf (f, "function %s: \n", cgraph_node_name (node));
ipa-cp.c (ipcp_print_edge_profiles): Test for node->analyzed rather than for DECL_SAVED_TREE. 2008-07-23 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_print_edge_profiles): Test for node->analyzed rather than for DECL_SAVED_TREE. * ipa-prop.c: Include diagnostic.h. (ipa_check_stmt_modifications): Check LHS of GIMPLE_MODIFY_EXPRs thoroughly. (ipa_detect_param_modifications): Function rewritten from scratch. (ipa_compute_jump_functions): Changed accesses to modification flags. (ipa_free_node_params_substructures): Update flags destruction. (ipa_node_duplication_hook): Update flags duplication. (ipa_print_all_params_modified): Updated flag access. * ipa-prop.h (struct ipa_param_flags): New structure. (struct ipa_node_params): New field modification_analysis_done, modified_flags changed into param_flags. (ipa_is_ith_param_modified): Changed to use new flags. * Makefile.in (ipa-prop.o): Add $(DIAGNOSTIC_H) to dependencies. * ipa-prop.c (ipa_print_all_jump_functions): Moved here from ipa-cp.c and split into two functions. (ipa_print_node_jump_functions): New function. (compute_scalar_jump_functions): New function. (type_like_member_ptr_p): New function. (compute_pass_through_member_ptrs): New function. (fill_member_ptr_cst_jump_function): New function. (determine_cst_member_ptr): New function. (compute_cst_member_ptr_arguments): New function. (ipa_compute_jump_functions): Complete rewrite. * ipa-prop.h (enum jump_func_type): Make explicit that we depend on IPA_UNKNOWN being zero. Added value IPA_CONST_MEMBER_PTR. (struct ipa_member_ptr_cst): New structure. (union jump_func_value): New field member_cst. * ipa-cp.c (ipcp_lat_is_insertable): New function. (ipcp_lattice_from_jfunc): Produces bottom lattices for unhandled jump function types. (ipcp_print_all_lattices): Slight fprintf rearrangement. (ipcp_print_all_structures): Call ipa_print_all_jump_functions instead of ipcp_print_all_jump_functions. (ipcp_insert_stage): Use ipcp_lat_is_insertable, create replace maps only for replacable scalars. * doc/invoke.texi (Optimize options): Add description of -findirect-inlining. * common.opt (flag_indirect_inlining): New flag. * opts.c (decode_options): Set flag_indirect_inlining when optimize >= 3. * ipa-inline.c: Include ipa-prop.h. (inline_indirect_intraprocedural_analysis): New function. (inline_generate_summary): Allocate parameter and argument info structures, call inline_indirect_intraprocedural_analysis on each node when doing indirect inlining and deallocate indirect inlining data structures in the end. * ipa-prop.c (ipa_create_param_decls_array): Return if already done. (free_all_ipa_structures_after_iinln): New function. (free_all_ipa_structures_after_ipa_cp): Checks whether iinln will be done. * Makefile.in (ipa-inline.o): Added $(IPA_PROP_H) to dependencies. * cgraphbuild.c (compute_call_stmt_bb_frequency): New function. (build_cgraph_edges): Call compute_call_stmt_bb_frequency instead of computing the frequency separately. (rebuild_cgraph_edges): Call compute_call_stmt_bb_frequency instead of computing the frequency separately. * ipa-cp.c (ipcp_print_all_structures): Replace a call to ipa_print_all_param_modified with a call to ipa_print_all_param_flags. * ipa-prop.c (ipa_get_member_ptr_load_param): New function. (ipa_get_stmt_member_ptr_load_param): New function. (ipa_is_ssa_with_stmt_def): New function. (ipa_note_param_call): New function. (ipa_analyze_call_uses): New function. (ipa_analyze_stmt_uses): New function. (ipa_analyze_params_uses): New function. (ipa_free_node_params_substructures): Also free the param_calls linked list. (ipa_node_duplication_hook): Also duplicate the param_calls linked list. (ipa_print_node_param_flags): New function. (ipa_print_all_params_modified): Renamed to ipa_print_all_param_flags. (ipa_print_all_param_flags): Calls ipa_print_node_param_flags. * ipa-prop.h (struct ipa_param_flags): New field called. (struct ipa_param_call_note): New structure. (struct ipa_node_params): New fields param_calls and uses_analysis_done. (ipa_is_ith_param_called): New function. * ipa-inline.c (inline_indirect_intraprocedural_analysis): Call ipa_analyze_params_uses and dump parameter flags. * ipa-inline.c (cgraph_decide_recursive_inlining): Call ipa_propagate_indirect_call_infos if performing indirect inlining, pass a new parameter new_edges to it. (add_new_edges_to_heap): New fucntion. (cgraph_decide_inlining_of_small_functions): New vector new_indirect_edges for newly found indirect edges , call ipa_propagate_indirect_call_infos after inlining. (cgraph_decide_inlining): Call ipa_propagate_indirect_call_infos after inlining if performing indirect inlining. Call free_all_ipa_structures_after_iinln when doing so too. (inline_generate_summary): Do not call free_all_ipa_structures_after_iinln here. * ipa-prop.c (update_jump_functions_after_inlining): New function. (print_edge_addition_message): New function. (update_call_notes_after_inlining): New function. (propagate_info_to_inlined_callees): New function. (ipa_propagate_indirect_call_infos): New function. * ipa-prop.h: Include cgraph.h (struct ipa_param_call_note): Fields reordered, new field processed. * cgraph.h (cgraph_edge): Shrink loop_nest field to 31 bits, add a new flag indirect_call. * cgraphunit.c (verify_cgraph_node): Allow indirect edges not to have rediscovered call statements. * cgraph.c (cgraph_create_edge): Initialize indirect_call to zero. (dump_cgraph_node): Dump also the indirect_call flag. (cgraph_clone_edge): Copy also the indirect_call flag. * tree-inline.c (copy_bb): Do not check for fndecls from call expressions, check for edge availability when moving clones. (get_indirect_callee_fndecl): New function. (expand_call_inline): If callee declaration is not apprent from the statement, try calling get_indirect_callee_fndecl. Do not issue warnings or call sorry when not inlinings an indirect edge. * Makefile.in (IPA_PROP_H): Added $(CGRAPH_H) to dependencies. * ipa-prop.c (ipa_print_node_param_flags): Make the dump format a bit more frandly to matching. * testsuite/g++.dg/ipa/iinline-1.C: New testcase. * testsuite/gcc.dg/ipa/iinline-1.c: New testcase. * testsuite/gcc.dg/ipa/modif-1.c: New testcase. From-SVN: r138092
2008-07-23 21:45:45 +02:00
if (node->analyzed)
{
bb =
ENTRY_BLOCK_PTR_FOR_FUNCTION (DECL_STRUCT_FUNCTION (node->decl));
fprintf (f, "ENTRY: ");
fprintf (f, " " HOST_WIDE_INT_PRINT_DEC
" %d\n", (HOST_WIDE_INT) bb->count, bb->frequency);
if (bb->succs)
FOR_EACH_EDGE (e, ei, bb->succs)
{
if (e->dest ==
EXIT_BLOCK_PTR_FOR_FUNCTION (DECL_STRUCT_FUNCTION
(node->decl)))
fprintf (f, "edge ENTRY -> EXIT, Count");
else
fprintf (f, "edge ENTRY -> %d, Count", e->dest->index);
fprintf (f, " " HOST_WIDE_INT_PRINT_DEC
" Prob %d\n", (HOST_WIDE_INT) e->count,
e->probability);
}
FOR_EACH_BB_FN (bb, DECL_STRUCT_FUNCTION (node->decl))
{
fprintf (f, "bb[%d]: ", bb->index);
fprintf (f, " " HOST_WIDE_INT_PRINT_DEC
" %d\n", (HOST_WIDE_INT) bb->count, bb->frequency);
FOR_EACH_EDGE (e, ei, bb->succs)
{
if (e->dest ==
EXIT_BLOCK_PTR_FOR_FUNCTION (DECL_STRUCT_FUNCTION
(node->decl)))
fprintf (f, "edge %d -> EXIT, Count", e->src->index);
else
fprintf (f, "edge %d -> %d, Count", e->src->index,
e->dest->index);
fprintf (f, " " HOST_WIDE_INT_PRINT_DEC " Prob %d\n",
(HOST_WIDE_INT) e->count, e->probability);
}
}
}
}
}
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
/* Print counts and frequencies for all basic blocks of all functions. */
static void
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
ipcp_print_bb_profiles (FILE * f)
{
basic_block bb;
struct cgraph_node *node;
for (node = cgraph_nodes; node; node = node->next)
{
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
fprintf (f, "function %s: \n", cgraph_node_name (node));
if (node->analyzed)
{
bb =
ENTRY_BLOCK_PTR_FOR_FUNCTION (DECL_STRUCT_FUNCTION (node->decl));
fprintf (f, "ENTRY: Count");
fprintf (f, " " HOST_WIDE_INT_PRINT_DEC
" Frequency %d\n", (HOST_WIDE_INT) bb->count,
bb->frequency);
FOR_EACH_BB_FN (bb, DECL_STRUCT_FUNCTION (node->decl))
{
fprintf (f, "bb[%d]: Count", bb->index);
fprintf (f, " " HOST_WIDE_INT_PRINT_DEC
" Frequency %d\n", (HOST_WIDE_INT) bb->count,
bb->frequency);
}
bb =
EXIT_BLOCK_PTR_FOR_FUNCTION (DECL_STRUCT_FUNCTION (node->decl));
fprintf (f, "EXIT: Count");
fprintf (f, " " HOST_WIDE_INT_PRINT_DEC
" Frequency %d\n", (HOST_WIDE_INT) bb->count,
bb->frequency);
}
}
}
/* Print all IPCP data structures to F. */
static void
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
ipcp_print_all_structures (FILE * f)
{
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
ipcp_print_all_lattices (f);
ipcp_function_scale_print (f);
ipa-cp.c (ipcp_init_stage): Calls ipa_set_called_with_variable_arg instead of setting number of formal... 2008-04-30 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_init_stage): Calls ipa_set_called_with_variable_arg instead of setting number of formal parameters to zero. (ipcp_init_stage): Do not set the number of actual parameters to zero either. (ipcp_propagate_stage): Explicitly skipping all calls to nodes which are called with variable number of arguments. (ipcp_insert_stage): Explicitely skipping all nodes which are called with variable number of arguments. (ipcp_callsite_param_print): Skipps callsites to nodes with varaible number of parameters. * ipa-prop.h (struct ipa_node_params): Added flag called_with_var_arguments (ipa_set_param_count): Added. Changed sole setter to use it. (ipa_get_param_count): Added. All readers of param_count converted to use it instead. (ipa_set_called_with_variable_arg): Added. (ipa_is_called_with_var_arguments): Added. (ipa_get_ith_param): Added. All readers of param_decls converted to use it instead. (ipa_set_cs_argument_count): Added, sole writer to argument_count changed to use it. (ipa_get_cs_argument_count): Added, all readers of argument_count changed to cal it. (ipa_get_ith_jump_func): Added. Accessors of jump values changed to use it. * ipa-prop.h (struct ipcp_formal): Renamed to ipcp_lattice (struct ipcp_lattice): Renamed cval_type to type (struct ipa_node_params): ipcp_cval renamed to ipcp_lattices * ipa-cp.c (ipcp_cval_get_cvalue): Changed return value to tree (ipcp_cval_set_cvalue): Changed type of parameter value to tree (ipcp_insert_stage): Changed the type of variable cvalue to tree (ipcp_replace_map_create): Changed the type of parameter cvalue to tree (build_const_val): Changed the type of parameter cvalue to tree (ipcp_propagate_const): Changed the type of parameter cvalue to tree (ipcp_method_cval_set_cvalue_type): Renamed parameter cval_type1 to type * ipa-prop.h (struct ipcp_formal): Replaced cvalue with tree called constant * ipa-prop.c (ipa_methodlist_init): Renamed to ipa_init_func_list (ipa_methodlist_not_empty): Removed, the sole user now checks directly (ipa_add_method): Renamed to ipa_push_func_to_list (ipa_remove_method): Renamed to ipa_pop_func_from_list (ipa_callsite_param_count): Removed. (ipa_callsite_param_count_set): Removed. (ipa_callsite_param): Removed. (ipa_callsite_callee): Removed. (ipa_callsite_compute_param): Renamed to ipa_compute_jump_functions (ipa_callsite_compute_count): Renamed to ipa_count_arguments (ipa_method_formal_count): Removed. (ipa_method_formal_count_set): Removed. (ipa_method_get_tree): Removed. (ipa_method_tree_map_create): Removed. (ipa_method_compute_tree_map): Renamed to ipa_create_param_decls_array (ipa_create_param_decls_array): Creates the array itself (ipa_create_param_decls_array): Temporary variable info instead of a few dereferences. (ipa_method_formal_compute_count): Renamed to ipa_count_formal_params (ipa_method_compute_modify): Renamed to ipa_detect_param_modifications (get_type): Removed. (ipa_jf_get_info_type): Removed. (ipa_node_create): Renamed to ipa_create_node_params (ipa_free): Renamed to ipa_free_all_node_params (ipa_nodes_create): Renamed to ipa_create_all_node_params (ipa_edges_create): Renamed to ipa_create_all_edge_args (ipa_edges_free): Renamed to ipa_free_all_edge_args (ipa_nodes_free): Integrated into ipa_free_all_node_params and removed (ipa_free_all_node_params): Deallocation to jump_functions moved to ipa_free_all_edge_args (ipa_method_tree_print): Renamed to ipa_print_all_tree_maps (ipa_method_modify_print): Renamed to ipa_print_all_params_modified (ipa_create_methodlist_node): Removed. (ipa_methodlist_method): Removed. (ipa_methodlist_method_set): Removed. (ipa_methodlist_next_method): Removed. (ipa_methodlist_next_method_set): Removed. (ipa_method_is_modified): Removed. (ipa_method_modify_create): Removed. (ipa_method_modify_init): Temporary variable info instead of a few dereferences. (ipa_detect_param_modifications): Temporary variable info instead of a few dereferences. (ipa_compute_jump_functions): Temporary variable info instead of a few dereferences. (ipa_method_modify_set): Removed. (ipa_method_tree_map): Renamed to ipa_get_param_decl_index (ipa_get_param_decl_index): Now accepts struct ipa_node_params rather than craph_node as the first parameter. (ipa_method_modify_stmt): Renamed to ipa_check_stmt_modifications (ipa_method_modify_init): Removed. (ipa_compute_jump_functions): Added a temp variable instead of repeatadly dereferencing the cgraph_edge.aux pointer (ipa_callsite_param_set_type): Removed. (ipa_compute_jump_functions): i renamed to index and moved to an inner block (ipa_callsite_param_set_info_type_formal): Removed. (ipa_callsite_param_set_info_type): Removed. (ipa_callsite_param_map_create): Removed. (ipa_callsite_tree): Removed. (ipa_callsite_caller): Removed. (ipa_pop_func_from_list): return_method removed to return_func * ipa-prop.h (enum cvalue_type): Renamed to ipa_lattice_type, prefixed all values with IPA_. Changed all users. (enum jump_func_type): Rnamed UNKNOWN_IPATYPE to IPA_UNKNOWN, CONST_IPATYPE to IPA_CONST, CONST_IPATYPE_REF to IPA_CONST_REF and FORMAL_IPATYPE IPA_PASS_THROUGH. (union parameter_info): Renamed to jump_func_value. (union jump_func_value): Renamed value to constant (struct ipa_jump_func): Renamed info_type to value (struct ipa_node): Renamed to ipa_node_params (struct ipa_node_params): Renamed ipa_arg_num to param_count (struct ipa_node_params): Renamed ipa_param_tree to param_decls (struct ipa_node_params): Renamed ipa_mod to modified_flags (struct ipa_edge): Renamed to ipa_edge_args (struct ipa_edge_args): Renamed ipa_param_num to argument_count (struct ipa_edge_args): Renamed ipa_param_map to jump_functions (struct ipa_methodlist): Renamed to ipa_func_list (struct ipa_func_list): method_p renamed to node, next_method renamed to next (ipa_methodlist_p): Removed, switched all users to struct pointer (IS_VALID_TREE_MAP_INDEX): Renamed to IS_VALID_JUMP_FUNC_INDEX From-SVN: r134818
2008-04-30 12:01:59 +02:00
ipa_print_all_tree_maps (f);
ipa-cp.c (ipcp_print_edge_profiles): Test for node->analyzed rather than for DECL_SAVED_TREE. 2008-07-23 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_print_edge_profiles): Test for node->analyzed rather than for DECL_SAVED_TREE. * ipa-prop.c: Include diagnostic.h. (ipa_check_stmt_modifications): Check LHS of GIMPLE_MODIFY_EXPRs thoroughly. (ipa_detect_param_modifications): Function rewritten from scratch. (ipa_compute_jump_functions): Changed accesses to modification flags. (ipa_free_node_params_substructures): Update flags destruction. (ipa_node_duplication_hook): Update flags duplication. (ipa_print_all_params_modified): Updated flag access. * ipa-prop.h (struct ipa_param_flags): New structure. (struct ipa_node_params): New field modification_analysis_done, modified_flags changed into param_flags. (ipa_is_ith_param_modified): Changed to use new flags. * Makefile.in (ipa-prop.o): Add $(DIAGNOSTIC_H) to dependencies. * ipa-prop.c (ipa_print_all_jump_functions): Moved here from ipa-cp.c and split into two functions. (ipa_print_node_jump_functions): New function. (compute_scalar_jump_functions): New function. (type_like_member_ptr_p): New function. (compute_pass_through_member_ptrs): New function. (fill_member_ptr_cst_jump_function): New function. (determine_cst_member_ptr): New function. (compute_cst_member_ptr_arguments): New function. (ipa_compute_jump_functions): Complete rewrite. * ipa-prop.h (enum jump_func_type): Make explicit that we depend on IPA_UNKNOWN being zero. Added value IPA_CONST_MEMBER_PTR. (struct ipa_member_ptr_cst): New structure. (union jump_func_value): New field member_cst. * ipa-cp.c (ipcp_lat_is_insertable): New function. (ipcp_lattice_from_jfunc): Produces bottom lattices for unhandled jump function types. (ipcp_print_all_lattices): Slight fprintf rearrangement. (ipcp_print_all_structures): Call ipa_print_all_jump_functions instead of ipcp_print_all_jump_functions. (ipcp_insert_stage): Use ipcp_lat_is_insertable, create replace maps only for replacable scalars. * doc/invoke.texi (Optimize options): Add description of -findirect-inlining. * common.opt (flag_indirect_inlining): New flag. * opts.c (decode_options): Set flag_indirect_inlining when optimize >= 3. * ipa-inline.c: Include ipa-prop.h. (inline_indirect_intraprocedural_analysis): New function. (inline_generate_summary): Allocate parameter and argument info structures, call inline_indirect_intraprocedural_analysis on each node when doing indirect inlining and deallocate indirect inlining data structures in the end. * ipa-prop.c (ipa_create_param_decls_array): Return if already done. (free_all_ipa_structures_after_iinln): New function. (free_all_ipa_structures_after_ipa_cp): Checks whether iinln will be done. * Makefile.in (ipa-inline.o): Added $(IPA_PROP_H) to dependencies. * cgraphbuild.c (compute_call_stmt_bb_frequency): New function. (build_cgraph_edges): Call compute_call_stmt_bb_frequency instead of computing the frequency separately. (rebuild_cgraph_edges): Call compute_call_stmt_bb_frequency instead of computing the frequency separately. * ipa-cp.c (ipcp_print_all_structures): Replace a call to ipa_print_all_param_modified with a call to ipa_print_all_param_flags. * ipa-prop.c (ipa_get_member_ptr_load_param): New function. (ipa_get_stmt_member_ptr_load_param): New function. (ipa_is_ssa_with_stmt_def): New function. (ipa_note_param_call): New function. (ipa_analyze_call_uses): New function. (ipa_analyze_stmt_uses): New function. (ipa_analyze_params_uses): New function. (ipa_free_node_params_substructures): Also free the param_calls linked list. (ipa_node_duplication_hook): Also duplicate the param_calls linked list. (ipa_print_node_param_flags): New function. (ipa_print_all_params_modified): Renamed to ipa_print_all_param_flags. (ipa_print_all_param_flags): Calls ipa_print_node_param_flags. * ipa-prop.h (struct ipa_param_flags): New field called. (struct ipa_param_call_note): New structure. (struct ipa_node_params): New fields param_calls and uses_analysis_done. (ipa_is_ith_param_called): New function. * ipa-inline.c (inline_indirect_intraprocedural_analysis): Call ipa_analyze_params_uses and dump parameter flags. * ipa-inline.c (cgraph_decide_recursive_inlining): Call ipa_propagate_indirect_call_infos if performing indirect inlining, pass a new parameter new_edges to it. (add_new_edges_to_heap): New fucntion. (cgraph_decide_inlining_of_small_functions): New vector new_indirect_edges for newly found indirect edges , call ipa_propagate_indirect_call_infos after inlining. (cgraph_decide_inlining): Call ipa_propagate_indirect_call_infos after inlining if performing indirect inlining. Call free_all_ipa_structures_after_iinln when doing so too. (inline_generate_summary): Do not call free_all_ipa_structures_after_iinln here. * ipa-prop.c (update_jump_functions_after_inlining): New function. (print_edge_addition_message): New function. (update_call_notes_after_inlining): New function. (propagate_info_to_inlined_callees): New function. (ipa_propagate_indirect_call_infos): New function. * ipa-prop.h: Include cgraph.h (struct ipa_param_call_note): Fields reordered, new field processed. * cgraph.h (cgraph_edge): Shrink loop_nest field to 31 bits, add a new flag indirect_call. * cgraphunit.c (verify_cgraph_node): Allow indirect edges not to have rediscovered call statements. * cgraph.c (cgraph_create_edge): Initialize indirect_call to zero. (dump_cgraph_node): Dump also the indirect_call flag. (cgraph_clone_edge): Copy also the indirect_call flag. * tree-inline.c (copy_bb): Do not check for fndecls from call expressions, check for edge availability when moving clones. (get_indirect_callee_fndecl): New function. (expand_call_inline): If callee declaration is not apprent from the statement, try calling get_indirect_callee_fndecl. Do not issue warnings or call sorry when not inlinings an indirect edge. * Makefile.in (IPA_PROP_H): Added $(CGRAPH_H) to dependencies. * ipa-prop.c (ipa_print_node_param_flags): Make the dump format a bit more frandly to matching. * testsuite/g++.dg/ipa/iinline-1.C: New testcase. * testsuite/gcc.dg/ipa/iinline-1.c: New testcase. * testsuite/gcc.dg/ipa/modif-1.c: New testcase. From-SVN: r138092
2008-07-23 21:45:45 +02:00
ipa_print_all_param_flags (f);
ipa_print_all_jump_functions (f);
}
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
/* Print profile info for all functions. */
static void
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
ipcp_print_profile_data (FILE * f)
{
fprintf (f, "\nNODE COUNTS :\n");
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
ipcp_print_func_profile_counts (f);
fprintf (f, "\nCS COUNTS stage:\n");
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
ipcp_print_call_profile_counts (f);
fprintf (f, "\nBB COUNTS and FREQUENCIES :\n");
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
ipcp_print_bb_profiles (f);
fprintf (f, "\nCFG EDGES COUNTS and PROBABILITIES :\n");
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
ipcp_print_edge_profiles (f);
}
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
/* Build and initialize ipa_replace_map struct according to LAT. This struct is
processed by versioning, which operates according to the flags set.
PARM_TREE is the formal parameter found to be constant. LAT represents the
constant. */
static struct ipa_replace_map *
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
ipcp_create_replace_map (struct function *func, tree parm_tree,
struct ipcp_lattice *lat)
{
struct ipa_replace_map *replace_map;
tree const_val;
tree-vrp.c: Use XNEW/XCNEW allocation wrappers. 2006-01-31 Marcin Dalecki <martin@dalecki.de> * tree-vrp.c: Use XNEW/XCNEW allocation wrappers. * regrename.c: Ditto. * tree-ssa-loop-im.c: Ditto. * tree-dump.c: Ditto. * tree-complex.c: Ditto. * genrecog.c: Ditto. * tree-ssa-threadupdate.c: Ditto. * tracer.c: Ditto. * java/class.c: Ditto. * java/jcf-parse.c: Ditto. * java/resource.c: Ditto. * java/except.c: Ditto. * java/jvspec.c: Ditto. * java/jcf-write.c: Ditto. * java/jcf-path.c: Ditto. * java/gjavah.c: Ditto. * java/zextract.c: Ditto. * java/jcf-io.c: Ditto. * java/jcf.h: Ditto. * java/buffer.c: Ditto. * java/lang.c: Ditto. * java/parse-scan.y: Ditto. * java/lex.c: Ditto. * java/lex.h: Ditto. * cfgloopmanip.c: Ditto. * postreload-gcse.c: Ditto. * tree-ssa-loop-manip.c: Ditto. * postreload.c: Ditto. * tree-ssa-loop-ch.c: Ditto. * loop.c: Ditto. * ipa-cp.c: Ditto. * cppspec.c: Ditto. * diagnostic.c: Ditto. * final.c: Ditto. * genoutput.c: Ditto. * gcc.c: Ditto. * cfghooks.c: Ditto. * cfgloopanal.c: Ditto. * objc/objc-act.c: Ditto. * gcov.c: Ditto. * genextract.c: Ditto. * genautomata.c: Ditto. * pretty-print.c: Ditto. * genemit.c: Ditto. * cgraphunit.c: Ditto. * flow.c: Ditto. * df-scan.c: Ditto. * haifa-sched.c: Ditto. * dominance.c: Ditto. * dbxout.c: Ditto. * tree-ssa-loop-ivopts.c: Ditto. * df-core.c: Ditto. * mode-switching.c: Ditto. * modulo-sched.c: Ditto. * graph.c: Ditto. * ipa-pure-const.c: Ditto. * cse.c: Ditto. * fix-header.c: Ditto. * web.c: Ditto. * tree-stdarg.c: Ditto. * ipa-utils.c: Ditto. * loop-init.c: Ditto. * ipa-inline.c: Ditto. * cfganal.c: Ditto. * global.c: Ditto. * alloc-pool.c: Ditto. * dwarf2out.c: Ditto. * opts.c: Ditto. * genattrtab.c: Ditto. * tree-ssa-loop-ivcanon.c: Ditto. * predict.c: Ditto. * timevar.c: Ditto. * lcm.c: Ditto. * fortran/gfortranspec.c: Ditto. * regmove.c: Ditto. * local-alloc.c: Ditto. * langhooks.c: Ditto. * function.c: Ditto. * tree-vectorizer.c: Ditto. * gcse.c: Ditto. * ipa-type-escape.c: Ditto. * alias.c: Ditto. * tree-if-conv.c: Ditto. * profile.c: Ditto. * ipa.c: Ditto. * tree-data-ref.c: Ditto. * loop-unroll.c: Ditto. * treelang/treetree.c: Ditto. * calls.c: Ditto. * bt-load.c: Ditto. * ggc-common.c: Ditto. * except.c: Ditto. * coverage.c: Ditto. * cselib.c: Ditto. * tree-cfgcleanup.c: Ditto. * tree-ssa-pre.c: Ditto. * cfgcleanup.c: Ditto. * loop-invariant.c: Ditto. * loop-iv.c: Ditto. * ipa-prop.c: Ditto. * print-tree.c: Ditto. * conflict.c: Ditto. * ggc-page.c: Ditto. * sched-deps.c: Ditto. * regclass.c: Ditto. * tree-object-size.c: Ditto. * combine.c: Ditto. * bb-reorder.c: Ditto. * resource.c: Ditto. * var-tracking.c: Ditto. * cfgloop.c: Ditto. * df-problems.c: Ditto. * reg-stack.c: Ditto. * tlink.c: Ditto. * gccspec.c: Ditto. * sched-rgn.c: Ditto. * tree-ssa-structalias.c: Ditto. * tree-ssa-reassoc.c: Ditto. * config/darwin-c.c: Ditto. * config/darwin.c: Ditto. * config/arm/arm.c: Ditto. * cfgrtl.c: Ditto. * collect2.c: Ditto. * reload1.c: Ditto. From-SVN: r110446
2006-01-31 20:56:55 +01:00
replace_map = XCNEW (struct ipa_replace_map);
ipa-cp.c (ipcp_print_edge_profiles): Test for node->analyzed rather than for DECL_SAVED_TREE. 2008-07-23 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_print_edge_profiles): Test for node->analyzed rather than for DECL_SAVED_TREE. * ipa-prop.c: Include diagnostic.h. (ipa_check_stmt_modifications): Check LHS of GIMPLE_MODIFY_EXPRs thoroughly. (ipa_detect_param_modifications): Function rewritten from scratch. (ipa_compute_jump_functions): Changed accesses to modification flags. (ipa_free_node_params_substructures): Update flags destruction. (ipa_node_duplication_hook): Update flags duplication. (ipa_print_all_params_modified): Updated flag access. * ipa-prop.h (struct ipa_param_flags): New structure. (struct ipa_node_params): New field modification_analysis_done, modified_flags changed into param_flags. (ipa_is_ith_param_modified): Changed to use new flags. * Makefile.in (ipa-prop.o): Add $(DIAGNOSTIC_H) to dependencies. * ipa-prop.c (ipa_print_all_jump_functions): Moved here from ipa-cp.c and split into two functions. (ipa_print_node_jump_functions): New function. (compute_scalar_jump_functions): New function. (type_like_member_ptr_p): New function. (compute_pass_through_member_ptrs): New function. (fill_member_ptr_cst_jump_function): New function. (determine_cst_member_ptr): New function. (compute_cst_member_ptr_arguments): New function. (ipa_compute_jump_functions): Complete rewrite. * ipa-prop.h (enum jump_func_type): Make explicit that we depend on IPA_UNKNOWN being zero. Added value IPA_CONST_MEMBER_PTR. (struct ipa_member_ptr_cst): New structure. (union jump_func_value): New field member_cst. * ipa-cp.c (ipcp_lat_is_insertable): New function. (ipcp_lattice_from_jfunc): Produces bottom lattices for unhandled jump function types. (ipcp_print_all_lattices): Slight fprintf rearrangement. (ipcp_print_all_structures): Call ipa_print_all_jump_functions instead of ipcp_print_all_jump_functions. (ipcp_insert_stage): Use ipcp_lat_is_insertable, create replace maps only for replacable scalars. * doc/invoke.texi (Optimize options): Add description of -findirect-inlining. * common.opt (flag_indirect_inlining): New flag. * opts.c (decode_options): Set flag_indirect_inlining when optimize >= 3. * ipa-inline.c: Include ipa-prop.h. (inline_indirect_intraprocedural_analysis): New function. (inline_generate_summary): Allocate parameter and argument info structures, call inline_indirect_intraprocedural_analysis on each node when doing indirect inlining and deallocate indirect inlining data structures in the end. * ipa-prop.c (ipa_create_param_decls_array): Return if already done. (free_all_ipa_structures_after_iinln): New function. (free_all_ipa_structures_after_ipa_cp): Checks whether iinln will be done. * Makefile.in (ipa-inline.o): Added $(IPA_PROP_H) to dependencies. * cgraphbuild.c (compute_call_stmt_bb_frequency): New function. (build_cgraph_edges): Call compute_call_stmt_bb_frequency instead of computing the frequency separately. (rebuild_cgraph_edges): Call compute_call_stmt_bb_frequency instead of computing the frequency separately. * ipa-cp.c (ipcp_print_all_structures): Replace a call to ipa_print_all_param_modified with a call to ipa_print_all_param_flags. * ipa-prop.c (ipa_get_member_ptr_load_param): New function. (ipa_get_stmt_member_ptr_load_param): New function. (ipa_is_ssa_with_stmt_def): New function. (ipa_note_param_call): New function. (ipa_analyze_call_uses): New function. (ipa_analyze_stmt_uses): New function. (ipa_analyze_params_uses): New function. (ipa_free_node_params_substructures): Also free the param_calls linked list. (ipa_node_duplication_hook): Also duplicate the param_calls linked list. (ipa_print_node_param_flags): New function. (ipa_print_all_params_modified): Renamed to ipa_print_all_param_flags. (ipa_print_all_param_flags): Calls ipa_print_node_param_flags. * ipa-prop.h (struct ipa_param_flags): New field called. (struct ipa_param_call_note): New structure. (struct ipa_node_params): New fields param_calls and uses_analysis_done. (ipa_is_ith_param_called): New function. * ipa-inline.c (inline_indirect_intraprocedural_analysis): Call ipa_analyze_params_uses and dump parameter flags. * ipa-inline.c (cgraph_decide_recursive_inlining): Call ipa_propagate_indirect_call_infos if performing indirect inlining, pass a new parameter new_edges to it. (add_new_edges_to_heap): New fucntion. (cgraph_decide_inlining_of_small_functions): New vector new_indirect_edges for newly found indirect edges , call ipa_propagate_indirect_call_infos after inlining. (cgraph_decide_inlining): Call ipa_propagate_indirect_call_infos after inlining if performing indirect inlining. Call free_all_ipa_structures_after_iinln when doing so too. (inline_generate_summary): Do not call free_all_ipa_structures_after_iinln here. * ipa-prop.c (update_jump_functions_after_inlining): New function. (print_edge_addition_message): New function. (update_call_notes_after_inlining): New function. (propagate_info_to_inlined_callees): New function. (ipa_propagate_indirect_call_infos): New function. * ipa-prop.h: Include cgraph.h (struct ipa_param_call_note): Fields reordered, new field processed. * cgraph.h (cgraph_edge): Shrink loop_nest field to 31 bits, add a new flag indirect_call. * cgraphunit.c (verify_cgraph_node): Allow indirect edges not to have rediscovered call statements. * cgraph.c (cgraph_create_edge): Initialize indirect_call to zero. (dump_cgraph_node): Dump also the indirect_call flag. (cgraph_clone_edge): Copy also the indirect_call flag. * tree-inline.c (copy_bb): Do not check for fndecls from call expressions, check for edge availability when moving clones. (get_indirect_callee_fndecl): New function. (expand_call_inline): If callee declaration is not apprent from the statement, try calling get_indirect_callee_fndecl. Do not issue warnings or call sorry when not inlinings an indirect edge. * Makefile.in (IPA_PROP_H): Added $(CGRAPH_H) to dependencies. * ipa-prop.c (ipa_print_node_param_flags): Make the dump format a bit more frandly to matching. * testsuite/g++.dg/ipa/iinline-1.C: New testcase. * testsuite/gcc.dg/ipa/iinline-1.c: New testcase. * testsuite/gcc.dg/ipa/modif-1.c: New testcase. From-SVN: r138092
2008-07-23 21:45:45 +02:00
if (is_gimple_reg (parm_tree) && gimple_default_def (func, parm_tree)
&& !SSA_NAME_OCCURS_IN_ABNORMAL_PHI (gimple_default_def (func,
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
parm_tree)))
{
if (dump_file)
fprintf (dump_file, "replacing param with const\n");
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
const_val = build_const_val (lat, TREE_TYPE (parm_tree));
replace_map->old_tree =gimple_default_def (func, parm_tree);
replace_map->new_tree = const_val;
replace_map->replace_p = true;
replace_map->ref_p = false;
}
else
{
replace_map->old_tree = NULL;
replace_map->new_tree = NULL;
replace_map->replace_p = false;
replace_map->ref_p = false;
}
return replace_map;
}
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
/* Return true if this callsite should be redirected to the original callee
(instead of the cloned one). */
static bool
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
ipcp_need_redirect_p (struct cgraph_edge *cs)
{
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
struct ipa_node_params *orig_callee_info;
int i, count;
struct ipa_jump_func *jump_func;
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
orig_callee_info = IPA_NODE_REF (ipcp_get_orig_node (cs->callee));
count = ipa_get_param_count (orig_callee_info);
for (i = 0; i < count; i++)
{
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
struct ipcp_lattice *lat = ipcp_get_ith_lattice (orig_callee_info, i);
if (ipcp_lat_is_const (lat))
{
ipa-cp.c (ipcp_init_stage): Calls ipa_set_called_with_variable_arg instead of setting number of formal... 2008-04-30 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_init_stage): Calls ipa_set_called_with_variable_arg instead of setting number of formal parameters to zero. (ipcp_init_stage): Do not set the number of actual parameters to zero either. (ipcp_propagate_stage): Explicitly skipping all calls to nodes which are called with variable number of arguments. (ipcp_insert_stage): Explicitely skipping all nodes which are called with variable number of arguments. (ipcp_callsite_param_print): Skipps callsites to nodes with varaible number of parameters. * ipa-prop.h (struct ipa_node_params): Added flag called_with_var_arguments (ipa_set_param_count): Added. Changed sole setter to use it. (ipa_get_param_count): Added. All readers of param_count converted to use it instead. (ipa_set_called_with_variable_arg): Added. (ipa_is_called_with_var_arguments): Added. (ipa_get_ith_param): Added. All readers of param_decls converted to use it instead. (ipa_set_cs_argument_count): Added, sole writer to argument_count changed to use it. (ipa_get_cs_argument_count): Added, all readers of argument_count changed to cal it. (ipa_get_ith_jump_func): Added. Accessors of jump values changed to use it. * ipa-prop.h (struct ipcp_formal): Renamed to ipcp_lattice (struct ipcp_lattice): Renamed cval_type to type (struct ipa_node_params): ipcp_cval renamed to ipcp_lattices * ipa-cp.c (ipcp_cval_get_cvalue): Changed return value to tree (ipcp_cval_set_cvalue): Changed type of parameter value to tree (ipcp_insert_stage): Changed the type of variable cvalue to tree (ipcp_replace_map_create): Changed the type of parameter cvalue to tree (build_const_val): Changed the type of parameter cvalue to tree (ipcp_propagate_const): Changed the type of parameter cvalue to tree (ipcp_method_cval_set_cvalue_type): Renamed parameter cval_type1 to type * ipa-prop.h (struct ipcp_formal): Replaced cvalue with tree called constant * ipa-prop.c (ipa_methodlist_init): Renamed to ipa_init_func_list (ipa_methodlist_not_empty): Removed, the sole user now checks directly (ipa_add_method): Renamed to ipa_push_func_to_list (ipa_remove_method): Renamed to ipa_pop_func_from_list (ipa_callsite_param_count): Removed. (ipa_callsite_param_count_set): Removed. (ipa_callsite_param): Removed. (ipa_callsite_callee): Removed. (ipa_callsite_compute_param): Renamed to ipa_compute_jump_functions (ipa_callsite_compute_count): Renamed to ipa_count_arguments (ipa_method_formal_count): Removed. (ipa_method_formal_count_set): Removed. (ipa_method_get_tree): Removed. (ipa_method_tree_map_create): Removed. (ipa_method_compute_tree_map): Renamed to ipa_create_param_decls_array (ipa_create_param_decls_array): Creates the array itself (ipa_create_param_decls_array): Temporary variable info instead of a few dereferences. (ipa_method_formal_compute_count): Renamed to ipa_count_formal_params (ipa_method_compute_modify): Renamed to ipa_detect_param_modifications (get_type): Removed. (ipa_jf_get_info_type): Removed. (ipa_node_create): Renamed to ipa_create_node_params (ipa_free): Renamed to ipa_free_all_node_params (ipa_nodes_create): Renamed to ipa_create_all_node_params (ipa_edges_create): Renamed to ipa_create_all_edge_args (ipa_edges_free): Renamed to ipa_free_all_edge_args (ipa_nodes_free): Integrated into ipa_free_all_node_params and removed (ipa_free_all_node_params): Deallocation to jump_functions moved to ipa_free_all_edge_args (ipa_method_tree_print): Renamed to ipa_print_all_tree_maps (ipa_method_modify_print): Renamed to ipa_print_all_params_modified (ipa_create_methodlist_node): Removed. (ipa_methodlist_method): Removed. (ipa_methodlist_method_set): Removed. (ipa_methodlist_next_method): Removed. (ipa_methodlist_next_method_set): Removed. (ipa_method_is_modified): Removed. (ipa_method_modify_create): Removed. (ipa_method_modify_init): Temporary variable info instead of a few dereferences. (ipa_detect_param_modifications): Temporary variable info instead of a few dereferences. (ipa_compute_jump_functions): Temporary variable info instead of a few dereferences. (ipa_method_modify_set): Removed. (ipa_method_tree_map): Renamed to ipa_get_param_decl_index (ipa_get_param_decl_index): Now accepts struct ipa_node_params rather than craph_node as the first parameter. (ipa_method_modify_stmt): Renamed to ipa_check_stmt_modifications (ipa_method_modify_init): Removed. (ipa_compute_jump_functions): Added a temp variable instead of repeatadly dereferencing the cgraph_edge.aux pointer (ipa_callsite_param_set_type): Removed. (ipa_compute_jump_functions): i renamed to index and moved to an inner block (ipa_callsite_param_set_info_type_formal): Removed. (ipa_callsite_param_set_info_type): Removed. (ipa_callsite_param_map_create): Removed. (ipa_callsite_tree): Removed. (ipa_callsite_caller): Removed. (ipa_pop_func_from_list): return_method removed to return_func * ipa-prop.h (enum cvalue_type): Renamed to ipa_lattice_type, prefixed all values with IPA_. Changed all users. (enum jump_func_type): Rnamed UNKNOWN_IPATYPE to IPA_UNKNOWN, CONST_IPATYPE to IPA_CONST, CONST_IPATYPE_REF to IPA_CONST_REF and FORMAL_IPATYPE IPA_PASS_THROUGH. (union parameter_info): Renamed to jump_func_value. (union jump_func_value): Renamed value to constant (struct ipa_jump_func): Renamed info_type to value (struct ipa_node): Renamed to ipa_node_params (struct ipa_node_params): Renamed ipa_arg_num to param_count (struct ipa_node_params): Renamed ipa_param_tree to param_decls (struct ipa_node_params): Renamed ipa_mod to modified_flags (struct ipa_edge): Renamed to ipa_edge_args (struct ipa_edge_args): Renamed ipa_param_num to argument_count (struct ipa_edge_args): Renamed ipa_param_map to jump_functions (struct ipa_methodlist): Renamed to ipa_func_list (struct ipa_func_list): method_p renamed to node, next_method renamed to next (ipa_methodlist_p): Removed, switched all users to struct pointer (IS_VALID_TREE_MAP_INDEX): Renamed to IS_VALID_JUMP_FUNC_INDEX From-SVN: r134818
2008-04-30 12:01:59 +02:00
jump_func = ipa_get_ith_jump_func (IPA_EDGE_REF (cs), i);
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
if (!ipcp_lat_is_const (lat))
return true;
}
}
return false;
}
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
/* Fix the callsites and the call graph after function cloning was done. */
static void
ipcp_update_callgraph (void)
{
struct cgraph_node *node, *orig_callee;
struct cgraph_edge *cs;
for (node = cgraph_nodes; node; node = node->next)
{
/* want to fix only original nodes */
if (!node->analyzed || ipcp_node_is_clone (node))
continue;
for (cs = node->callees; cs; cs = cs->next_callee)
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
if (ipcp_node_is_clone (cs->callee))
{
/* Callee is a cloned node */
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
orig_callee = ipcp_get_orig_node (cs->callee);
if (ipcp_need_redirect_p (cs))
{
cgraph_redirect_edge_callee (cs, orig_callee);
gimple_call_set_fndecl (cs->call_stmt, orig_callee->decl);
}
}
}
}
/* Update all cfg basic blocks in NODE according to SCALE. */
static void
ipcp_update_bb_counts (struct cgraph_node *node, gcov_type scale)
{
basic_block bb;
FOR_ALL_BB_FN (bb, DECL_STRUCT_FUNCTION (node->decl))
bb->count = bb->count * scale / REG_BR_PROB_BASE;
}
/* Update all cfg edges in NODE according to SCALE. */
static void
ipcp_update_edges_counts (struct cgraph_node *node, gcov_type scale)
{
basic_block bb;
edge_iterator ei;
edge e;
FOR_ALL_BB_FN (bb, DECL_STRUCT_FUNCTION (node->decl))
FOR_EACH_EDGE (e, ei, bb->succs)
e->count = e->count * scale / REG_BR_PROB_BASE;
}
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
/* Update profiling info for versioned functions and the functions they were
versioned from. */
static void
ipcp_update_profiling (void)
{
struct cgraph_node *node, *orig_node;
gcov_type scale, scale_complement;
struct cgraph_edge *cs;
for (node = cgraph_nodes; node; node = node->next)
{
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
if (ipcp_node_is_clone (node))
{
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
orig_node = ipcp_get_orig_node (node);
scale = ipcp_get_node_scale (orig_node);
node->count = orig_node->count * scale / REG_BR_PROB_BASE;
scale_complement = REG_BR_PROB_BASE - scale;
orig_node->count =
orig_node->count * scale_complement / REG_BR_PROB_BASE;
for (cs = node->callees; cs; cs = cs->next_callee)
cs->count = cs->count * scale / REG_BR_PROB_BASE;
for (cs = orig_node->callees; cs; cs = cs->next_callee)
cs->count = cs->count * scale_complement / REG_BR_PROB_BASE;
ipcp_update_bb_counts (node, scale);
ipcp_update_bb_counts (orig_node, scale_complement);
ipcp_update_edges_counts (node, scale);
ipcp_update_edges_counts (orig_node, scale_complement);
}
}
}
/* Propagate the constant parameters found by ipcp_iterate_stage()
to the function's code. */
static void
ipcp_insert_stage (void)
{
struct cgraph_node *node, *node1 = NULL;
int i, const_param;
VEC (cgraph_edge_p, heap) * redirect_callers;
varray_type replace_trees;
struct cgraph_edge *cs;
int node_callers, count;
tree parm_tree;
struct ipa_replace_map *replace_param;
ipa_check_create_node_params ();
ipa_check_create_edge_args ();
for (node = cgraph_nodes; node; node = node->next)
{
struct ipa_node_params *info;
/* Propagation of the constant is forbidden in certain conditions. */
if (!node->analyzed || ipcp_node_not_modifiable_p (node))
continue;
info = IPA_NODE_REF (node);
if (ipa_is_called_with_var_arguments (info))
continue;
const_param = 0;
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
count = ipa_get_param_count (info);
for (i = 0; i < count; i++)
{
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
struct ipcp_lattice *lat = ipcp_get_ith_lattice (info, i);
ipa-cp.c (ipcp_print_edge_profiles): Test for node->analyzed rather than for DECL_SAVED_TREE. 2008-07-23 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_print_edge_profiles): Test for node->analyzed rather than for DECL_SAVED_TREE. * ipa-prop.c: Include diagnostic.h. (ipa_check_stmt_modifications): Check LHS of GIMPLE_MODIFY_EXPRs thoroughly. (ipa_detect_param_modifications): Function rewritten from scratch. (ipa_compute_jump_functions): Changed accesses to modification flags. (ipa_free_node_params_substructures): Update flags destruction. (ipa_node_duplication_hook): Update flags duplication. (ipa_print_all_params_modified): Updated flag access. * ipa-prop.h (struct ipa_param_flags): New structure. (struct ipa_node_params): New field modification_analysis_done, modified_flags changed into param_flags. (ipa_is_ith_param_modified): Changed to use new flags. * Makefile.in (ipa-prop.o): Add $(DIAGNOSTIC_H) to dependencies. * ipa-prop.c (ipa_print_all_jump_functions): Moved here from ipa-cp.c and split into two functions. (ipa_print_node_jump_functions): New function. (compute_scalar_jump_functions): New function. (type_like_member_ptr_p): New function. (compute_pass_through_member_ptrs): New function. (fill_member_ptr_cst_jump_function): New function. (determine_cst_member_ptr): New function. (compute_cst_member_ptr_arguments): New function. (ipa_compute_jump_functions): Complete rewrite. * ipa-prop.h (enum jump_func_type): Make explicit that we depend on IPA_UNKNOWN being zero. Added value IPA_CONST_MEMBER_PTR. (struct ipa_member_ptr_cst): New structure. (union jump_func_value): New field member_cst. * ipa-cp.c (ipcp_lat_is_insertable): New function. (ipcp_lattice_from_jfunc): Produces bottom lattices for unhandled jump function types. (ipcp_print_all_lattices): Slight fprintf rearrangement. (ipcp_print_all_structures): Call ipa_print_all_jump_functions instead of ipcp_print_all_jump_functions. (ipcp_insert_stage): Use ipcp_lat_is_insertable, create replace maps only for replacable scalars. * doc/invoke.texi (Optimize options): Add description of -findirect-inlining. * common.opt (flag_indirect_inlining): New flag. * opts.c (decode_options): Set flag_indirect_inlining when optimize >= 3. * ipa-inline.c: Include ipa-prop.h. (inline_indirect_intraprocedural_analysis): New function. (inline_generate_summary): Allocate parameter and argument info structures, call inline_indirect_intraprocedural_analysis on each node when doing indirect inlining and deallocate indirect inlining data structures in the end. * ipa-prop.c (ipa_create_param_decls_array): Return if already done. (free_all_ipa_structures_after_iinln): New function. (free_all_ipa_structures_after_ipa_cp): Checks whether iinln will be done. * Makefile.in (ipa-inline.o): Added $(IPA_PROP_H) to dependencies. * cgraphbuild.c (compute_call_stmt_bb_frequency): New function. (build_cgraph_edges): Call compute_call_stmt_bb_frequency instead of computing the frequency separately. (rebuild_cgraph_edges): Call compute_call_stmt_bb_frequency instead of computing the frequency separately. * ipa-cp.c (ipcp_print_all_structures): Replace a call to ipa_print_all_param_modified with a call to ipa_print_all_param_flags. * ipa-prop.c (ipa_get_member_ptr_load_param): New function. (ipa_get_stmt_member_ptr_load_param): New function. (ipa_is_ssa_with_stmt_def): New function. (ipa_note_param_call): New function. (ipa_analyze_call_uses): New function. (ipa_analyze_stmt_uses): New function. (ipa_analyze_params_uses): New function. (ipa_free_node_params_substructures): Also free the param_calls linked list. (ipa_node_duplication_hook): Also duplicate the param_calls linked list. (ipa_print_node_param_flags): New function. (ipa_print_all_params_modified): Renamed to ipa_print_all_param_flags. (ipa_print_all_param_flags): Calls ipa_print_node_param_flags. * ipa-prop.h (struct ipa_param_flags): New field called. (struct ipa_param_call_note): New structure. (struct ipa_node_params): New fields param_calls and uses_analysis_done. (ipa_is_ith_param_called): New function. * ipa-inline.c (inline_indirect_intraprocedural_analysis): Call ipa_analyze_params_uses and dump parameter flags. * ipa-inline.c (cgraph_decide_recursive_inlining): Call ipa_propagate_indirect_call_infos if performing indirect inlining, pass a new parameter new_edges to it. (add_new_edges_to_heap): New fucntion. (cgraph_decide_inlining_of_small_functions): New vector new_indirect_edges for newly found indirect edges , call ipa_propagate_indirect_call_infos after inlining. (cgraph_decide_inlining): Call ipa_propagate_indirect_call_infos after inlining if performing indirect inlining. Call free_all_ipa_structures_after_iinln when doing so too. (inline_generate_summary): Do not call free_all_ipa_structures_after_iinln here. * ipa-prop.c (update_jump_functions_after_inlining): New function. (print_edge_addition_message): New function. (update_call_notes_after_inlining): New function. (propagate_info_to_inlined_callees): New function. (ipa_propagate_indirect_call_infos): New function. * ipa-prop.h: Include cgraph.h (struct ipa_param_call_note): Fields reordered, new field processed. * cgraph.h (cgraph_edge): Shrink loop_nest field to 31 bits, add a new flag indirect_call. * cgraphunit.c (verify_cgraph_node): Allow indirect edges not to have rediscovered call statements. * cgraph.c (cgraph_create_edge): Initialize indirect_call to zero. (dump_cgraph_node): Dump also the indirect_call flag. (cgraph_clone_edge): Copy also the indirect_call flag. * tree-inline.c (copy_bb): Do not check for fndecls from call expressions, check for edge availability when moving clones. (get_indirect_callee_fndecl): New function. (expand_call_inline): If callee declaration is not apprent from the statement, try calling get_indirect_callee_fndecl. Do not issue warnings or call sorry when not inlinings an indirect edge. * Makefile.in (IPA_PROP_H): Added $(CGRAPH_H) to dependencies. * ipa-prop.c (ipa_print_node_param_flags): Make the dump format a bit more frandly to matching. * testsuite/g++.dg/ipa/iinline-1.C: New testcase. * testsuite/gcc.dg/ipa/iinline-1.c: New testcase. * testsuite/gcc.dg/ipa/modif-1.c: New testcase. From-SVN: r138092
2008-07-23 21:45:45 +02:00
if (ipcp_lat_is_insertable (lat))
const_param++;
}
if (const_param == 0)
continue;
VARRAY_GENERIC_PTR_INIT (replace_trees, const_param, "replace_trees");
for (i = 0; i < count; i++)
{
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
struct ipcp_lattice *lat = ipcp_get_ith_lattice (info, i);
ipa-cp.c (ipcp_print_edge_profiles): Test for node->analyzed rather than for DECL_SAVED_TREE. 2008-07-23 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_print_edge_profiles): Test for node->analyzed rather than for DECL_SAVED_TREE. * ipa-prop.c: Include diagnostic.h. (ipa_check_stmt_modifications): Check LHS of GIMPLE_MODIFY_EXPRs thoroughly. (ipa_detect_param_modifications): Function rewritten from scratch. (ipa_compute_jump_functions): Changed accesses to modification flags. (ipa_free_node_params_substructures): Update flags destruction. (ipa_node_duplication_hook): Update flags duplication. (ipa_print_all_params_modified): Updated flag access. * ipa-prop.h (struct ipa_param_flags): New structure. (struct ipa_node_params): New field modification_analysis_done, modified_flags changed into param_flags. (ipa_is_ith_param_modified): Changed to use new flags. * Makefile.in (ipa-prop.o): Add $(DIAGNOSTIC_H) to dependencies. * ipa-prop.c (ipa_print_all_jump_functions): Moved here from ipa-cp.c and split into two functions. (ipa_print_node_jump_functions): New function. (compute_scalar_jump_functions): New function. (type_like_member_ptr_p): New function. (compute_pass_through_member_ptrs): New function. (fill_member_ptr_cst_jump_function): New function. (determine_cst_member_ptr): New function. (compute_cst_member_ptr_arguments): New function. (ipa_compute_jump_functions): Complete rewrite. * ipa-prop.h (enum jump_func_type): Make explicit that we depend on IPA_UNKNOWN being zero. Added value IPA_CONST_MEMBER_PTR. (struct ipa_member_ptr_cst): New structure. (union jump_func_value): New field member_cst. * ipa-cp.c (ipcp_lat_is_insertable): New function. (ipcp_lattice_from_jfunc): Produces bottom lattices for unhandled jump function types. (ipcp_print_all_lattices): Slight fprintf rearrangement. (ipcp_print_all_structures): Call ipa_print_all_jump_functions instead of ipcp_print_all_jump_functions. (ipcp_insert_stage): Use ipcp_lat_is_insertable, create replace maps only for replacable scalars. * doc/invoke.texi (Optimize options): Add description of -findirect-inlining. * common.opt (flag_indirect_inlining): New flag. * opts.c (decode_options): Set flag_indirect_inlining when optimize >= 3. * ipa-inline.c: Include ipa-prop.h. (inline_indirect_intraprocedural_analysis): New function. (inline_generate_summary): Allocate parameter and argument info structures, call inline_indirect_intraprocedural_analysis on each node when doing indirect inlining and deallocate indirect inlining data structures in the end. * ipa-prop.c (ipa_create_param_decls_array): Return if already done. (free_all_ipa_structures_after_iinln): New function. (free_all_ipa_structures_after_ipa_cp): Checks whether iinln will be done. * Makefile.in (ipa-inline.o): Added $(IPA_PROP_H) to dependencies. * cgraphbuild.c (compute_call_stmt_bb_frequency): New function. (build_cgraph_edges): Call compute_call_stmt_bb_frequency instead of computing the frequency separately. (rebuild_cgraph_edges): Call compute_call_stmt_bb_frequency instead of computing the frequency separately. * ipa-cp.c (ipcp_print_all_structures): Replace a call to ipa_print_all_param_modified with a call to ipa_print_all_param_flags. * ipa-prop.c (ipa_get_member_ptr_load_param): New function. (ipa_get_stmt_member_ptr_load_param): New function. (ipa_is_ssa_with_stmt_def): New function. (ipa_note_param_call): New function. (ipa_analyze_call_uses): New function. (ipa_analyze_stmt_uses): New function. (ipa_analyze_params_uses): New function. (ipa_free_node_params_substructures): Also free the param_calls linked list. (ipa_node_duplication_hook): Also duplicate the param_calls linked list. (ipa_print_node_param_flags): New function. (ipa_print_all_params_modified): Renamed to ipa_print_all_param_flags. (ipa_print_all_param_flags): Calls ipa_print_node_param_flags. * ipa-prop.h (struct ipa_param_flags): New field called. (struct ipa_param_call_note): New structure. (struct ipa_node_params): New fields param_calls and uses_analysis_done. (ipa_is_ith_param_called): New function. * ipa-inline.c (inline_indirect_intraprocedural_analysis): Call ipa_analyze_params_uses and dump parameter flags. * ipa-inline.c (cgraph_decide_recursive_inlining): Call ipa_propagate_indirect_call_infos if performing indirect inlining, pass a new parameter new_edges to it. (add_new_edges_to_heap): New fucntion. (cgraph_decide_inlining_of_small_functions): New vector new_indirect_edges for newly found indirect edges , call ipa_propagate_indirect_call_infos after inlining. (cgraph_decide_inlining): Call ipa_propagate_indirect_call_infos after inlining if performing indirect inlining. Call free_all_ipa_structures_after_iinln when doing so too. (inline_generate_summary): Do not call free_all_ipa_structures_after_iinln here. * ipa-prop.c (update_jump_functions_after_inlining): New function. (print_edge_addition_message): New function. (update_call_notes_after_inlining): New function. (propagate_info_to_inlined_callees): New function. (ipa_propagate_indirect_call_infos): New function. * ipa-prop.h: Include cgraph.h (struct ipa_param_call_note): Fields reordered, new field processed. * cgraph.h (cgraph_edge): Shrink loop_nest field to 31 bits, add a new flag indirect_call. * cgraphunit.c (verify_cgraph_node): Allow indirect edges not to have rediscovered call statements. * cgraph.c (cgraph_create_edge): Initialize indirect_call to zero. (dump_cgraph_node): Dump also the indirect_call flag. (cgraph_clone_edge): Copy also the indirect_call flag. * tree-inline.c (copy_bb): Do not check for fndecls from call expressions, check for edge availability when moving clones. (get_indirect_callee_fndecl): New function. (expand_call_inline): If callee declaration is not apprent from the statement, try calling get_indirect_callee_fndecl. Do not issue warnings or call sorry when not inlinings an indirect edge. * Makefile.in (IPA_PROP_H): Added $(CGRAPH_H) to dependencies. * ipa-prop.c (ipa_print_node_param_flags): Make the dump format a bit more frandly to matching. * testsuite/g++.dg/ipa/iinline-1.C: New testcase. * testsuite/gcc.dg/ipa/iinline-1.c: New testcase. * testsuite/gcc.dg/ipa/modif-1.c: New testcase. From-SVN: r138092
2008-07-23 21:45:45 +02:00
if (lat->type == IPA_CONST_VALUE
&& !POINTER_TYPE_P (TREE_TYPE (lat->constant)))
{
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
parm_tree = ipa_get_ith_param (info, i);
replace_param =
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
ipcp_create_replace_map (DECL_STRUCT_FUNCTION (node->decl),
parm_tree, lat);
VARRAY_PUSH_GENERIC_PTR (replace_trees, replace_param);
}
}
/* Compute how many callers node has. */
node_callers = 0;
for (cs = node->callers; cs != NULL; cs = cs->next_caller)
node_callers++;
redirect_callers = VEC_alloc (cgraph_edge_p, heap, node_callers);
for (cs = node->callers; cs != NULL; cs = cs->next_caller)
VEC_quick_push (cgraph_edge_p, redirect_callers, cs);
/* Redirecting all the callers of the node to the
new versioned node. */
node1 =
cgraph_function_versioning (node, redirect_callers, replace_trees);
VEC_free (cgraph_edge_p, heap, redirect_callers);
VARRAY_CLEAR (replace_trees);
if (node1 == NULL)
continue;
if (dump_file)
fprintf (dump_file, "versioned function %s\n",
cgraph_node_name (node));
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
ipcp_init_cloned_node (node, node1);
if (const_param > 0)
{
push_cfun (DECL_STRUCT_FUNCTION (node1->decl));
backport: ChangeLog.tuples: ChangeLog from gimple-tuples-branch. 2008-07-28 Richard Guenther <rguenther@suse.de> Merge from gimple-tuples-branch. * ChangeLog.tuples: ChangeLog from gimple-tuples-branch. * gimple.def: New file. * gsstruct.def: Likewise. * gimple-iterator.c: Likewise. * gimple-pretty-print.c: Likewise. * tree-gimple.c: Removed. Merged into ... * gimple.c: ... here. New file. * tree-gimple.h: Removed. Merged into ... * gimple.h: ... here. New file. * Makefile.in: Add dependencies on GIMPLE_H and tree-iterator.h. * configure.ac: Added support for ENABLE_GIMPLE_CHECKING and the --enable-checking=gimple flag. * config.in: Likewise. * configure: Regenerated. * tree-ssa-operands.h: Tuplified. * tree-vrp.c: Likewise. * tree-loop-linear.c: Likewise. * tree-into-ssa.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-dump.c: Likewise. * tree-complex.c: Likewise. * cgraphbuild.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-pretty-print.c: Likewise. * tracer.c: Likewise. * gengtype.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * tree-ssa-loop-manip.c: Likewise. * value-prof.c: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-tailcall.c: Likewise. * value-prof.h: Likewise. * tree.c: Likewise. * tree.h: Likewise. * tree-pass.h: Likewise. * ipa-cp.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-scalar-evolution.h: Likewise. * target.h: Likewise. * lambda-mat.c: Likewise. * tree-phinodes.c: Likewise. * diagnostic.h: Likewise. * builtins.c: Likewise. * tree-ssa-alias-warnings.c: Likewise. * cfghooks.c: Likewise. * fold-const.c: Likewise. * cfghooks.h: Likewise. * omp-low.c: Likewise. * tree-ssa-dse.c: Likewise. * ipa-reference.c: Likewise. * tree-ssa-uncprop.c: Likewise. * toplev.c: Likewise. * tree-gimple.c: Likewise. * tree-gimple.h: Likewise. * tree-chrec.c: Likewise. * tree-chrec.h: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-sccvn.h: Likewise. * cgraphunit.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-nomudflap.c: Likewise. * tree-call-cdce.c: Likewise. * ipa-pure-const.c: Likewise. * c-format.c: Likewise. * tree-stdarg.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-nrv.c: Likewise. * tree-ssa-propagate.c: Likewise. * ipa-utils.c: Likewise. * tree-ssa-propagate.h: Likewise. * tree-ssa-alias.c: Likewise. * gimple-low.c: Likewise. * tree-ssa-sink.c: Likewise. * ipa-inline.c: Likewise. * c-semantics.c: Likewise. * dwarf2out.c: Likewise. * expr.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * predict.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-parloops.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * matrix-reorg.c: Likewise. * c-decl.c: Likewise. * tree-eh.c: Likewise. * c-pretty-print.c: Likewise. * lambda-trans.c: Likewise. * function.c: Likewise. * langhooks.c: Likewise. * ebitmap.h: Likewise. * tree-vectorizer.c: Likewise. * function.h: Likewise. * langhooks.h: Likewise. * tree-vectorizer.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * domwalk.c: Likewise. * tree-if-conv.c: Likewise. * profile.c: Likewise. * domwalk.h: Likewise. * tree-data-ref.c: Likewise. * tree-data-ref.h: Likewise. * tree-flow-inline.h: Likewise. * tree-affine.c: Likewise. * tree-vect-analyze.c: Likewise. * c-typeck.c: Likewise. * gimplify.c: Likewise. * coretypes.h: Likewise. * tree-ssa-phiopt.c: Likewise. * calls.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree.def: Likewise. * tree-dfa.c: Likewise. * except.c: Likewise. * except.h: Likewise. * cfgexpand.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-live.c: Likewise. * tree-sra.c: Likewise. * tree-ssa-live.h: Likewise. * tree-predcom.c: Likewise. * lambda.h: Likewise. * tree-mudflap.c: Likewise. * ipa-prop.c: Likewise. * print-tree.c: Likewise. * tree-ssa-copy.c: Likewise. * ipa-prop.h: Likewise. * tree-ssa-forwprop.c: Likewise. * ggc-page.c: Likewise. * c-omp.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-nested.c: Likewise. * tree-ssa.c: Likewise. * lambda-code.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-inline.c: Likewise. * tree-inline.h: Likewise. * tree-iterator.c: Likewise. * tree-optimize.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-vect-transform.c: Likewise. * tree-object-size.c: Likewise. * tree-outof-ssa.c: Likewise. * cfgloop.c: Likewise. * system.h: Likewise. * tree-profile.c: Likewise. * cfgloop.h: Likewise. * c-gimplify.c: Likewise. * c-common.c: Likewise. * tree-vect-generic.c: Likewise. * tree-flow.h: Likewise. * c-common.h: Likewise. * basic-block.h: Likewise. * tree-ssa-structalias.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-ssa-structalias.h: Likewise. * tree-cfg.c: Likewise. * passes.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * tree-ssa-reassoc.c: Likewise. * cfgrtl.c: Likewise. * varpool.c: Likewise. * stmt.c: Likewise. * tree-ssanames.c: Likewise. * tree-ssa-threadedge.c: Likewise. * langhooks-def.h: Likewise. * tree-ssa-operands.c: Likewise. * config/alpha/alpha.c: Likewise. * config/frv/frv.c: Likewise. * config/s390/s390.c: Likewise. * config/m32c/m32c.c: Likewise. * config/m32c/m32c-protos.h: Likewise. * config/spu/spu.c: Likewise. * config/sparc/sparc.c: Likewise. * config/i386/i386.c: Likewise. * config/sh/sh.c: Likewise. * config/xtensa/xtensa.c: Likewise. * config/stormy16/stormy16.c: Likewise. * config/ia64/ia64.c: Likewise. * config/rs6000/rs6000.c: Likewise. * config/pa/pa.c: Likewise. * config/mips/mips.c: Likewise. From-SVN: r138207
2008-07-28 16:33:56 +02:00
gimple_register_cfg_hooks ();
current_function_decl = node1->decl;
for (i = 0; i < count; i++)
{
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
struct ipcp_lattice *lat = ipcp_get_ith_lattice (info, i);
ipa-cp.c (ipcp_print_edge_profiles): Test for node->analyzed rather than for DECL_SAVED_TREE. 2008-07-23 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_print_edge_profiles): Test for node->analyzed rather than for DECL_SAVED_TREE. * ipa-prop.c: Include diagnostic.h. (ipa_check_stmt_modifications): Check LHS of GIMPLE_MODIFY_EXPRs thoroughly. (ipa_detect_param_modifications): Function rewritten from scratch. (ipa_compute_jump_functions): Changed accesses to modification flags. (ipa_free_node_params_substructures): Update flags destruction. (ipa_node_duplication_hook): Update flags duplication. (ipa_print_all_params_modified): Updated flag access. * ipa-prop.h (struct ipa_param_flags): New structure. (struct ipa_node_params): New field modification_analysis_done, modified_flags changed into param_flags. (ipa_is_ith_param_modified): Changed to use new flags. * Makefile.in (ipa-prop.o): Add $(DIAGNOSTIC_H) to dependencies. * ipa-prop.c (ipa_print_all_jump_functions): Moved here from ipa-cp.c and split into two functions. (ipa_print_node_jump_functions): New function. (compute_scalar_jump_functions): New function. (type_like_member_ptr_p): New function. (compute_pass_through_member_ptrs): New function. (fill_member_ptr_cst_jump_function): New function. (determine_cst_member_ptr): New function. (compute_cst_member_ptr_arguments): New function. (ipa_compute_jump_functions): Complete rewrite. * ipa-prop.h (enum jump_func_type): Make explicit that we depend on IPA_UNKNOWN being zero. Added value IPA_CONST_MEMBER_PTR. (struct ipa_member_ptr_cst): New structure. (union jump_func_value): New field member_cst. * ipa-cp.c (ipcp_lat_is_insertable): New function. (ipcp_lattice_from_jfunc): Produces bottom lattices for unhandled jump function types. (ipcp_print_all_lattices): Slight fprintf rearrangement. (ipcp_print_all_structures): Call ipa_print_all_jump_functions instead of ipcp_print_all_jump_functions. (ipcp_insert_stage): Use ipcp_lat_is_insertable, create replace maps only for replacable scalars. * doc/invoke.texi (Optimize options): Add description of -findirect-inlining. * common.opt (flag_indirect_inlining): New flag. * opts.c (decode_options): Set flag_indirect_inlining when optimize >= 3. * ipa-inline.c: Include ipa-prop.h. (inline_indirect_intraprocedural_analysis): New function. (inline_generate_summary): Allocate parameter and argument info structures, call inline_indirect_intraprocedural_analysis on each node when doing indirect inlining and deallocate indirect inlining data structures in the end. * ipa-prop.c (ipa_create_param_decls_array): Return if already done. (free_all_ipa_structures_after_iinln): New function. (free_all_ipa_structures_after_ipa_cp): Checks whether iinln will be done. * Makefile.in (ipa-inline.o): Added $(IPA_PROP_H) to dependencies. * cgraphbuild.c (compute_call_stmt_bb_frequency): New function. (build_cgraph_edges): Call compute_call_stmt_bb_frequency instead of computing the frequency separately. (rebuild_cgraph_edges): Call compute_call_stmt_bb_frequency instead of computing the frequency separately. * ipa-cp.c (ipcp_print_all_structures): Replace a call to ipa_print_all_param_modified with a call to ipa_print_all_param_flags. * ipa-prop.c (ipa_get_member_ptr_load_param): New function. (ipa_get_stmt_member_ptr_load_param): New function. (ipa_is_ssa_with_stmt_def): New function. (ipa_note_param_call): New function. (ipa_analyze_call_uses): New function. (ipa_analyze_stmt_uses): New function. (ipa_analyze_params_uses): New function. (ipa_free_node_params_substructures): Also free the param_calls linked list. (ipa_node_duplication_hook): Also duplicate the param_calls linked list. (ipa_print_node_param_flags): New function. (ipa_print_all_params_modified): Renamed to ipa_print_all_param_flags. (ipa_print_all_param_flags): Calls ipa_print_node_param_flags. * ipa-prop.h (struct ipa_param_flags): New field called. (struct ipa_param_call_note): New structure. (struct ipa_node_params): New fields param_calls and uses_analysis_done. (ipa_is_ith_param_called): New function. * ipa-inline.c (inline_indirect_intraprocedural_analysis): Call ipa_analyze_params_uses and dump parameter flags. * ipa-inline.c (cgraph_decide_recursive_inlining): Call ipa_propagate_indirect_call_infos if performing indirect inlining, pass a new parameter new_edges to it. (add_new_edges_to_heap): New fucntion. (cgraph_decide_inlining_of_small_functions): New vector new_indirect_edges for newly found indirect edges , call ipa_propagate_indirect_call_infos after inlining. (cgraph_decide_inlining): Call ipa_propagate_indirect_call_infos after inlining if performing indirect inlining. Call free_all_ipa_structures_after_iinln when doing so too. (inline_generate_summary): Do not call free_all_ipa_structures_after_iinln here. * ipa-prop.c (update_jump_functions_after_inlining): New function. (print_edge_addition_message): New function. (update_call_notes_after_inlining): New function. (propagate_info_to_inlined_callees): New function. (ipa_propagate_indirect_call_infos): New function. * ipa-prop.h: Include cgraph.h (struct ipa_param_call_note): Fields reordered, new field processed. * cgraph.h (cgraph_edge): Shrink loop_nest field to 31 bits, add a new flag indirect_call. * cgraphunit.c (verify_cgraph_node): Allow indirect edges not to have rediscovered call statements. * cgraph.c (cgraph_create_edge): Initialize indirect_call to zero. (dump_cgraph_node): Dump also the indirect_call flag. (cgraph_clone_edge): Copy also the indirect_call flag. * tree-inline.c (copy_bb): Do not check for fndecls from call expressions, check for edge availability when moving clones. (get_indirect_callee_fndecl): New function. (expand_call_inline): If callee declaration is not apprent from the statement, try calling get_indirect_callee_fndecl. Do not issue warnings or call sorry when not inlinings an indirect edge. * Makefile.in (IPA_PROP_H): Added $(CGRAPH_H) to dependencies. * ipa-prop.c (ipa_print_node_param_flags): Make the dump format a bit more frandly to matching. * testsuite/g++.dg/ipa/iinline-1.C: New testcase. * testsuite/gcc.dg/ipa/iinline-1.c: New testcase. * testsuite/gcc.dg/ipa/modif-1.c: New testcase. From-SVN: r138092
2008-07-23 21:45:45 +02:00
if (ipcp_lat_is_insertable (lat))
{
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
parm_tree = ipa_get_ith_param (info, i);
if (lat->type != IPA_CONST_VALUE_REF
&& !is_gimple_reg (parm_tree))
ipcp_propagate_one_const (node1, i, lat);
}
}
if (gimple_in_ssa_p (cfun))
{
update_ssa (TODO_update_ssa);
#ifdef ENABLE_CHECKING
verify_ssa (true);
#endif
}
free_dominance_info (CDI_DOMINATORS);
free_dominance_info (CDI_POST_DOMINATORS);
pop_cfun ();
current_function_decl = NULL;
}
if (dump_file)
dump_function_to_file (node1->decl, dump_file, dump_flags);
}
ipcp_update_callgraph ();
ipcp_update_profiling ();
}
/* The IPCP driver. */
static unsigned int
ipcp_driver (void)
{
if (dump_file)
fprintf (dump_file, "\nIPA constant propagation start:\n");
ipa-cp.c (ipcp_init_cloned_node): Call ipa_check_create_node_params instead of ipa_create_node_params. 2008-07-08 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_init_cloned_node): Call ipa_check_create_node_params instead of ipa_create_node_params. (ipcp_driver): Allocate infos with ipa_check_create_node_params and ipa_check_create_edge_args, free them with free_all_ipa_structures_after_ipa_cp, call ipa_register_cgraph_hooks. * ipa-prop.c: Include flags.h and tree-inline.h. (ipa_node_params_vector): New variable. (ipa_edge_args_vector): New variable. (edge_removal_hook_holder): New variable. (node_removal_hook_holder): New variable. (edge_duplication_hook_holder): New variable. (node_duplication_hook_holder): New variable. (ipa_detect_param_modifications): Check for presence of modified flags. (ipa_compute_jump_functions): Check for presence of jump functions. (ipa_free_edge_args_substructures): New function. (ipa_create_node_params): Removed. (ipa_free_all_edge_args): Changed to deallocate the on-the-side vector. (ipa_free_node_params_substructures): New function. (ipa_free_all_node_params): Changed to deallocate the on-the-side vector. (ipa_edge_removal_hook): New function. (ipa_node_removal_hook): New function. (duplicate_array): New function. (ipa_edge_duplication_hook): New function. (ipa_node_duplication_hook): New function. (ipa_register_cgraph_hooks): New function. (ipa_unregister_cgraph_hooks): New function. (free_all_ipa_structures_after_ipa_cp): New function. * ipa-prop.h: Include vec.h. (ipa_node_params_t): New typedef with vector types for it. (ipa_edge_args_t): New typedef with vector types for it. (IPA_NODE_REF): Changed to access an on-the-side vector. (IPA_EDGE_REF): Changed to access an on-the-side vector. (ipa_check_create_node_params): New function. (ipa_check_create_edge_args): New function. * Makefile.in (IPA_PROP_H): New variable for ipa-prop.h. Converted all users. From-SVN: r137620
2008-07-08 15:25:24 +02:00
ipa_check_create_node_params ();
ipa_check_create_edge_args ();
ipa_register_cgraph_hooks ();
/* 1. Call the init stage to initialize
ipa-cp.c (ipcp_init_stage): Calls ipa_set_called_with_variable_arg instead of setting number of formal... 2008-04-30 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_init_stage): Calls ipa_set_called_with_variable_arg instead of setting number of formal parameters to zero. (ipcp_init_stage): Do not set the number of actual parameters to zero either. (ipcp_propagate_stage): Explicitly skipping all calls to nodes which are called with variable number of arguments. (ipcp_insert_stage): Explicitely skipping all nodes which are called with variable number of arguments. (ipcp_callsite_param_print): Skipps callsites to nodes with varaible number of parameters. * ipa-prop.h (struct ipa_node_params): Added flag called_with_var_arguments (ipa_set_param_count): Added. Changed sole setter to use it. (ipa_get_param_count): Added. All readers of param_count converted to use it instead. (ipa_set_called_with_variable_arg): Added. (ipa_is_called_with_var_arguments): Added. (ipa_get_ith_param): Added. All readers of param_decls converted to use it instead. (ipa_set_cs_argument_count): Added, sole writer to argument_count changed to use it. (ipa_get_cs_argument_count): Added, all readers of argument_count changed to cal it. (ipa_get_ith_jump_func): Added. Accessors of jump values changed to use it. * ipa-prop.h (struct ipcp_formal): Renamed to ipcp_lattice (struct ipcp_lattice): Renamed cval_type to type (struct ipa_node_params): ipcp_cval renamed to ipcp_lattices * ipa-cp.c (ipcp_cval_get_cvalue): Changed return value to tree (ipcp_cval_set_cvalue): Changed type of parameter value to tree (ipcp_insert_stage): Changed the type of variable cvalue to tree (ipcp_replace_map_create): Changed the type of parameter cvalue to tree (build_const_val): Changed the type of parameter cvalue to tree (ipcp_propagate_const): Changed the type of parameter cvalue to tree (ipcp_method_cval_set_cvalue_type): Renamed parameter cval_type1 to type * ipa-prop.h (struct ipcp_formal): Replaced cvalue with tree called constant * ipa-prop.c (ipa_methodlist_init): Renamed to ipa_init_func_list (ipa_methodlist_not_empty): Removed, the sole user now checks directly (ipa_add_method): Renamed to ipa_push_func_to_list (ipa_remove_method): Renamed to ipa_pop_func_from_list (ipa_callsite_param_count): Removed. (ipa_callsite_param_count_set): Removed. (ipa_callsite_param): Removed. (ipa_callsite_callee): Removed. (ipa_callsite_compute_param): Renamed to ipa_compute_jump_functions (ipa_callsite_compute_count): Renamed to ipa_count_arguments (ipa_method_formal_count): Removed. (ipa_method_formal_count_set): Removed. (ipa_method_get_tree): Removed. (ipa_method_tree_map_create): Removed. (ipa_method_compute_tree_map): Renamed to ipa_create_param_decls_array (ipa_create_param_decls_array): Creates the array itself (ipa_create_param_decls_array): Temporary variable info instead of a few dereferences. (ipa_method_formal_compute_count): Renamed to ipa_count_formal_params (ipa_method_compute_modify): Renamed to ipa_detect_param_modifications (get_type): Removed. (ipa_jf_get_info_type): Removed. (ipa_node_create): Renamed to ipa_create_node_params (ipa_free): Renamed to ipa_free_all_node_params (ipa_nodes_create): Renamed to ipa_create_all_node_params (ipa_edges_create): Renamed to ipa_create_all_edge_args (ipa_edges_free): Renamed to ipa_free_all_edge_args (ipa_nodes_free): Integrated into ipa_free_all_node_params and removed (ipa_free_all_node_params): Deallocation to jump_functions moved to ipa_free_all_edge_args (ipa_method_tree_print): Renamed to ipa_print_all_tree_maps (ipa_method_modify_print): Renamed to ipa_print_all_params_modified (ipa_create_methodlist_node): Removed. (ipa_methodlist_method): Removed. (ipa_methodlist_method_set): Removed. (ipa_methodlist_next_method): Removed. (ipa_methodlist_next_method_set): Removed. (ipa_method_is_modified): Removed. (ipa_method_modify_create): Removed. (ipa_method_modify_init): Temporary variable info instead of a few dereferences. (ipa_detect_param_modifications): Temporary variable info instead of a few dereferences. (ipa_compute_jump_functions): Temporary variable info instead of a few dereferences. (ipa_method_modify_set): Removed. (ipa_method_tree_map): Renamed to ipa_get_param_decl_index (ipa_get_param_decl_index): Now accepts struct ipa_node_params rather than craph_node as the first parameter. (ipa_method_modify_stmt): Renamed to ipa_check_stmt_modifications (ipa_method_modify_init): Removed. (ipa_compute_jump_functions): Added a temp variable instead of repeatadly dereferencing the cgraph_edge.aux pointer (ipa_callsite_param_set_type): Removed. (ipa_compute_jump_functions): i renamed to index and moved to an inner block (ipa_callsite_param_set_info_type_formal): Removed. (ipa_callsite_param_set_info_type): Removed. (ipa_callsite_param_map_create): Removed. (ipa_callsite_tree): Removed. (ipa_callsite_caller): Removed. (ipa_pop_func_from_list): return_method removed to return_func * ipa-prop.h (enum cvalue_type): Renamed to ipa_lattice_type, prefixed all values with IPA_. Changed all users. (enum jump_func_type): Rnamed UNKNOWN_IPATYPE to IPA_UNKNOWN, CONST_IPATYPE to IPA_CONST, CONST_IPATYPE_REF to IPA_CONST_REF and FORMAL_IPATYPE IPA_PASS_THROUGH. (union parameter_info): Renamed to jump_func_value. (union jump_func_value): Renamed value to constant (struct ipa_jump_func): Renamed info_type to value (struct ipa_node): Renamed to ipa_node_params (struct ipa_node_params): Renamed ipa_arg_num to param_count (struct ipa_node_params): Renamed ipa_param_tree to param_decls (struct ipa_node_params): Renamed ipa_mod to modified_flags (struct ipa_edge): Renamed to ipa_edge_args (struct ipa_edge_args): Renamed ipa_param_num to argument_count (struct ipa_edge_args): Renamed ipa_param_map to jump_functions (struct ipa_methodlist): Renamed to ipa_func_list (struct ipa_func_list): method_p renamed to node, next_method renamed to next (ipa_methodlist_p): Removed, switched all users to struct pointer (IS_VALID_TREE_MAP_INDEX): Renamed to IS_VALID_JUMP_FUNC_INDEX From-SVN: r134818
2008-04-30 12:01:59 +02:00
the ipa_node_params and ipa_edge_args structures. */
ipcp_init_stage ();
if (dump_file)
{
fprintf (dump_file, "\nIPA structures before propagation:\n");
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
ipcp_print_all_structures (dump_file);
}
/* 2. Do the interprocedural propagation. */
ipcp_iterate_stage ();
if (dump_file)
{
fprintf (dump_file, "\nIPA structures after propagation:\n");
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
ipcp_print_all_structures (dump_file);
fprintf (dump_file, "\nProfiling info before insert stage:\n");
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
ipcp_print_profile_data (dump_file);
}
/* 3. Insert the constants found to the functions. */
ipcp_insert_stage ();
if (dump_file)
{
fprintf (dump_file, "\nProfiling info after insert stage:\n");
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
ipcp_print_profile_data (dump_file);
}
/* Free all IPCP structures. */
ipa-cp.c (ipcp_init_cloned_node): Call ipa_check_create_node_params instead of ipa_create_node_params. 2008-07-08 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_init_cloned_node): Call ipa_check_create_node_params instead of ipa_create_node_params. (ipcp_driver): Allocate infos with ipa_check_create_node_params and ipa_check_create_edge_args, free them with free_all_ipa_structures_after_ipa_cp, call ipa_register_cgraph_hooks. * ipa-prop.c: Include flags.h and tree-inline.h. (ipa_node_params_vector): New variable. (ipa_edge_args_vector): New variable. (edge_removal_hook_holder): New variable. (node_removal_hook_holder): New variable. (edge_duplication_hook_holder): New variable. (node_duplication_hook_holder): New variable. (ipa_detect_param_modifications): Check for presence of modified flags. (ipa_compute_jump_functions): Check for presence of jump functions. (ipa_free_edge_args_substructures): New function. (ipa_create_node_params): Removed. (ipa_free_all_edge_args): Changed to deallocate the on-the-side vector. (ipa_free_node_params_substructures): New function. (ipa_free_all_node_params): Changed to deallocate the on-the-side vector. (ipa_edge_removal_hook): New function. (ipa_node_removal_hook): New function. (duplicate_array): New function. (ipa_edge_duplication_hook): New function. (ipa_node_duplication_hook): New function. (ipa_register_cgraph_hooks): New function. (ipa_unregister_cgraph_hooks): New function. (free_all_ipa_structures_after_ipa_cp): New function. * ipa-prop.h: Include vec.h. (ipa_node_params_t): New typedef with vector types for it. (ipa_edge_args_t): New typedef with vector types for it. (IPA_NODE_REF): Changed to access an on-the-side vector. (IPA_EDGE_REF): Changed to access an on-the-side vector. (ipa_check_create_node_params): New function. (ipa_check_create_edge_args): New function. * Makefile.in (IPA_PROP_H): New variable for ipa-prop.h. Converted all users. From-SVN: r137620
2008-07-08 15:25:24 +02:00
free_all_ipa_structures_after_ipa_cp ();
if (dump_file)
fprintf (dump_file, "\nIPA constant propagation end\n");
cgraph_remove_unreachable_nodes (true, NULL);
tree-vrp.c (execute_vrp): Return value. 2006-03-02 Daniel Berlin <dberlin@dberlin.org> * gcc/tree-vrp.c (execute_vrp): Return value. * gcc/regrename.c (rest_of_handle_regrename): Ditto. * gcc/tree-into-ssa.c (rewrite_into_ssa): Ditto. * gcc/tree-complex.c (tree_lower_complex): Ditto. (tree_lower_complex_O0): Ditto. * gcc/tracer.c (rest_of_handle_tracer): Ditto. * gcc/postreload-gcse.c (rest_of_handle_gcse2): Ditto. * gcc/postreload.c (rest_of_handle_postreload): Ditto. * gcc/tree-tailcall.c (execute_tail_recursion): Ditto. (execute_tail_calls): Ditto. * gcc/tree-ssa-loop-ch.c (copy_loop_headers): Ditto. * gcc/tree.h (init_function_for_compilation): Ditto. * gcc/ipa-cp.c (ipcp_driver): Ditto. * gcc/tree-scalar-evolution.c (scev_const_prop): Ditto. * gcc/tree-scalar-evolution.h (scev_const_prop): Ditto. * gcc/final.c (compute_alignments): Ditto. (rest_of_handle_final): Ditto. (rest_of_handle_shorten_branches): Ditto. (rest_of_clean_state): Ditto. * gcc/omp-low.c (execute_expand_omp): Ditto. (execute_lower_omp): Ditto. * gcc/tree-ssa-dse.c (tree_ssa_dse): Ditto. * gcc/ipa-reference.c (static_execute): Ditto. * gcc/tree-ssa-uncprop.c (tree_ssa_uncprop): Ditto. * gcc/reorg.c (rest_of_handle_delay_slots): Ditto. (rest_of_handle_machine_reorg): Ditto. * gcc/cgraphunit.c (rebuild_cgraph_edges): Ditto. * gcc/flow.c (recompute_reg_usage): Ditto. (rest_of_handle_remove_death_notes): Ditto. (rest_of_handle_life): Ditto. (rest_of_handle_flow2): Ditto. * gcc/tree-ssa-copyrename.c (rename_ssa_copies): Ditto. * gcc/tree-ssa-ccp.c (do_ssa_ccp): Ditto. (do_ssa_store_ccp): Ditto. (execute_fold_all_builtins): Ditto. * gcc/mode-switching.c (rest_of_handle_mode_switching): Ditto. * gcc/modulo-sched.c (rest_of_handle_sms): Ditto. * gcc/ipa-pure-const.c (static_execute): Ditto. * gcc/cse.c (rest_of_handle_cse): Ditto. (rest_of_handle_cse2): Ditto. * gcc/web.c (rest_of_handle_web): Ditto. * gcc/tree-stdarg.c (execute_optimize_stdarg): Ditto. * gcc/tree-ssa-math-opts.c (execute_cse_reciprocals): Ditto. * gcc/tree-ssa-dom.c (tree_ssa_dominator_optimize): Ditto. * gcc/tree-nrv.c (tree_nrv): Ditto. (execute_return_slot_opt): Ditto. * gcc/tree-ssa-alias.c (compute_may_aliases): Ditto. (create_structure_vars): Ditto. * gcc/loop-init.c (rtl_loop_init): Ditto. (rtl_loop_done): Ditto. (rtl_move_loop_invariants): Ditto. (rtl_unswitch): Ditto. (rtl_unroll_and_peel_loops): Ditto. (rtl_doloop): Ditto. * gcc/gimple-low.c (lower_function_body): Ditto. (mark_used_blocks): Ditto. * gcc/tree-ssa-sink.c (execute_sink_code): Ditto. * gcc/ipa-inline.c (cgraph_decide_inlining): Ditto. (cgraph_early_inlining): Ditto. * gcc/global.c (rest_of_handle_global_alloc): Ditto. * gcc/jump.c (cleanup_barriers): Ditto. (purge_line_number_notes): Ditto. * gcc/ifcvt.c (rest_of_handle_if_conversion): Ditto. (rest_of_handle_if_after_reload): Ditto. * gcc/tree-ssa-loop.c (tree_ssa_loop_init): Ditto. (tree_ssa_loop_im): Ditto. (tree_ssa_loop_unswitch): Ditto. (tree_vectorize): Ditto. (tree_linear_transform): Ditto. (tree_ssa_loop_ivcanon): Ditto. (tree_ssa_empty_loop): Ditto. (tree_ssa_loop_bounds): Ditto. (tree_complete_unroll): Ditto. (tree_ssa_loop_prefetch): Ditto. (tree_ssa_loop_ivopts): Ditto. (tree_ssa_loop_done): Ditto. * gcc/predict.c (tree_estimate_probability): Ditto. * gcc/recog.c (split_all_insns_noflow): Ditto. (rest_of_handle_peephole2): Ditto. (rest_of_handle_split_all_insns): Ditto. * gcc/tree-eh.c (lower_eh_constructs): Ditto. * gcc/regmove.c (rest_of_handle_regmove): Ditto. (rest_of_handle_stack_adjustments): Ditto. * gcc/local-alloc.c (rest_of_handle_local_alloc): Ditto. * gcc/function.c (instantiate_virtual_regs): Ditto. (init_function_for_compilation): Ditto. (rest_of_handle_check_leaf_regs): Ditto. * gcc/gcse.c (rest_of_handle_jump_bypass): Ditto. (rest_of_handle_gcse): Ditto. * gcc/ipa-type-escape.c (type_escape_execute): Ditto. * gcc/alias.c (rest_of_handle_cfg): Ditto. * gcc/tree-if-conv.c (main_tree_if_conversion): Ditto. * gcc/profile.c (rest_of_handle_branch_prob): Ditto. * gcc/tree-ssa-phiopt.c (tree_ssa_phiopt): Ditto. * gcc/rtl-factoring.c (rest_of_rtl_seqabstr): Ditto. * gcc/bt-load.c (rest_of_handle_branch_target_load_optimize): Ditto * gcc/tree-dfa.c (find_referenced_vars): Ditto. * gcc/except.c (set_nothrow_function_flags): Ditto. (convert_to_eh_region_ranges): Ditto. (rest_of_handle_eh): Ditto. * gcc/emit-rtl.c (unshare_all_rtl): Ditto. (remove_unnecessary_notes): Ditto. * gcc/except.h (set_nothrow_function_flags): Ditto. (convert_to_eh_region_ranges): Ditto. * gcc/cfgexpand.c (tree_expand_cfg): Ditto. * gcc/tree-cfgcleanup.c (merge_phi_nodes): Ditto. * gcc/tree-ssa-pre.c (do_pre): Ditto. (execute_fre): Ditto. * gcc/cfgcleanup.c (rest_of_handle_jump): Ditto. (rest_of_handle_jump2): Ditto. * gcc/tree-sra.c (tree_sra): Ditto. * gcc/tree-mudflap.c (execute_mudflap_function_ops): Ditto. (execute_mudflap_function_decls): Ditto. * gcc/tree-ssa-copy.c (do_copy_prop): Ditto. (do_store_copy_prop): Ditto. * gcc/ipa-prop.h (ipcp_driver): Ditto. * gcc/cfglayout.c (insn_locators_initialize): Ditto. * gcc/tree-ssa-forwprop.c (tree_ssa_forward_propagate_single_use_vars): Ditto. * gcc/cfglayout.h (insn_locators_initialize): Ditto. * gcc/tree-ssa-dce.c (tree_ssa_dce): Ditto. * gcc/tree-ssa.c (execute_early_warn_uninitialized): Ditto. (execute_late_warn_uninitialized): Ditto. * gcc/rtl.h (cleanup_barriers): Ditto. (split_all_insns_noflow): Ditto. (purge_line_number_notes): Ditto. (unshare_all_rtl): Ditto. (remove_unnecessary_notes): Ditto. (recompute_reg_usage): Ditto. (variable_tracking_main): Ditto. * gcc/integrate.c (emit_initial_value_sets): Ditto. * gcc/integrate.h (emit_initial_value_sets): Ditto. * gcc/tree-optimize.c (execute_free_datastructures): Ditto (execute_free_cfg_annotations): Ditto. (execute_fixup_cfg): Ditto. (execute_cleanup_cfg_pre_ipa): Ditto. (execute_cleanup_cfg_post_optimizing): Ditto. (execute_init_datastructures): Ditto. * gcc/tree-object-size.c (compute_object_sizes): Ditto. * gcc/combine.c (rest_of_handle_combine): Ditto. * gcc/tree-outof-ssa.c (rewrite_out_of_ssa): Ditto. * gcc/bb-reorder.c (duplicate_computed_gotos): Ditto. (rest_of_handle_reorder_blocks): Ditto. (rest_of_handle_partition_blocks): Ditto. * gcc/var-tracking.c (variable_tracking_main): Ditto. * gcc/tree-profile.c (tree_profiling): Ditto. * gcc/tree-vect-generic.c (expand_vector_operations): Ditto. * gcc/reg-stack.c (rest_of_handle_stack_regs): Ditto. * gcc/sched-rgn.c (rest_of_handle_sched): Ditto. (rest_of_handle_sched2): Ditto. * gcc/basic-block.h (free_bb_insn): Ditto. * gcc/tree-ssa-structalias.c (ipa_pta_execute): Ditto. * gcc/tree-cfg.c (execute_build_cfg): Ditto. (remove_useless_stmts): Ditto. (split_critical_edges): Ditto. (execute_warn_function_return): Ditto. (execute_warn_function_noreturn): Ditto. * gcc/tree-ssa-reassoc.c (execute_reassoc): Ditto. * gcc/cfgrtl.c (free_bb_for_insn): Ditto. * gcc/passes.c (execute_one_pass): Run additional todos returned by execute function. * gcc/tree-pass.h (struct tree_opt_pass): Make execute return a value. From-SVN: r111643
2006-03-02 20:00:11 +01:00
return 0;
}
/* Gate for IPCP optimization. */
static bool
cgraph_gate_cp (void)
{
return flag_ipa_cp;
}
re PR other/35094 (RTL dump file letters hosed and partly undocumented) * gcc.dg/20050811-2.c: Update dumping flags. * gcc.dg/sms-2.c: Update dumping flags. * gcc.dg/var-expand1.c: Update dumping flags. * gcc.dg/var-expand3.c: Update dumping flags. * gcc.dg/pr30957-1.c: Update dumping flags. * gcc.dg/20050811-1.c: Update dumping flags. * gcc.dg/cpp/cmdlne-dI-M.C: Do not xfail. * gcc.dg/cpp/cmdlne-dM-M.C: Do not xfail. PR other/35094 * toplev.c (decode_d_option): Handle all CPP flags. * tree-vrp.c: Update tree_pass descriptors. * regrename.c: Update tree_pass descriptors. * fwprop.c: Update tree_pass descriptors. * doc/invoke.texi: Remove documentation of dropped -d? flags. * tree-into-ssa.c: Update tree_pass descriptors. * tree-dump.c: Update tree_pass descriptors. * tree-complex.c: Update tree_pass descriptors. * tree-dump.h: Update tree_pass descriptors. * see.c: Update tree_pass descriptors. * cgraphbuild.c: Update tree_pass descriptors. * tracer.c: Update tree_pass descriptors. * tree-loop-distribution.c: Update tree_pass descriptors. * cgraph.c: Update tree_pass descriptors. * postreload-gcse.c: Update tree_pass descriptors. * postreload.c: Update tree_pass descriptors. * tree-ssa-loop-ch.c: Update tree_pass descriptors. * tree-tailcall.c: Update tree_pass descriptors. * tree-pass.h (tree_opt_pass): Rename to ... (opt_pass) ... this one; add "type" field and remove letter field. (gimple_opt_pass, rtl_opt_pass, simple_ipa_opt_pass): New. (execute_pass_list, execute_ipa_pass_list, all_passes, all_ipa_passes, all_lowering_passes): Update declaration. * ipa-cp.c: Update tree_pass descriptors. * final.c: Update tree_pass descriptors. * omp-low.c: Update tree_pass descriptors. * tree-ssa-dse.c: Update tree_pass descriptors. * ipa-reference.c: Update tree_pass descriptors. * tree-ssa-uncprop.c: Update tree_pass descriptors. * auto-inc-dec.c: Update tree_pass descriptors. * reorg.c: Update tree_pass descriptors. * cgraphunit.c: Update tree_pass descriptors. * tree-ssa-copyrename.c: Update tree_pass descriptors. * tree-ssa-ccp.c: Update tree_pass descriptors. * df-core.c: Update tree_pass descriptors. * mode-switching.c: Update tree_pass descriptors. * tree-nomudflap.c: Update tree_pass descriptors. * modulo-sched.c: Update tree_pass descriptors. * ipa-pure-const.c: Update tree_pass descriptors. * cse.c: Update tree_pass descriptors. * web.c: Update tree_pass descriptors. * tree-stdarg.c: Update tree_pass descriptors. * tree-ssa-math-opts.c: Update tree_pass descriptors. * tree-ssa-dom.c: Update tree_pass descriptors. * tree-nrv.c: Update tree_pass descriptors. * tree-ssa-alias.c: Update tree_pass descriptors. * loop-init.c: Update tree_pass descriptors. * gimple-low.c: Update tree_pass descriptors. * ipa-inline.c: Update tree_pass descriptors. * tree-ssa-sink.c: Update tree_pass descriptors. * global.c: Update tree_pass descriptors. * ifcvt.c: Update tree_pass descriptors. * jump.c: Update tree_pass descriptors. * predict.c: Update tree_pass descriptors. * tree-ssa-loop.c: Update tree_pass descriptors. * recog.c: Update tree_pass descriptors. * dse.c: Update tree_pass descriptors. * tree-ssa-ifcombine.c: Update tree_pass descriptors. * tree-eh.c: Update tree_pass descriptors. * regmove.c: Update tree_pass descriptors. * local-alloc.c * function.c: Update tree_pass descriptors. * tree-vectorizer.c: Update tree_pass descriptors. * gcse.c: Update tree_pass descriptors. * ipa-type-escape.c: Update tree_pass descriptors. * tree-if-conv.c: Update tree_pass descriptors. * init-regs.c: Update tree_pass descriptors. * ipa.c: Update tree_pass descriptors. * tree-ssa-phiopt.c: Update tree_pass descriptors. * rtl-factoring.c: Update tree_pass descriptors. * lower-subreg.c: Update tree_pass descriptors. * bt-load.c: Update tree_pass descriptors. * tree-dfa.c: Update tree_pass descriptors. * except.c: Update tree_pass descriptors. * emit-rtl.c: Update tree_pass descriptors. * cfgexpand.c: Update tree_pass descriptors. * tree-cfgcleanup.c: Update tree_pass descriptors. * cfgcleanup.c: Update tree_pass descriptors. * tree-ssa-pre.c: Update tree_pass descriptors. * tree-sra.c: Update tree_pass descriptors. * tree-mudflap.c: Update tree_pass descriptors. * tree-ssa-copy.c: Update tree_pass descriptors. * cfglayout.c: Update tree_pass descriptors. * tree-ssa-forwprop.c: Update tree_pass descriptors. * tree-ssa-dce.c: Update tree_pass descriptors. * tree-ssa.c: Update tree_pass descriptors. * regclass.c: Update tree_pass descriptors. * integrate.c: Update tree_pass descriptors. * tree-optimize.c: Update tree_pass descriptors. * tree-ssa-phiprop.c: Update tree_pass descriptors. * tree-object-size.c: Update tree_pass descriptors. * combine.c: Update tree_pass descriptors. * tree-outof-ssa.c: Update tree_pass descriptors. * bb-reorder.c: Update tree_pass descriptors. * stack-ptr-mod.c: Update tree_pass descriptors. * var-tracking.c: Update tree_pass descriptors. * tree-profile.c: Update tree_pass descriptors. * tree-vect-generic.c: Update tree_pass descriptors. * reg-stack.c: Update tree_pass descriptors. * sched-rgn.c: Update tree_pass descriptors. * tree-ssa-structalias.c: Update tree_pass descriptors. * tree-cfg.c: Update tree_pass descriptors. * passes.c (current_pass): Update declaration. (finish_optimization_passes): Update. (all_passes, all_ipa_passes, all_lowering_passes): Update declaration. (register_one_dump_file, register_dump_files_1, next_pass_1): Update arguments. (init_optimization_passes): Update handling of new types. (execute_one_pass, execute_pass_list, execute_ipa_pass_list): Update. * ipa-struct-reorg.c: Update tree_pass descriptors. * tree-ssa-reassoc.c: Update tree_pass descriptors. * combine-stack-adj.c: Update tree_pass descriptors. * cfgrtl.c: Update tree_pass descriptors. * dce.c: Update tree_pass descriptors. * tree-ssanames.c: Update tree_pass descriptors. From-SVN: r133342
2008-03-19 12:22:40 +01:00
struct simple_ipa_opt_pass pass_ipa_cp =
{
{
SIMPLE_IPA_PASS,
"cp", /* name */
cgraph_gate_cp, /* gate */
ipcp_driver, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_IPA_CONSTANT_PROP, /* tv_id */
0, /* properties_required */
PROP_trees, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
re PR other/35094 (RTL dump file letters hosed and partly undocumented) * gcc.dg/20050811-2.c: Update dumping flags. * gcc.dg/sms-2.c: Update dumping flags. * gcc.dg/var-expand1.c: Update dumping flags. * gcc.dg/var-expand3.c: Update dumping flags. * gcc.dg/pr30957-1.c: Update dumping flags. * gcc.dg/20050811-1.c: Update dumping flags. * gcc.dg/cpp/cmdlne-dI-M.C: Do not xfail. * gcc.dg/cpp/cmdlne-dM-M.C: Do not xfail. PR other/35094 * toplev.c (decode_d_option): Handle all CPP flags. * tree-vrp.c: Update tree_pass descriptors. * regrename.c: Update tree_pass descriptors. * fwprop.c: Update tree_pass descriptors. * doc/invoke.texi: Remove documentation of dropped -d? flags. * tree-into-ssa.c: Update tree_pass descriptors. * tree-dump.c: Update tree_pass descriptors. * tree-complex.c: Update tree_pass descriptors. * tree-dump.h: Update tree_pass descriptors. * see.c: Update tree_pass descriptors. * cgraphbuild.c: Update tree_pass descriptors. * tracer.c: Update tree_pass descriptors. * tree-loop-distribution.c: Update tree_pass descriptors. * cgraph.c: Update tree_pass descriptors. * postreload-gcse.c: Update tree_pass descriptors. * postreload.c: Update tree_pass descriptors. * tree-ssa-loop-ch.c: Update tree_pass descriptors. * tree-tailcall.c: Update tree_pass descriptors. * tree-pass.h (tree_opt_pass): Rename to ... (opt_pass) ... this one; add "type" field and remove letter field. (gimple_opt_pass, rtl_opt_pass, simple_ipa_opt_pass): New. (execute_pass_list, execute_ipa_pass_list, all_passes, all_ipa_passes, all_lowering_passes): Update declaration. * ipa-cp.c: Update tree_pass descriptors. * final.c: Update tree_pass descriptors. * omp-low.c: Update tree_pass descriptors. * tree-ssa-dse.c: Update tree_pass descriptors. * ipa-reference.c: Update tree_pass descriptors. * tree-ssa-uncprop.c: Update tree_pass descriptors. * auto-inc-dec.c: Update tree_pass descriptors. * reorg.c: Update tree_pass descriptors. * cgraphunit.c: Update tree_pass descriptors. * tree-ssa-copyrename.c: Update tree_pass descriptors. * tree-ssa-ccp.c: Update tree_pass descriptors. * df-core.c: Update tree_pass descriptors. * mode-switching.c: Update tree_pass descriptors. * tree-nomudflap.c: Update tree_pass descriptors. * modulo-sched.c: Update tree_pass descriptors. * ipa-pure-const.c: Update tree_pass descriptors. * cse.c: Update tree_pass descriptors. * web.c: Update tree_pass descriptors. * tree-stdarg.c: Update tree_pass descriptors. * tree-ssa-math-opts.c: Update tree_pass descriptors. * tree-ssa-dom.c: Update tree_pass descriptors. * tree-nrv.c: Update tree_pass descriptors. * tree-ssa-alias.c: Update tree_pass descriptors. * loop-init.c: Update tree_pass descriptors. * gimple-low.c: Update tree_pass descriptors. * ipa-inline.c: Update tree_pass descriptors. * tree-ssa-sink.c: Update tree_pass descriptors. * global.c: Update tree_pass descriptors. * ifcvt.c: Update tree_pass descriptors. * jump.c: Update tree_pass descriptors. * predict.c: Update tree_pass descriptors. * tree-ssa-loop.c: Update tree_pass descriptors. * recog.c: Update tree_pass descriptors. * dse.c: Update tree_pass descriptors. * tree-ssa-ifcombine.c: Update tree_pass descriptors. * tree-eh.c: Update tree_pass descriptors. * regmove.c: Update tree_pass descriptors. * local-alloc.c * function.c: Update tree_pass descriptors. * tree-vectorizer.c: Update tree_pass descriptors. * gcse.c: Update tree_pass descriptors. * ipa-type-escape.c: Update tree_pass descriptors. * tree-if-conv.c: Update tree_pass descriptors. * init-regs.c: Update tree_pass descriptors. * ipa.c: Update tree_pass descriptors. * tree-ssa-phiopt.c: Update tree_pass descriptors. * rtl-factoring.c: Update tree_pass descriptors. * lower-subreg.c: Update tree_pass descriptors. * bt-load.c: Update tree_pass descriptors. * tree-dfa.c: Update tree_pass descriptors. * except.c: Update tree_pass descriptors. * emit-rtl.c: Update tree_pass descriptors. * cfgexpand.c: Update tree_pass descriptors. * tree-cfgcleanup.c: Update tree_pass descriptors. * cfgcleanup.c: Update tree_pass descriptors. * tree-ssa-pre.c: Update tree_pass descriptors. * tree-sra.c: Update tree_pass descriptors. * tree-mudflap.c: Update tree_pass descriptors. * tree-ssa-copy.c: Update tree_pass descriptors. * cfglayout.c: Update tree_pass descriptors. * tree-ssa-forwprop.c: Update tree_pass descriptors. * tree-ssa-dce.c: Update tree_pass descriptors. * tree-ssa.c: Update tree_pass descriptors. * regclass.c: Update tree_pass descriptors. * integrate.c: Update tree_pass descriptors. * tree-optimize.c: Update tree_pass descriptors. * tree-ssa-phiprop.c: Update tree_pass descriptors. * tree-object-size.c: Update tree_pass descriptors. * combine.c: Update tree_pass descriptors. * tree-outof-ssa.c: Update tree_pass descriptors. * bb-reorder.c: Update tree_pass descriptors. * stack-ptr-mod.c: Update tree_pass descriptors. * var-tracking.c: Update tree_pass descriptors. * tree-profile.c: Update tree_pass descriptors. * tree-vect-generic.c: Update tree_pass descriptors. * reg-stack.c: Update tree_pass descriptors. * sched-rgn.c: Update tree_pass descriptors. * tree-ssa-structalias.c: Update tree_pass descriptors. * tree-cfg.c: Update tree_pass descriptors. * passes.c (current_pass): Update declaration. (finish_optimization_passes): Update. (all_passes, all_ipa_passes, all_lowering_passes): Update declaration. (register_one_dump_file, register_dump_files_1, next_pass_1): Update arguments. (init_optimization_passes): Update handling of new types. (execute_one_pass, execute_pass_list, execute_ipa_pass_list): Update. * ipa-struct-reorg.c: Update tree_pass descriptors. * tree-ssa-reassoc.c: Update tree_pass descriptors. * combine-stack-adj.c: Update tree_pass descriptors. * cfgrtl.c: Update tree_pass descriptors. * dce.c: Update tree_pass descriptors. * tree-ssanames.c: Update tree_pass descriptors. From-SVN: r133342
2008-03-19 12:22:40 +01:00
TODO_dump_cgraph | TODO_dump_func /* todo_flags_finish */
}
};