ipa-pure-const.c (propagate_pure_const, [...]): Do not modify inline clones.

* ipa-pure-const.c (propagate_pure_const, propagate_nothrow):
	Do not modify inline clones.

From-SVN: r208830
This commit is contained in:
Jan Hubicka 2014-03-26 03:07:51 +01:00 committed by Jan Hubicka
parent 72731c33b1
commit d7636f5609
2 changed files with 46 additions and 31 deletions

View File

@ -1,3 +1,8 @@
2014-03-25 Jan Hubicka <hubicka@ucw.cz>
* ipa-pure-const.c (propagate_pure_const, propagate_nothrow):
Do not modify inline clones.
2014-03-25 Jakub Jelinek <jakub@redhat.com> 2014-03-25 Jakub Jelinek <jakub@redhat.com>
* config/i386/i386.md (general_sext_operand): New mode attr. * config/i386/i386.md (general_sext_operand): New mode attr.

View File

@ -1327,6 +1327,10 @@ propagate_pure_const (void)
w_l->pure_const_state = this_state; w_l->pure_const_state = this_state;
w_l->looping = this_looping; w_l->looping = this_looping;
/* Inline clones share declaration with their offline copies;
do not modify their declarations since the offline copy may
be different. */
if (!w->global.inlined_to)
switch (this_state) switch (this_state)
{ {
case IPA_CONST: case IPA_CONST:
@ -1447,12 +1451,18 @@ propagate_nothrow (void)
{ {
funct_state w_l = get_function_state (w); funct_state w_l = get_function_state (w);
if (!can_throw && !TREE_NOTHROW (w->decl)) if (!can_throw && !TREE_NOTHROW (w->decl))
{
/* Inline clones share declaration with their offline copies;
do not modify their declarations since the offline copy may
be different. */
if (!w->global.inlined_to)
{ {
cgraph_set_nothrow_flag (w, true); cgraph_set_nothrow_flag (w, true);
if (dump_file) if (dump_file)
fprintf (dump_file, "Function found to be nothrow: %s\n", fprintf (dump_file, "Function found to be nothrow: %s\n",
w->name ()); w->name ());
} }
}
else if (can_throw && !TREE_NOTHROW (w->decl)) else if (can_throw && !TREE_NOTHROW (w->decl))
w_l->can_throw = true; w_l->can_throw = true;
w_info = (struct ipa_dfs_info *) w->aux; w_info = (struct ipa_dfs_info *) w->aux;