This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: LTO inlining of transactional builtins
On 2012-06-22 06:08, Richard Guenther wrote:
> Do I understand correctly that inlining the builtin at expansion time is not
> good because the implementation detail may depend on how libitm was
> configured?
More or less, yes.
We want tm in gcc to be useful to researchers experimenting in the area.
That means not building stuff into the main compiler beyond the ABI.
The ABI is just a function call.
However, in some implementations (including our own) the ABI call is a
small wrapper that calls a function in a dispatch table. Avoiding the
call-to-call at least in static linking situations is more or less
exactly what LTO does best.
Unfortunately, we have a real phase ordering problem here. LTO is also
what gives us the visibility into the program itself and allows us to
clone functions for tm based on what's in the transaction.
r~