]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/testsuite/ChangeLog
Indirect inlining of targets from references of global constants
authorMartin Jambor <mjambor@suse.cz>
Wed, 18 May 2016 16:38:56 +0000 (18:38 +0200)
committerMartin Jambor <jamborm@gcc.gnu.org>
Wed, 18 May 2016 16:38:56 +0000 (18:38 +0200)
commit91bb9f80e58963d65a5cd305b438a2d7009cdb09
tree857c7ed3fa77c5bf5bc4f278c87060f145482f7d
parentc584aca60cbface2621ebf1ccc943df1b7af52ca
Indirect inlining of targets from references of global constants

2016-05-18  Martin Jambor  <mjambor@suse.cz>

PR ipa/69708
* cgraph.h (cgraph_indirect_call_info): New field
guaranteed_unmodified.
* ipa-cp.c (ipa_get_indirect_edge_target_1): Also pass parameter value
to ipa_find_agg_cst_for_param, check guaranteed_unmodified when
appropriate.
* ipa-inline-analysis.c (evaluate_conditions_for_known_args): Also
pass the parameter value to ipa_find_agg_cst_for_param.
* ipa-prop.c (ipa_load_from_parm_agg): New parameter
guaranteed_unmodified, store AA results there instead of bailing out
if present.
(ipa_note_param_call): Also initialize guaranteed_unmodified flag.
(ipa_analyze_indirect_call_uses): Also set guaranteed_unmodified flag.
(find_constructor_constant_at_offset): New function.
(ipa_find_agg_cst_from_init): Likewise.
(ipa_find_agg_cst_for_param): Also seearch for aggregate values in
static initializers of contants, report back through a new paameter
from_global_constant if that was the case.
(try_make_edge_direct_simple_call): Also pass parameter value to
ipa_find_agg_cst_for_param, check guaranteed_unmodified when
appropriate.
(ipa_write_indirect_edge_info): Stream new flag guaranteed_unmodified.
(ipa_read_indirect_edge_info): Likewise.
* ipa-prop.h (ipa_find_agg_cst_for_param): Update declaration.
(ipa_load_from_parm_agg): Likewise.

testsuite/
* gcc.dg/ipa/iinline-cstagg-1.c: New test.
* gcc.dg/ipa/ipcp-cstagg-1.c: Likewise.
* gcc.dg/ipa/ipcp-cstagg-2.c: Likewise.
* gcc.dg/ipa/ipcp-cstagg-3.c: Likewise.
* gcc.dg/ipa/ipcp-cstagg-4.c: Likewise.

From-SVN: r236416
12 files changed:
gcc/ChangeLog
gcc/cgraph.h
gcc/ipa-cp.c
gcc/ipa-inline-analysis.c
gcc/ipa-prop.c
gcc/ipa-prop.h
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/ipa/iinline-cstagg-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/ipa/ipcp-cstagg-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/ipa/ipcp-cstagg-2.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/ipa/ipcp-cstagg-3.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/ipa/ipcp-cstagg-4.c [new file with mode: 0644]