rtl to asm conversion in scheduler

Paolo Bonzini paolo.bonzini@lu.unisi.ch
Mon Sep 18 10:59:00 GMT 2006


> 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



More information about the Gcc mailing list