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]

Constant registers


I'm seeing on the alpha sequences such as:

(insn 298 295 299 (set (reg:SI 154)
        (const_int 983040 [0xf0000])) 197 {reload_inqi_help-8} (nil)
    (expr_list:REG_EQUAL (const_int 983040 [0xf0000])
        (nil)))

(insn 299 298 301 (set (reg:DI 155)
        (plus:DI (subreg:DI (reg:SI 154) 0)
            (const_int 16959 [0x423f]))) 4 {*lda} (nil)
    (expr_list:REG_EQUAL (const_int 999999 [0xf423f])
        (nil)))

(insn 301 299 302 (set (subreg:DI (reg:SI 153) 0)
        (reg:DI 155)) 204 {reload_inqi_help-1} (nil)
    (nil))

(insn 302 301 304 (set (reg:DI 156)
        (sign_extend:DI (reg:SI 153))) 1 {*lda-3} (nil)
    (nil))

where (reg:DI 156) is only set once in the function and is
never clobbered.  It's useful for VRP to know that such a
register is constant so I'm looking to put together a
routine (mark_constant_registers) which sets RTX_UNCHANGING_P.

1) Any obvious problems with doing so?

2) Is this useful information for other passes?

3) Should mark_constant_register be called from reg_scan
   & life_analysis, or should I just call it prior to VRP?
  
-- John
-------------------------------------------------------------------------
|   Feith Systems  |   Voice: 1-215-646-8000  |  Email: john@feith.com  |
|    John Wehle    |     Fax: 1-215-540-5495  |                         |
-------------------------------------------------------------------------


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