On 10/08/14 10:04, Richard Sandiford wrote:
Rainer Orth <r...@cebitec.uni-bielefeld.de> writes:
Hi Richard,
Does this work for you? I tested it on x86_64-linux-gnu but obviously
that's not particularly useful for SEQUENCEs.
the patch is fine, as tested on both sparc-sun-solaris2.11 and (for good
measure) i386-pc-solaris2.11.
OK, great.
To recap, the idea is that if PATTERN (insn) is a SEQUENCE:
FOR_EACH_SUBRTX (...., insn, x)
...
should iterate over the insns in the SEQUENCE (including pattern, notes,
jump label, etc.). However:
FOR_EACH_SUBRTX (...., PATTERN (insn), x)
...
should only iterate over the patterns of the insns in the SEQUENCE,
since the user of FOR_EACH_SUBRTX isn't expecting to see things like
REG_NOTES (and might not handle them correctly).
Also tested on x86_64-linux-gnu. OK to install?
Thanks,
Richard
gcc/
* rtlanal.c (generic_subrtx_iterator <T>::add_subrtxes_to_queue):
Add the parts of an insn in reverse order, with the pattern at
the top of the queue. Detect when we're iterating over a SEQUENCE
pattern and in that case just consider patterns of subinstructions.
OK.
jeff