This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Question on INSN_P and "real" insns
- From: Georg-Johann Lay <avr at gjlay dot de>
- To: gcc at gcc dot gnu dot org
- Date: Wed, 12 Oct 2011 10:16:52 +0200
- Subject: Question on INSN_P and "real" insns
In rtl.h there is
/* Predicate yielding nonzero iff X is a real insn. */
#define INSN_P(X) \
(NONJUMP_INSN_P (X) || DEBUG_INSN_P (X) || JUMP_P (X) || CALL_P (X))
and in emit-rtl:
/* Return the last INSN, CALL_INSN or JUMP_INSN before INSN;
or 0, if there is none. This routine does not look inside
SEQUENCEs. */
rtx
prev_real_insn (rtx insn)
{
while (insn)
{
insn = PREV_INSN (insn);
if (insn == 0 || INSN_P (insn))
break;
}
return insn;
}
The question for me is now what means "real"?
>From my understanding a "real" insn is an insn that leads to code that will be
executed like INSN, CALL_INSN or JUMP_INSN but not DEBUG_INSN that's used for
location tracking or shipping debug information or CODE_LABEL or whatever.
This means that next_real_insn depends on -g? And that I have to write my own
next really_real_insn?
next_nonnote_nondebug_insn is not what I need (no CODE_LABEL etc.)
Thanks for any hints,
Johann