This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [trans-mem] RFC Fix missing REG_TM notes
On 01/11/2012 09:29 AM, Patrick Marlier wrote:
> + /* ??? mark only the first call, is it right? */
> + for (insn = get_last_insn ();
> + insn && !CALL_P (insn);
> insn = next_real_insn (insn))
> continue;
FYI, there shall only be one call, surely.
Hmm. I suppose there could be calls to memcpy in the case of
very large structures passed by value (depending on the ABI).
Or indeed, with -ftree-ter rebuilding more complex expressions
we could have any arbitrary libcall.
Also outstanding is that the return value setup for beginTransaction
needs to be adjusted into the new block. I.e. we current generate
(set (reg eax) (call _ITM_beginTransaction))
(set (reg psuedo) (reg eax))
.Lrestart:
// rest of tm block
This must be
(set (reg eax) (call _ITM_beginTransaction))
.Lrestart:
(set (reg psuedo) (reg eax))
// rest of tm block
lest the register allocator do the wrong thing.
r~