* Dataflow question
@ 2007-11-27 18:29 Rask Ingemann Lambertsen
2007-11-27 19:52 ` Paolo Bonzini
0 siblings, 1 reply; 2+ messages in thread
From: Rask Ingemann Lambertsen @ 2007-11-27 18:29 UTC (permalink / raw)
To: gcc
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Dataflow question
2007-11-27 18:29 Dataflow question Rask Ingemann Lambertsen
@ 2007-11-27 19:52 ` Paolo Bonzini
0 siblings, 0 replies; 2+ messages in thread
From: Paolo Bonzini @ 2007-11-27 19:52 UTC (permalink / raw)
To: GCC Development, Rask Ingemann Lambertsen
Rask Ingemann Lambertsen wrote:
> I have a simple loop over the defs of an INSN, looking for the def of a
> specific register X:
>
> Should I just compare register numbers instead?
I think so, or maybe even use reg_overlap_mentioned_p. It depends what
you're doing. For 4.4, it may be worth modifying df_find_def and
df_find_use so that you can just use those.
Paolo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-11-27 18:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-27 18:29 Dataflow question Rask Ingemann Lambertsen
2007-11-27 19:52 ` Paolo Bonzini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).