OSDN Git Service

* unroll.c: Removed.
[pf3gnuchains/gcc-fork.git] / gcc / rtl.h
index 0b75b99..d96b3d4 100644 (file)
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -722,146 +722,12 @@ do {                             \
 
 #define REG_NOTES(INSN)        XEXP(INSN, 8)
 
-/* Don't forget to change reg_note_name in rtl.c.  */
 enum reg_note
 {
-  /* 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_DEAD = 1,
-
-  /* The REG is autoincremented or autodecremented.  */
-  REG_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_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_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_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_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_NONNEG,
-
-  /* There is no conflict *after this insn* between the register in the note
-     and the destination of this insn.  */
-  REG_NO_CONFLICT,
-
-  /* Identifies a register set in this insn and never used.  */
-  REG_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_CC_SETTER, REG_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_LABEL,
-
-  /* REG_DEP_ANTI and REG_DEP_OUTPUT are used in LOG_LINKS to represent
-     write-after-read and write-after-write dependencies respectively.
-     Data dependencies, which are the only type of LOG_LINK created by
-     flow, are represented by a 0 reg note kind.  */
-  REG_DEP_ANTI, REG_DEP_OUTPUT,
-
-  /* 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_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_VALUE_PROFILE,
-
-  /* Attached to a call insn; indicates that the call is malloc-like and
-     that the pointer returned cannot alias anything else.  */
-  REG_NOALIAS,
-
-  /* Used to optimize rtl generated by dynamic stack allocations for targets
-     where SETJMP_VIA_SAVE_AREA is true.  */
-  REG_SAVE_AREA,
-
-  /* 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_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_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_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_EH_REGION,
-
-  /* Used by haifa-sched to save NOTE_INSN notes across scheduling.  */
-  REG_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_MAYBE_DEAD,
-
-  /* Indicates that a call does not return.  */
-  REG_NORETURN,
-
-  /* Indicates that an indirect jump is a non-local goto instead of a
-     computed goto.  */
-  REG_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_CROSSING_JUMP,
-
-  /* This kind of note is generated at each to `setjmp',
-     and similar functions that can return twice.  */
-  REG_SETJMP,
-
-  /* Indicate calls that always returns.  */
-  REG_ALWAYS_RETURN
+#define DEF_REG_NOTE(NAME) NAME,
+#include "reg-notes.def"
+#undef DEF_REG_NOTE
+  REG_NOTE_MAX
 };
 
 /* The base value for branch probability notes.  */
@@ -922,7 +788,6 @@ extern const char * const reg_note_name[];
 #define NOTE_BASIC_BLOCK(INSN) XCBBDEF (INSN, 4, NOTE)
 #define NOTE_EXPECTED_VALUE(INSN) XCEXP (INSN, 4, NOTE)
 #define NOTE_PREDICTION(INSN)   XCINT (INSN, 4, NOTE)
-#define NOTE_PRECONDITIONED(INSN)   XCINT (INSN, 4, NOTE)
 #define NOTE_VAR_LOCATION(INSN)        XCEXP (INSN, 4, NOTE)
 
 /* In a NOTE that is a line number, this is the line number.
@@ -944,93 +809,24 @@ extern const char * const reg_note_name[];
                                                 0, VAR_LOCATION))
 #define NOTE_VAR_LOCATION_LOC(INSN)    (XCEXP (XCEXP (INSN, 4, NOTE),  \
                                                1, VAR_LOCATION))
-  
-/* Codes that appear in the NOTE_LINE_NUMBER field
-   for kinds of notes that are not line numbers.
 
+/* Codes that appear in the NOTE_LINE_NUMBER field for kinds of notes
+   that are not line numbers.  These codes are all negative.
+   
    Notice that we do not try to use zero here for any of
    the special note codes because sometimes the source line
    actually can be zero!  This happens (for example) when we
    are generating code for the per-translation-unit constructor
-   and destructor routines for some C++ translation unit.
-
-   If you should change any of the following values, or if you
-   should add a new value here, don't forget to change the
-   note_insn_name array in rtl.c.  */
+   and destructor routines for some C++ translation unit.  */
 
 enum insn_note
 {
   /* Keep all of these numbers negative.  Adjust as needed.  */
   NOTE_INSN_BIAS = -100,
 
-  /* This note is used to get rid of an insn
-     when it isn't safe to patch the insn out of the chain.  */
-  NOTE_INSN_DELETED,
-
-  /* These are used to mark the beginning and end of a lexical block.
-     See NOTE_BLOCK and reorder_blocks.  */
-  NOTE_INSN_BLOCK_BEG,
-  NOTE_INSN_BLOCK_END,
-
-  /* These mark the extremes of a loop.  */
-  NOTE_INSN_LOOP_BEG,
-  NOTE_INSN_LOOP_END,
-
-  /* Generated at the place in a loop that `continue' jumps to.  */
-  NOTE_INSN_LOOP_CONT,
-  /* Generated at the start of a duplicated exit test.  */
-  NOTE_INSN_LOOP_VTOP,
-
-  /* Mark that a block shouldn't be scheduled.  This is currently
-     used in modulo scheduling. Modulo scheduling  adds this note
-     to the blocks of the modulo-scheduled loops to disable scheduling
-     them in the later traditional scheduling passes.  */
-  NOTE_DISABLE_SCHED_OF_BLOCK,
-
-  /* This kind of note is generated at the end of the function body,
-     just before the return insn or return label.  In an optimizing
-     compilation it is deleted by the first jump optimization, after
-     enabling that optimizer to determine whether control can fall
-     off the end of the function body without a return statement.  */
-  NOTE_INSN_FUNCTION_END,
-
-  /* This marks the point immediately after the last prologue insn.  */
-  NOTE_INSN_PROLOGUE_END,
-
-  /* This marks the point immediately prior to the first epilogue insn.  */
-  NOTE_INSN_EPILOGUE_BEG,
-
-  /* Generated in place of user-declared labels when they are deleted.  */
-  NOTE_INSN_DELETED_LABEL,
-
-  /* This note indicates the start of the real body of the function,
-     i.e. the point just after all of the parms have been moved into
-     their homes, etc.  */
-  NOTE_INSN_FUNCTION_BEG,
-
-  /* These note where exception handling regions begin and end.
-     Uses NOTE_EH_HANDLER to identify the region in question.  */
-  NOTE_INSN_EH_REGION_BEG,
-  NOTE_INSN_EH_REGION_END,
-
-  /* Generated whenever a duplicate line number note is output.  For example,
-     one is output after the end of an inline function, in order to prevent
-     the line containing the inline call from being counted twice in gcov.  */
-  NOTE_INSN_REPEATED_LINE_NUMBER,
-
-  /* Record the struct for the following basic block.  Uses NOTE_BASIC_BLOCK.  */
-  NOTE_INSN_BASIC_BLOCK,
-
-  /* Record the expected value of a register at a location.  Uses
-     NOTE_EXPECTED_VALUE; stored as (eq (reg) (const_int)).  */
-  NOTE_INSN_EXPECTED_VALUE,
-
-  /* Record that the current basic block is unlikely to be executed and
-     should be moved to the UNLIKELY_EXECUTED_TEXT_SECTION.  */
-  NOTE_INSN_UNLIKELY_EXECUTED_CODE,
-
-  /* The location of a variable.  */
-  NOTE_INSN_VAR_LOCATION,
+#define DEF_INSN_NOTE(NAME) NAME,
+#include "insn-notes.def"
+#undef DEF_INSN_NOTE
 
   NOTE_INSN_MAX
 };
@@ -2117,8 +1913,10 @@ extern int rtx_to_tree_code (enum rtx_code);
 
 /* In cse.c */
 extern int delete_trivially_dead_insns (rtx, int);
-extern int cse_main (rtx, int, int, FILE *);
+extern int cse_main (rtx, int, FILE *);
 extern void cse_condition_code_reg (void);
+extern int exp_equiv_p (rtx, rtx, int, bool);
+extern unsigned hash_rtx (rtx x, enum machine_mode, int *, int *, bool);
 
 /* In jump.c */
 extern int comparison_dominates_p (enum rtx_code, enum rtx_code);
@@ -2193,6 +1991,7 @@ extern rtx unlink_insn_chain (rtx, rtx);
 extern rtx delete_insn_and_edges (rtx);
 extern void delete_insn_chain_and_edges (rtx, rtx);
 extern rtx gen_lowpart_SUBREG (enum machine_mode, rtx);
+extern rtx gen_const_mem (enum machine_mode, rtx);
 
 /* In combine.c */
 extern int combine_instructions (rtx, unsigned int);
@@ -2265,7 +2064,9 @@ extern bool can_copy_p (enum machine_mode);
 extern rtx fis_get_condition (rtx);
 extern int gcse_main (rtx, FILE *);
 extern int bypass_jumps (FILE *);
-extern void gcse_after_reload_main (rtx, FILE *);
+
+/* In postreload-gcse.c */
+extern void gcse_after_reload_main (rtx);
 
 /* In global.c */
 extern void mark_elimination (int, int);
@@ -2345,20 +2146,10 @@ struct md_constant { char *name, *value; };
 
 /* In read-rtl.c */
 extern int read_skip_spaces (FILE *);
-extern rtx read_rtx (FILE *);
+extern bool read_rtx (FILE *, rtx *, int *);
 extern const char *read_rtx_filename;
 extern int read_rtx_lineno;
 
-/* Redefine abort to report an internal error w/o coredump, and
-   reporting the location of the error in the source file.  This logic
-   is duplicated in rtl.h and tree.h because every file that needs the
-   special abort includes one or both.  toplev.h gets too few files,
-   system.h gets too many.  */
-
-extern void fancy_abort (const char *, int, const char *)
-    ATTRIBUTE_NORETURN;
-#define abort() fancy_abort (__FILE__, __LINE__, __FUNCTION__)
-
 /* In alias.c */
 extern void clear_reg_alias_info (rtx);
 extern rtx canon_rtx (rtx);