On 9/18/06, Paolo Bonzini <[EMAIL PROTECTED]> wrote:

> Goal: I would need to get the assembly representation for a single
> instruction in haifa-sched.c. The reason for this is that it would be
> important to get the opcode which will be produced by a single
> instruction (ie ADDU or something) for chosing the right candidate in
> the ready-list. For instructions that are represented by patterns
> evaluating to more lines of asm-code it would be necessary to get at
> least the very first and the last opcode. It would be best to have all
> opcodes for sure.

Insns can still be split after scheduling, which makes it a bit
problematic to know which opcode will be produced.

You can use an attribute for that: what most GCC schedulers do is have
an attribute that maps to the functional unit where the instruction
goes, and then define an automaton that specifies the latency, the
length of each functional unit's reservations and so on.  However, I
suggest that you use a newer version because I don't think this
technique was available in 3.2.3 (and the old-style scheduler
descriptions were removed in 4.0 after all the descriptions were upgraded).

Paolo


Thanks for your answer.

Unfortunately I cannot switch to a newer version as I am building a
Crosscompiler for mips with the crosstool-0.42 from Dan Kegel. On my
Host only few versions (all around 3.2.3) can be built.

As you mentionend, insns can still be split after scheduling:
If the opcode that is retrieved is not correct all the time; that
would not be a problem if it still gives 'good' results that are
correct most of the time. If results are differently good for
different programs that would still be fine. The information that is
given by the name of the opcode would be used later on to do analysis
in heuristics and these heuristics are not supposed to give exact
results, but they should show trends.
BTW: I have done manual 'evaluation' of the output patterns in mips.md
by simply hardcoding an array for each of the 335 patterns and mapping
it to opcodes for which i thought that they could be produced by the
pattern, but this does not give results that are 'good enough' for the
heuristics.

So, if there were any macro or anything that tells me which asm or
which asms could come out of an rtx it would be fine.

Any ideas for gcc-3.x (esp. gcc-3.2.3)?

Regards,
 Philipp.
--
Philipp Maria Glatz
student of telematics @ TUGraz
[EMAIL PROTECTED]
[EMAIL PROTECTED]

Reply via email to