This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: LOG_LINKS field not set because of gcse1 (or fwprop1) pass


On Sun, Aug 13, 2006 at 10:16:02PM +0200, Rask Ingemann Lambertsen wrote:

> Note that right after expand, we have:
> 
> (note 91 90 0 NOTE_INSN_BASIC_BLOCK)
> 
> ;; size = size - 1
> (insn 93 91 96 (set (reg:HI 42)
>         (const_int -1 [0xffffffff])) -1 (nil)
>     (nil))
> 
> (insn 96 93 97 (parallel [
>             (set (reg:HI 43)
>                 (plus:HI (reg/v:HI 32 [ size ])
>                     (reg:HI 42)))
>             (clobber (reg:CC 12 cc))
>         ]) -1 (nil)
>     (nil))
> 
> (insn 97 96 98 (set (reg:HI 43)
>         (reg:HI 43)) -1 (nil)
>     (expr_list:REG_EQUAL (plus:HI (reg/v:HI 32 [ size ])
>             (reg:HI 42))
>         (nil)))

Note that insn 97 is entirely my fault, but ought to be harmless.

> (insn 98 97 0 (set (reg/v:HI 32 [ size ])
>         (reg:HI 43)) -1 (nil)
>     (nil))
> 
> ;; if (size != 0) goto <L0>; else (void) 0;
> (insn 100 98 101 10 (set (reg:HI 44)
>         (const_int 0 [0x0])) -1 (nil)
>     (nil))
> 
> (insn 101 100 102 10 (set (reg:CC 12 cc)
>         (compare:CC (reg/v:HI 32 [ size ])
>             (reg:HI 44))) -1 (nil)
>     (nil))

All other issues aside, the code is being messed up already at expand. For
comparison, arm-elf gets this much better RTL:

(code_label 51 50 52 7 "" [0 uses])

(note 52 51 0 NOTE_INSN_BASIC_BLOCK)

;; size = size - 1
(insn 54 52 0 (set (reg/v:SI 114 [ size ])
        (plus:SI (reg/v:SI 114 [ size ])
            (const_int -1 [0xffffffff]))) -1 (nil)
    (nil))

;; if (size != 0) goto <L0>; else (void) 0;
(insn 56 54 57 (set (reg:CC 24 cc)
        (compare:CC (reg/v:SI 114 [ size ])
            (const_int 0 [0x0]))) -1 (nil)
    (nil))

The RTL from expand for i686-pc-linux-gnu is essentially the same as for
arm-elf.

-- 
Rask Ingemann Lambertsen


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]