From: Sebastian Huber <sebastian.huber@embedded-brains.de>
To: Richard Biener <richard.guenther@gmail.com>
Cc: GCC Development <gcc@gcc.gnu.org>
Subject: Re: -fprofile-update=atomic vs. 32-bit architectures
Date: Tue, 8 Nov 2022 13:00:21 +0100 [thread overview]
Message-ID: <0b401a57-45f4-6a92-6073-54612a2e0add@embedded-brains.de> (raw)
In-Reply-To: <CAFiYyc01jSf0Acq_j4+ymPtrbOMkxTaAh=HyT5O4oZWX3_B7=Q@mail.gmail.com>
On 08.11.22 11:25, Richard Biener wrote:
>> How do I get ((unsigned int *) &val) + 1 from tree addr?
>>
>> It would be great to have a code example for the construction of the "if
>> (f()) f();".
> I think for the function above we need to emit __atomic_fetch_add_8,
> not the emulated form because we cannot insert the required control
> flow (if (f()) f()) on an edge. The __atomic_fetch_add_8 should then be
> lowered after the instrumentation took place.
Ok, I am not a compiler expert, so I have just a vague feeling how this
works. I am not sure which piece is responsible for the "lowering" of
this particular __atomic_fetch_add_8. I guess we don't want to split all
__atomic_fetch_add_8 into this if (f()) f(); form?
>
> There's currently no helper to create a diamond so the canonical
> way is to create a GIMPLE_COND, split the block after this stmt,
> split the outgoing edge and then redirect edges to form a half-diamond.
> move_sese_in_condition has most of that CFG manipulation (but
> it performs sth different)
Thanks, I will probably able to do this with a bit trial and error.
--
embedded brains GmbH
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.huber@embedded-brains.de
phone: +49-89-18 94 741 - 16
fax: +49-89-18 94 741 - 08
Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/
next prev parent reply other threads:[~2022-11-08 12:00 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-04 8:27 Sebastian Huber
2022-11-04 9:53 ` Gabriel Paubert
2022-11-04 10:02 ` Sebastian Huber
2022-11-05 11:18 ` Richard Biener
2022-11-08 6:22 ` Sebastian Huber
2022-11-08 10:25 ` Richard Biener
2022-11-08 12:00 ` Sebastian Huber [this message]
2022-11-08 13:52 ` Richard Biener
2022-12-05 7:26 ` Sebastian Huber
2022-12-05 7:44 ` Richard Biener
2022-12-06 13:11 ` Sebastian Huber
2022-12-06 16:08 ` Richard Biener
2022-12-07 8:51 ` Sebastian Huber
2022-12-07 9:09 ` Richard Biener
2022-12-07 9:24 ` Sebastian Huber
2022-12-07 11:49 ` Richard Biener
2022-12-07 9:55 ` Sebastian Huber
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0b401a57-45f4-6a92-6073-54612a2e0add@embedded-brains.de \
--to=sebastian.huber@embedded-brains.de \
--cc=gcc@gcc.gnu.org \
--cc=richard.guenther@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).