tree to rtl conversion optimizations

Johnny Huynh huynh@ugrad.cs.ualberta.ca
Mon May 17 17:58:00 GMT 2004


Sorry if this sounds like a simple question, but I'm not too good at
tracing through all the source yet. During the conversion from tree to
RTL, there seems to be an optimizing step that determines whether
operands should be placed (-O0) in memory and accessed via an offset, or
(-O2) simply placed in registers.

I'd like to know where I can find the code thats making this happen.

ex: .00.rtl dump file:

using -O0:
(insn 141 140 142 (nil) (parallel [
            (set (reg:QF 57)
                (mult:QF (mem/f:QF (plus:QI (reg/f:QI 33
virtual-stack-vars)
                            (const_int 12 [0ch])) [0 q_coef+0 S1 A32])
                    (mem/f:QF (plus:QI (reg/f:QI 33 virtual-stack-vars)
                            (const_int 9 [09h])) [0 left+0 S1 A32])))
            (clobber (reg:CC_NOOV 21 st))
        ]) -1 (nil)
    (nil))

alternatively, with -O2:

(insn 121 120 122 (nil) (parallel [
            (set (reg:QF 58)
                (mult:QF (reg/v:QF 49)
                    (reg/v:QF 46)))
            (clobber (reg:CC_NOOV 21 st))
        ]) -1 (nil)
    (nil))

Thanks,
Johnny



More information about the Gcc mailing list