-fprofile-update=atomic vs. 32-bit architectures
Sebastian Huber
sebastian.huber@embedded-brains.de
Tue Nov 8 12:00:21 GMT 2022
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/
More information about the Gcc
mailing list