This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: [PATCH] Fix PR ipa/61190, updated


Hi Honza,

On Mon, 24 Nov 2014 16:57:42 +0100, Jan Hubicka wrote:
>
> +cgraph_node::call_for_symbol_thunks_and_aliases_1 (bool (*callback)
> + (cgraph_node *, void *),
> + void *data,
> + bool include_overwritable,
> + bool exclude_virtual_thunks)
>
> Instead of adding _1 variant into public API, please just add implicit agrumnet
> bool exclude_virtual_thunks=false into
> +cgraph_node::call_for_symbol_thunks_and_aliases

Ok, done.

> Index: gcc/ipa-pure-const.c
> ===================================================================
> --- gcc/ipa-pure-const.c (revision 215888)
> +++ gcc/ipa-pure-const.c (working copy)
> @@ -744,6 +744,8 @@ analyze_function (struct cgraph_node *fn, bool ipa
> {
> /* Thunk gets propagated through, so nothing interesting happens. */
> gcc_assert (ipa);
> + if (fn->thunk.virtual_offset_p)
> + l->pure_const_state = IPA_NEITHER;
> return l;
> }
>

Hmm, I looked again at the above if statement, and I think now it should
better be "if (fn->thunk.thunk_p && fn->thunk.virtual_offset_p)", because
thunk.virtual_offset_p is probably not well defined if we come here because
of fn->alias == true.

> This makes the lattice to be initialized correctly, but you also need the
> function_symbol calls that will skip thunks replaced by
> something like function_or_non_virtual_thunk_symbol.
>

Oh, I see what you mean, thanks.

I created a new method function_or_virtual_thunk_symbol() for this.
And simplified the algorithm of both function_symbol variants a bit.

Attached, you'll find my updated patch for review.

Boot-strapped and regression tested on x86_64-linux-gnu.
OK for trunk?


Thanks
Bernd.

> Can you, please, send the updated patch?
> Sorry for late review,
> Honza
>

 		 	   		  

Attachment: changelog-pr61190.txt
Description: Text document

Attachment: patch-pr61190.diff
Description: Binary data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]