ddbd543924
2006-03-16 Maxim Kuvyrkov <mkuvyrkov@ispras.ru> Andrey Belevantsev <abel@ispras.ru> * ddg.c (build_intra_loop_deps): Adjust add_forward_dependence call. * lists.c (unused_deps_list): New variable. (free_list): Add assertions to verify the proper distinguishing between INSN_LISTs and DEPS_LISTs. (find_list_elem, remove_list_elem, remove_list_node): New static functions. (alloc_DEPS_LIST, free_DEPS_LIST, free_DEPS_LIST_node, remove_free_INSN_LIST_elem, remove_free_DEPS_LIST_elem, remove_free_INSN_LIST_node, remove_free_DEPS_LIST_node): New functions. (alloc_INSN_LIST): Assert that the list we're working on is indeed an INSN_LIST. (free_INSN_LIST_node): Likewise. * modulo-sched.c (current_sched_info): Initialize flags field. * reg-notes.def: Exchange DEP_ANTI and DEP_OUTPUT. * rtl.def (DEPS_LIST): Define. * rtl.h: Declare new functions from lists.c. * sched-deps.c (spec_dependency_cache): New static variable. (maybe_add_or_update_back_dep_1, add_back_dep): New static functions. (add_dependence): Change return type to void. Move the logic to ... (add_or_update_back_dep_1): ... here. Handle speculative dependencies. (delete_all_dependences): Add comment about forward_dependency_cache. Handle spec_dependency_cache. Handle DEPS_LISTs. (fixup_sched_groups): Clarify the change of priority of output and anti dependencies. (sched_analyze_2): Adjust add_dependence calls to create data speculative dependence. (add_forward_dependence): Renamed to add_forw_dep, change prototype. Adjust all callers. Handle DEPS_LISTS. (compute_forward_dependences): Use add_forw_dep. Sort LOG_LINKs in presence of speculation. (init_dependency_caches, free_dependency_caches): Handle spec_dependency_cache. (adjust_add_sorted_back_dep, adjust_back_add_forw_dep, delete_forw_dep, estimate_dep_weak, get_dep_weak, ds_merge, check_dep_status): New static functions. (add_or_update_back_dep, add_or_update_back_forw_dep, add_back_forw_dep, delete_back_forw_dep): New functions. * sched-int.h (ds_t, dw_t): New typedefs. (struct sched_info): Add new field flags. (struct haifa_insn_data): Add new bitfield has_internal_dep. Prototype new sched-deps.c functions. (HAS_INTERNAL_DEP, DEP_STATUS): New access macros. (BITS_PER_DEP_STATUS, BITS_PER_DEP_WEAK, DEP_WEAK_MASK, MAX_DEP_WEAK, MIN_DEP_WEAK, NO_DEP_WEAK, UNCERTAIN_DEP_WEAK, BEGIN_DATA, BE_IN_DATA, BEGIN_CONTROL, BE_IN_CONTROL, BEGIN_SPEC, DATA_SPEC, CONTROL_SPEC, SPECULATIVE, BE_IN_SPEC, FIRST_SPEC_TYPE, LAST_SPEC_TYPE, SPEC_TYPE_SHIFT, DEP_TRUE, DEP_OUTPUT, DEP_ANTI, DEP_TYPES, HARD_DEP): New constants. (enum SPEC_TYPES_OFFSETS, enum DEPS_ADJUST_RESULT, enum SCHED_FLAGS): New enums. * sched-rgn.c (current_sched_info): Initialize flags field. (schedule_insns): Initialize current_sched_info before the sched_init call. * sched-ebb.c (current_sched_info): Initialize flags field. (add_deps_for_risky_insns): Use control_flow_insn_p instead of JUMP_P. Call add_or_update_back_dep instead of add_dependence. Create control speculative dependencies. (schedule_insns): Initialize current_sched_info before the sched_init call. Co-Authored-By: Andrey Belevantsev <abel@ispras.ru> From-SVN: r112125
166 lines
6.8 KiB
Modula-2
166 lines
6.8 KiB
Modula-2
/* Register note definitions.
|
|
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
|
|
|
|
This file is part of GCC.
|
|
|
|
GCC is free software; you can redistribute it and/or modify it under
|
|
the terms of the GNU General Public License as published by the Free
|
|
Software Foundation; either version 2, or (at your option) any later
|
|
version.
|
|
|
|
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with GCC; see the file COPYING. If not, write to the Free
|
|
Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
|
|
02110-1301, USA. */
|
|
|
|
/* This file defines all the codes that may appear on individual
|
|
EXPR_LIST rtxes in the REG_NOTES chain of an insn. The codes are
|
|
stored in the mode field of the EXPR_LIST. Source files define
|
|
DEF_REG_NOTE appropriately before including this file. */
|
|
|
|
/* Shorthand. */
|
|
#define REG_NOTE(NAME) DEF_REG_NOTE (REG_##NAME)
|
|
|
|
/* REG_DEP_TRUE is used in LOG_LINKS to represent a read-after-write
|
|
dependency (i.e. a true data dependency). This is here, not
|
|
grouped with REG_DEP_ANTI and REG_DEP_OUTPUT, because some passes
|
|
use a literal 0 for it. */
|
|
REG_NOTE (DEP_TRUE)
|
|
|
|
/* The value in REG dies in this insn (i.e., it is not needed past
|
|
this insn). If REG is set in this insn, the REG_DEAD note may,
|
|
but need not, be omitted. */
|
|
REG_NOTE (DEAD)
|
|
|
|
/* The REG is autoincremented or autodecremented in this insn. */
|
|
REG_NOTE (INC)
|
|
|
|
/* Describes the insn as a whole; it says that the insn sets a
|
|
register to a constant value or to be equivalent to a memory
|
|
address. If the register is spilled to the stack then the constant
|
|
value should be substituted for it. The contents of the REG_EQUIV
|
|
is the constant value or memory address, which may be different
|
|
from the source of the SET although it has the same value. A
|
|
REG_EQUIV note may also appear on an insn which copies a register
|
|
parameter to a pseudo-register, if there is a memory address which
|
|
could be used to hold that pseudo-register throughout the function. */
|
|
REG_NOTE (EQUIV)
|
|
|
|
/* Like REG_EQUIV except that the destination is only momentarily
|
|
equal to the specified rtx. Therefore, it cannot be used for
|
|
substitution; but it can be used for cse. */
|
|
REG_NOTE (EQUAL)
|
|
|
|
/* This insn copies the return-value of a library call out of the hard
|
|
reg for return values. This note is actually an INSN_LIST and it
|
|
points to the first insn involved in setting up arguments for the
|
|
call. flow.c uses this to delete the entire library call when its
|
|
result is dead. */
|
|
REG_NOTE (RETVAL)
|
|
|
|
/* The inverse of REG_RETVAL: it goes on the first insn of the library
|
|
call and points at the one that has the REG_RETVAL. This note is
|
|
also an INSN_LIST. */
|
|
REG_NOTE (LIBCALL)
|
|
|
|
/* The register is always nonnegative during the containing loop.
|
|
This is used in branches so that decrement and branch instructions
|
|
terminating on zero can be matched. There must be an insn pattern
|
|
in the md file named `decrement_and_branch_until_zero' or else this
|
|
will never be added to any instructions. */
|
|
REG_NOTE (NONNEG)
|
|
|
|
/* There is no conflict *after this insn* between the register in the
|
|
note and the destination of this insn. */
|
|
REG_NOTE (NO_CONFLICT)
|
|
|
|
/* Identifies a register set in this insn and never used. */
|
|
REG_NOTE (UNUSED)
|
|
|
|
/* REG_CC_SETTER and REG_CC_USER link a pair of insns that set and use
|
|
CC0, respectively. Normally, these are required to be consecutive
|
|
insns, but we permit putting a cc0-setting insn in the delay slot
|
|
of a branch as long as only one copy of the insn exists. In that
|
|
case, these notes point from one to the other to allow code
|
|
generation to determine what any require information and to
|
|
properly update CC_STATUS. These notes are INSN_LISTs. */
|
|
REG_NOTE (CC_SETTER)
|
|
REG_NOTE (CC_USER)
|
|
|
|
/* Points to a CODE_LABEL. Used by non-JUMP_INSNs to say that the
|
|
CODE_LABEL contained in the REG_LABEL note is used by the insn.
|
|
This note is an INSN_LIST. */
|
|
REG_NOTE (LABEL)
|
|
|
|
/* REG_DEP_ANTI and REG_DEP_OUTPUT are used in LOG_LINKS to represent
|
|
write-after-read and write-after-write dependencies respectively. */
|
|
REG_NOTE (DEP_OUTPUT)
|
|
REG_NOTE (DEP_ANTI)
|
|
|
|
/* REG_BR_PROB is attached to JUMP_INSNs and CALL_INSNs. It has an
|
|
integer value. For jumps, it is the probability that this is a
|
|
taken branch. For calls, it is the probability that this call
|
|
won't return. */
|
|
REG_NOTE (BR_PROB)
|
|
|
|
/* REG_VALUE_PROFILE is attached when the profile is read in to an
|
|
insn before that the code to profile the value is inserted. It
|
|
contains the results of profiling. */
|
|
REG_NOTE (VALUE_PROFILE)
|
|
|
|
/* Attached to a call insn; indicates that the call is malloc-like and
|
|
that the pointer returned cannot alias anything else. */
|
|
REG_NOTE (NOALIAS)
|
|
|
|
/* REG_BR_PRED is attached to JUMP_INSNs and CALL_INSNSs. It contains
|
|
CONCAT of two integer value. First specifies the branch predictor
|
|
that added the note, second specifies the predicted hitrate of
|
|
branch in the same format as REG_BR_PROB note uses. */
|
|
REG_NOTE (BR_PRED)
|
|
|
|
/* Attached to insns that are RTX_FRAME_RELATED_P, but are too complex
|
|
for DWARF to interpret what they imply. The attached rtx is used
|
|
instead of intuition. */
|
|
REG_NOTE (FRAME_RELATED_EXPR)
|
|
|
|
/* Indicates that REG holds the exception context for the function.
|
|
This context is shared by inline functions, so the code to acquire
|
|
the real exception context is delayed until after inlining. */
|
|
REG_NOTE (EH_CONTEXT)
|
|
|
|
/* Indicates what exception region an INSN belongs in. This is used
|
|
to indicate what region to which a call may throw. REGION 0
|
|
indicates that a call cannot throw at all. REGION -1 indicates
|
|
that it cannot throw, nor will it execute a non-local goto. */
|
|
REG_NOTE (EH_REGION)
|
|
|
|
/* Used by haifa-sched to save NOTE_INSN notes across scheduling. */
|
|
REG_NOTE (SAVE_NOTE)
|
|
|
|
/* Indicates that this insn (which is part of the prologue) computes a
|
|
value which might not be used later, and if so it's OK to delete
|
|
the insn. Normally, deleting any insn in the prologue is an error.
|
|
At present the parameter is unused and set to (const_int 0). */
|
|
REG_NOTE (MAYBE_DEAD)
|
|
|
|
/* Indicates that a call does not return. */
|
|
REG_NOTE (NORETURN)
|
|
|
|
/* Indicates that an indirect jump is a non-local goto instead of a
|
|
computed goto. */
|
|
REG_NOTE (NON_LOCAL_GOTO)
|
|
|
|
/* Indicates that a jump crosses between hot and cold sections in a
|
|
(partitioned) assembly or .o file, and therefore should not be
|
|
reduced to a simpler jump by optimizations. */
|
|
REG_NOTE (CROSSING_JUMP)
|
|
|
|
/* This kind of note is generated at each to `setjmp', and similar
|
|
functions that can return twice. */
|
|
REG_NOTE (SETJMP)
|