* [C++ PATCH] Fix up -flifetime-dse=2 clobbers
@ 2016-03-04 20:39 Jakub Jelinek
2016-03-04 21:25 ` Jason Merrill
0 siblings, 1 reply; 2+ messages in thread
From: Jakub Jelinek @ 2016-03-04 20:39 UTC (permalink / raw)
To: Jason Merrill; +Cc: gcc-patches
Hi!
While working on PR70035, I've noticed that the clobbers at the start of
(certain) constructors are strangely emitted twice instead of just once.
The problem is that start_preparsed_function is first called on the
(abstract) constructor and then again on the cloned constructors (base or
complete ctor). And in each case the clobber is emitted.
Fixed by only emitting it on the (abstract) constructor, not on the clones.
Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
2016-03-04 Jakub Jelinek <jakub@redhat.com>
* decl.c (start_preparsed_function): Don't emit start clobber at the
start of constructor clones.
--- gcc/decl.c.jj 2016-03-04 19:35:09.000000000 +0100
+++ gcc/decl.c 2016-03-04 19:38:17.040994718 +0100
@@ -14120,6 +14120,7 @@ start_preparsed_function (tree decl1, tr
if (!processing_template_decl
&& (flag_lifetime_dse > 1)
&& DECL_CONSTRUCTOR_P (decl1)
+ && !DECL_CLONED_FUNCTION_P (decl1)
/* We can't clobber safely for an implicitly-defined default constructor
because part of the initialization might happen before we enter the
constructor, via AGGR_INIT_ZERO_FIRST (c++/68006). */
Jakub
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [C++ PATCH] Fix up -flifetime-dse=2 clobbers
2016-03-04 20:39 [C++ PATCH] Fix up -flifetime-dse=2 clobbers Jakub Jelinek
@ 2016-03-04 21:25 ` Jason Merrill
0 siblings, 0 replies; 2+ messages in thread
From: Jason Merrill @ 2016-03-04 21:25 UTC (permalink / raw)
To: Jakub Jelinek; +Cc: gcc-patches
OK.
Jason
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-03-04 21:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-04 20:39 [C++ PATCH] Fix up -flifetime-dse=2 clobbers Jakub Jelinek
2016-03-04 21:25 ` Jason Merrill
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).