This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Devirtualization dump functions fix
- From: Martin LiÅka <mliska at suse dot cz>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 27 Jun 2014 11:25:39 +0200
- Subject: Re: [PATCH] Devirtualization dump functions fix
- Authentication-results: sourceware.org; auth=none
- References: <53AC19A7 dot 9020907 at suse dot cz> <CAFiYyc2Ocf=gUL-VDcvhba4T_fbmh7nqmcAm-PjvcL-90+np6w at mail dot gmail dot com> <53AC2386 dot 3030309 at suse dot cz> <CAFiYyc0MQAifjA_a=Sqy_gm7W76nGR_Jw2u-yNWEpizr90q=bw at mail dot gmail dot com> <20140626141851 dot GS31640 at tucnak dot redhat dot com> <53AC2DE5 dot 3020607 at suse dot cz> <20140626142910 dot GU31640 at tucnak dot redhat dot com> <53AC4337 dot 4050205 at suse dot cz> <CAFiYyc35WCVf-gVBwjc88nwmWZ0KBnWhRjJyGSi-r5bSR_KGsA at mail dot gmail dot com>
On 06/27/2014 10:38 AM, Richard Biener wrote:
On Thu, Jun 26, 2014 at 5:58 PM, Martin LiÅka <firstname.lastname@example.org> wrote:
On 06/26/2014 04:29 PM, Jakub Jelinek wrote:
On Thu, Jun 26, 2014 at 04:27:49PM +0200, Martin LiÅka wrote:
Well yes - it is of course similar broken in spirit but at least a lot
simpler ;) I'd put a comment there why we do check g for NULL.
But it increases overhead, there are hundreds of gimple_location calls
and most of them will never pass NULL. Can't you simply
do what you do in the inline here in the couple of spots where
the stmt might be NULL?
Sure, do you have any suggestion how should be called such function?
Suggestion: gimple_location_or_unknown ?
gimple_location_safe or gimple_safe_location?
Thanks, there's new patch.
Patch has been tested for Firefox with -flto -fdump-ipa-devirt.
Bootstrap and regression tests have been running.
Ready for trunk after regression tests?
Ok with s/gimple_safe_location/gimple_location_safe/ (I think that's
the more canonical naming - what's a "safe location" after all?)
You are right, gimple_location_safe sounds better.
Patch has been just committed with your change.
2014-06-26 Martin Liska <email@example.com>
* gimple.h (gimple_safe_location): New function introduced.
* cgraphunit.c (walk_polymorphic_call_targets): Usage
of gimple_safe_location replaces gimple_location.
* ipa-devirt.c (ipa_devirt): Likewise.
* ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
* ipa.c (walk_polymorphic_call_targets): Likewise.
* tree-ssa-pre.c (eliminate_dom_walker::before_dom_children): Likewise.