[G]CSE of extended asm statements
Jeffrey A Law
Thu Aug 31 23:09:00 GMT 2000
In message < email@example.com >you write:
> pre_insert_copies() creates the first insn; when I saw that, I didn't
> step any further; we had already decided that the expressions were
> equivalent, when they weren't, since they actually had different
> Or should they be considered equivalent? In this case, we'd have to
> determine the mode to use for the copy register by looking at all
> assignments from the expression, using the widest mode for the copy
> and extracting the appropriate subreg for narrower modes.
Richard and I talked about this a little yesterday.
Neither of us is all that stoked about adding a mode to ASM_OPERANDS,
but it may be the best solution.
*However* there isn't necessarily a single mode that will be
correct for an ASM_OPERANDS expression -- it might have multiple
outputs with different modes for example and since the ASM_OPERANDS
is shared, we can't have different copies of it with different modes.
The reason we believe your patch works is because GCSE only handles
What we were considering is having the ASM_OPERANDS have a mode
if and only if it has a single output. Otherwise we keep it as
We then reject ASM_OPERANDS with VOIDmode as candidates for [G]CSE.
More information about the Gcc-patches