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]

RTL flag usage


I'm working on a patch that provides checking versions of the macros
that access RTL flags, to check that the macros are only used with with
expected RTL codes.  At the end of this mail is a list of all codes for
which each access macro is currently used.

  - Are there any surprises in this list?  It's pretty easy for me to
    come up with a list of locations in the compiler where these macros
    are used with particular codes, in case there are specific questions
    about their usage.

  - Should some of these flags be cleared when an rtx is changed to NOTE
    from some other code?  One place in particular that looks suspect is
    ehl_free in except.c; before freeing ENTRY it clears
    LABEL_PRESERVE_P in ENTRY->LABEL, but it's sometimes called with a
    NOTE; does the NOTE still have a label field?

  - There are places in function.c and reload1.c where a REG rtx is
    changed to MEM, but not all of the flags are cleared; should they
    be?  RTX_UNCHANGING_P is used for both REG and MEM; when a REG is
    turned into a MEM, is it supposed to keep the same RTX_UNCHANGING_P
    value?

Part of the patch with the checking macros will be an update to the
"Flags in an RTL Expression" section of the internals manual to fill in
the list of expected RTL codes used with each macro.

Janis

RTX_FRAME_RELATED_P    INSN, CALL_INSN, JUMP_INSN, BARRIER, SET
RTX_INTEGRATED_P       INSN, CALL_INSN, JUMP_INSN, BARRIER, CODE_LABEL, NOTE,
                       INSN_LIST, CONST
INSN_DELETED_P         INSN, CALL_INSN, JUMP_INSN, BARRIER, CODE_LABEL, NOTE
SCHED_GROUP_P          INSN, CALL_INSN, JUMP_INSN, BARRIER, CODE_LABEL, NOTE
INSN_ANNULLED_BRANCH_P INSN
INSN_DEAD_CODE_P       INSN
INSN_FROM_TARGET_P     INSN

CONST_OR_PURE_CALL_P   CALL_INSN, NOTE, EXPR_LIST
SIBLING_CALL_P         CALL_INSN

SUBREG_PROMOTED_VAR_P       SUBREG
SUBREG_PROMOTED_UNSIGNED_P  SUBREG

REG_FUNCTION_VALUE_P   REG
REG_USERVAR_P          REG
REG_POINTER            REG
REG_LOOP_TEST_P        REG

RTX_UNCHANGING_P       REG, MEM

MEM_KEEP_ALIAS_SET_P   MEM
MEM_VOLATILE_P         MEM, ASM_OPERANDS
MEM_IN_STRUCT_P        MEM
MEM_SCALAR_P           MEM

LABEL_OUTSIDE_LOOP_P   LABEL_REF
LABEL_REF_NONLOCAL_P   LABEL_REF, REG_LABEL

LABEL_PRESERVE_P       CODE_LABEL, NOTE

LINK_COST_ZERO         INSN_LIST
LINK_COST_FREE         INSN_LIST

SET_IS_RETURN_P        SET

CONSTANT_POOL_ADDRESS_P  SYMBOL_REF
STRING_POOL_ADDRESS_P    SYMBOL_REF
SYMBOL_REF_FLAG          SYMBOL_REF
SYMBOL_REF_USED          SYMBOL_REF
SYMBOL_REF_WEAK          SYMBOL_REF


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