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]

Dataflow question


   I have a simple loop over the defs of an INSN, looking for the def of a
specific register X:

  struct df_ref **defs;
  for (defs = DF_INSN_DEFS (insn);
       *defs && !rtx_equal_p (DF_REF_REG (*defs), x);
       defs++)
    ;

   It doesn't work because the modes don't match:

(gdb) call debug_rtx (defs[0]->insn)
(insn 9 8 10 2 /tmp/pr3507-3.c:9 (set (reg:CCSO 13 cc)
        (compare:CCSO (reg/v:HI 22 [ a ])
            (reg/v:HI 23 [ b ]))) 269 {*cmphi_ccso} (nil))
(gdb) call debug_rtx (defs[0]->reg)
(reg:CC 13 cc)

   Should I just compare register numbers instead?

-- 
Rask Ingemann Lambertsen
Danish law requires addresses in e-mail to be logged and stored for a year


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