This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 1/3] SH-2A FDPIC: New pattern: use_initial_val
On 08/19/2010 11:30 AM, Bernd Schmidt wrote:
>> Looking forward to 3/3, it seems you emit a fancy USE insn, whose
>> purpose appears to be simply to extend the lifetime of the pseudo,
>> without actually using it in a specific pattern.
>
> Yes. It's an unspec which later gets turned into a no-op.
Looking at the split, it really does turn in to a nop insn, not
being optimized away entirely. Is that really intended? If so,
I think that deserves a comment.
What advantage does this unspec have over a (USE reg) insn?
I'm somewhat surprised that a free-floating use or unspec does
what you want better than actually using the pseudo in some
insn pattern that actually requires it. E.g. by adding it to
the CALL_INSN_FUNCTION_USAGE where optimize_mode_switching can
find it.
Can you tell me which part of mode switching ends up requiring
the pseudo? Scanning the 3/3 patch, it's non-obvious.
r~