diff options
author | Martin Jambor <mjambor@suse.cz> | 2014-06-26 14:55:40 +0200 |
---|---|---|
committer | Martin Jambor <jamborm@gcc.gnu.org> | 2014-06-26 14:55:40 +0200 |
commit | 72972c22ef4823e10ca36dcf1e11142a697c4d23 (patch) | |
tree | b6021efcdb9e13ed7be274aee245255765cd5a1c | |
parent | 906314419f65152482646b66e38d1b3a0ace3762 (diff) | |
download | gcc-72972c22ef4823e10ca36dcf1e11142a697c4d23.zip gcc-72972c22ef4823e10ca36dcf1e11142a697c4d23.tar.gz gcc-72972c22ef4823e10ca36dcf1e11142a697c4d23.tar.bz2 |
ipa-prop.c (ipa_impossible_devirt_target): No longer static, renamed to ipa_impossible_devirt_target.
2014-06-26 Martin Jambor <mjambor@suse.cz>
* ipa-prop.c (ipa_impossible_devirt_target): No longer static,
renamed to ipa_impossible_devirt_target. Fix typo.
* ipa-prop.h (ipa_impossible_devirt_target): Declare.
* ipa-cp.c (ipa_get_indirect_edge_target_1): Use
ipa_impossible_devirt_target.
testsuite/
* g++.dg/ipa/pr60600.C: Fix typo.
* g++.dg/ipa/devirt-25.C: Likewise.
* g++.dg/ipa/pr61540.C: Likewise.
From-SVN: r212028
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/ipa-cp.c | 22 | ||||
-rw-r--r-- | gcc/ipa-prop.c | 12 | ||||
-rw-r--r-- | gcc/ipa-prop.h | 1 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/ipa/devirt-25.C | 2 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/ipa/pr60600.C | 2 |
7 files changed, 25 insertions, 27 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e7ced0c..31712fa 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2014-06-26 Martin Jambor <mjambor@suse.cz> + + * ipa-prop.c (ipa_impossible_devirt_target): No longer static, + renamed to ipa_impossible_devirt_target. Fix typo. + * ipa-prop.h (ipa_impossible_devirt_target): Declare. + * ipa-cp.c (ipa_get_indirect_edge_target_1): Use + ipa_impossible_devirt_target. + 2014-06-26 Richard Biener <rguenther@suse.de> PR tree-optimization/61607 diff --git a/gcc/ipa-cp.c b/gcc/ipa-cp.c index 04e88b5..bc0ab56 100644 --- a/gcc/ipa-cp.c +++ b/gcc/ipa-cp.c @@ -1587,15 +1587,7 @@ ipa_get_indirect_edge_target_1 (struct cgraph_edge *ie, && DECL_FUNCTION_CODE (target) == BUILT_IN_UNREACHABLE) || !possible_polymorphic_call_target_p (ie, cgraph_get_node (target))) - { - if (dump_file) - fprintf (dump_file, - "Type inconsident devirtualization: %s/%i->%s\n", - ie->caller->name (), ie->caller->order, - IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (target))); - target = builtin_decl_implicit (BUILT_IN_UNREACHABLE); - cgraph_get_create_node (target); - } + target = ipa_impossible_devirt_target (ie, target); return target; } } @@ -1629,7 +1621,7 @@ ipa_get_indirect_edge_target_1 (struct cgraph_edge *ie, if (targets.length () == 1) target = targets[0]->decl; else - target = builtin_decl_implicit (BUILT_IN_UNREACHABLE); + target = ipa_impossible_devirt_target (ie, NULL_TREE); } else { @@ -1643,15 +1635,7 @@ ipa_get_indirect_edge_target_1 (struct cgraph_edge *ie, if (target && !possible_polymorphic_call_target_p (ie, cgraph_get_node (target))) - { - if (dump_file) - fprintf (dump_file, - "Type inconsident devirtualization: %s/%i->%s\n", - ie->caller->name (), ie->caller->order, - IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (target))); - target = builtin_decl_implicit (BUILT_IN_UNREACHABLE); - cgraph_get_create_node (target); - } + target = ipa_impossible_devirt_target (ie, target); return target; } diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c index 5f5bf89..1e10b53 100644 --- a/gcc/ipa-prop.c +++ b/gcc/ipa-prop.c @@ -2915,14 +2915,14 @@ try_make_edge_direct_simple_call (struct cgraph_edge *ie, /* Return the target to be used in cases of impossible devirtualization. IE and target (the latter can be NULL) are dumped when dumping is enabled. */ -static tree -impossible_devirt_target (struct cgraph_edge *ie, tree target) +tree +ipa_impossible_devirt_target (struct cgraph_edge *ie, tree target) { if (dump_file) { if (target) fprintf (dump_file, - "Type inconsident devirtualization: %s/%i->%s\n", + "Type inconsistent devirtualization: %s/%i->%s\n", ie->caller->name (), ie->caller->order, IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (target))); else @@ -2969,7 +2969,7 @@ try_make_edge_direct_virtual_call (struct cgraph_edge *ie, && DECL_FUNCTION_CODE (target) == BUILT_IN_UNREACHABLE) || !possible_polymorphic_call_target_p (ie, cgraph_get_node (target))) - target = impossible_devirt_target (ie, target); + target = ipa_impossible_devirt_target (ie, target); return ipa_make_edge_direct_to_target (ie, target); } } @@ -2999,7 +2999,7 @@ try_make_edge_direct_virtual_call (struct cgraph_edge *ie, if (targets.length () == 1) target = targets[0]->decl; else - target = impossible_devirt_target (ie, NULL_TREE); + target = ipa_impossible_devirt_target (ie, NULL_TREE); } else { @@ -3015,7 +3015,7 @@ try_make_edge_direct_virtual_call (struct cgraph_edge *ie, if (target) { if (!possible_polymorphic_call_target_p (ie, cgraph_get_node (target))) - target = impossible_devirt_target (ie, target); + target = ipa_impossible_devirt_target (ie, target); return ipa_make_edge_direct_to_target (ie, target); } else diff --git a/gcc/ipa-prop.h b/gcc/ipa-prop.h index cb23698..8886e93 100644 --- a/gcc/ipa-prop.h +++ b/gcc/ipa-prop.h @@ -586,6 +586,7 @@ tree ipa_get_indirect_edge_target (struct cgraph_edge *ie, struct cgraph_edge *ipa_make_edge_direct_to_target (struct cgraph_edge *, tree); tree ipa_binfo_from_known_type_jfunc (struct ipa_jump_func *); tree ipa_intraprocedural_devirtualization (gimple); +tree ipa_impossible_devirt_target (struct cgraph_edge *, tree); /* Functions related to both. */ void ipa_analyze_node (struct cgraph_node *); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 5266253..ff3d0b0 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2014-06-26 Martin Jambor <mjambor@suse.cz> + + * g++.dg/ipa/pr60600.C: Fix typo. + * g++.dg/ipa/devirt-25.C: Likewise. + 2014-06-26 Richard Biener <rguenther@suse.de> PR tree-optimization/61607 diff --git a/gcc/testsuite/g++.dg/ipa/devirt-25.C b/gcc/testsuite/g++.dg/ipa/devirt-25.C index 387d529..5a8a04f 100644 --- a/gcc/testsuite/g++.dg/ipa/devirt-25.C +++ b/gcc/testsuite/g++.dg/ipa/devirt-25.C @@ -23,5 +23,5 @@ void dpr_run(ebs_Object& objectA) { dpr_Job jobL; dpr_run(jobL); } -/* { dg-final { scan-ipa-dump "Type inconsident devirtualization" "cp" } } */ +/* { dg-final { scan-ipa-dump "Type inconsistent devirtualization" "cp" } } */ /* { dg-final { cleanup-ipa-dump "cp" } } */ diff --git a/gcc/testsuite/g++.dg/ipa/pr60600.C b/gcc/testsuite/g++.dg/ipa/pr60600.C index 00c368e..0753931 100644 --- a/gcc/testsuite/g++.dg/ipa/pr60600.C +++ b/gcc/testsuite/g++.dg/ipa/pr60600.C @@ -30,5 +30,5 @@ void test(top& t) test(d); } -/* { dg-final { scan-ipa-dump "Type inconsident devirtualization" "cp" } } */ +/* { dg-final { scan-ipa-dump "Type inconsistent devirtualization" "cp" } } */ /* { dg-final { cleanup-ipa-dump "cp" } } */ |