On Wed, May 3, 2017 at 12:16 AM, Daniel Santos <daniel.san...@pobox.com> wrote:

>> I'd recommend that in the predicate, you check match_parallel from the
>> bottom up, since subexpressions on the top are already matched, and
>> you can have different number of subexpressions at the top.
>>
>> Uros.
>
>
> OK, this all makes sense then. I was using const_int tags to differentiate
> the insns, but omitting the insns for the leave (for example) are what
> ambiguates them in the first place.
>
> So one question I never had resolved is rather or not the order the insns in
> a parallel matters.  From your suggestions, I'm guessing that it would be
> perfectly OK for the leave insns to follow use symbol and then have the
> register restores after that, even though that wouldn't make sense from an
> assembly level because we would be writing beyond the stack pointer.  Am I
> reading this correctly?  If so, then putting the register save/restore
> matching in the predicate (checking top down) and having all others in the
> pattern make great sense and should both simplify it and make it more clear.

The order of subexpressions of parallel in general does not matter.

> Also, I'm wondering if there's anything wrong with calling ix86_gen_leave ()
> and plucking the insns out of the generated parallel insn and moving that
> into my own parallel rather than generating them in my own function.  I
> guess all the matters is what is cleanest.

Hm... I'd rather see subexpressions generated "by hand".

Uros.

Reply via email to