Kill RANGE_INFO notes
Jan Hubicka
jh@suse.cz
Tue Jun 4 04:31:00 GMT 2002
Tue Jun 4 13:27:46 CEST 2002 Jan Hubicka <jh@suse.cz>
* cfglayout.c (duplicate_insn_chain): Kill NOTE_INSN_RANGE notes.
* final.c (final_scan_insn): Likewise.
* ggc-common.c (ggc_mark_rtx_children_1): Likewise; use
NOTE_EXPECTED_VALUE instead of NOTE_RANGE.
* haifa-sched.c (unlink_other_notes): Likeewise.
(reemit_notes): Likewise.
* print-rtl.c (print_rtx): Likewise.
* sched-deps (sched-analyze): Likewise.
* rtl.c (note_insn_name): Likewise.
* rtl.h (NOTE_RANGE_INFO, NOTE_LIVE_INFO): Kill.
(enum insn_note): Kill NOTE_INSN_RANGE_*, NOTE_INSN_LIVE.
(RANGE_*): Kill.
Index: cfglayout.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cfglayout.c,v
retrieving revision 1.18
diff -c -3 -p -r1.18 cfglayout.c
*** cfglayout.c 2 Jun 2002 21:09:11 -0000 1.18
--- cfglayout.c 4 Jun 2002 11:23:26 -0000
*************** duplicate_insn_chain (from, to)
*** 779,786 ****
reordering is in the progress. */
case NOTE_INSN_EH_REGION_BEG:
case NOTE_INSN_EH_REGION_END:
- case NOTE_INSN_RANGE_BEG:
- case NOTE_INSN_RANGE_END:
/* Should never exist at BB duplication time. */
abort ();
break;
--- 779,784 ----
Index: final.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/final.c,v
retrieving revision 1.259
diff -c -3 -p -r1.259 final.c
*** final.c 2 Jun 2002 22:23:45 -0000 1.259
--- final.c 4 Jun 2002 11:23:26 -0000
*************** final_scan_insn (insn, file, optimize, p
*** 1997,2005 ****
case NOTE_INSN_LOOP_VTOP:
case NOTE_INSN_FUNCTION_END:
case NOTE_INSN_REPEATED_LINE_NUMBER:
- case NOTE_INSN_RANGE_BEG:
- case NOTE_INSN_RANGE_END:
- case NOTE_INSN_LIVE:
case NOTE_INSN_EXPECTED_VALUE:
break;
--- 1997,2002 ----
Index: ggc-common.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/ggc-common.c,v
retrieving revision 1.51
diff -c -3 -p -r1.51 ggc-common.c
*** ggc-common.c 28 May 2002 17:32:26 -0000 1.51
--- ggc-common.c 4 Jun 2002 11:23:26 -0000
*************** ggc_mark_rtx_children_1 (r)
*** 350,360 ****
case NOTE:
switch (NOTE_LINE_NUMBER (r))
{
- case NOTE_INSN_RANGE_BEG:
- case NOTE_INSN_RANGE_END:
- case NOTE_INSN_LIVE:
case NOTE_INSN_EXPECTED_VALUE:
! ggc_mark_rtx (NOTE_RANGE_INFO (r));
break;
case NOTE_INSN_BLOCK_BEG:
--- 350,357 ----
case NOTE:
switch (NOTE_LINE_NUMBER (r))
{
case NOTE_INSN_EXPECTED_VALUE:
! ggc_mark_rtx (NOTE_EXPECTED_VALUE (r));
break;
case NOTE_INSN_BLOCK_BEG:
Index: haifa-sched.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/haifa-sched.c,v
retrieving revision 1.206
diff -c -3 -p -r1.206 haifa-sched.c
*** haifa-sched.c 29 May 2002 19:55:34 -0000 1.206
--- haifa-sched.c 4 Jun 2002 11:23:27 -0000
*************** unlink_other_notes (insn, tail)
*** 1233,1240 ****
/* See sched_analyze to see how these are handled. */
if (NOTE_LINE_NUMBER (insn) != NOTE_INSN_LOOP_BEG
&& NOTE_LINE_NUMBER (insn) != NOTE_INSN_LOOP_END
- && NOTE_LINE_NUMBER (insn) != NOTE_INSN_RANGE_BEG
- && NOTE_LINE_NUMBER (insn) != NOTE_INSN_RANGE_END
&& NOTE_LINE_NUMBER (insn) != NOTE_INSN_EH_REGION_BEG
&& NOTE_LINE_NUMBER (insn) != NOTE_INSN_EH_REGION_END)
{
--- 1233,1238 ----
*************** reemit_notes (insn, last)
*** 1726,1748 ****
{
enum insn_note note_type = INTVAL (XEXP (note, 0));
! if (note_type == NOTE_INSN_RANGE_BEG
! || note_type == NOTE_INSN_RANGE_END)
! {
! last = emit_note_before (note_type, last);
! remove_note (insn, note);
! note = XEXP (note, 1);
! NOTE_RANGE_INFO (last) = XEXP (note, 0);
! }
! else
! {
! last = emit_note_before (note_type, last);
! remove_note (insn, note);
! note = XEXP (note, 1);
! if (note_type == NOTE_INSN_EH_REGION_BEG
! || note_type == NOTE_INSN_EH_REGION_END)
! NOTE_EH_HANDLER (last) = INTVAL (XEXP (note, 0));
! }
remove_note (insn, note);
}
}
--- 1724,1735 ----
{
enum insn_note note_type = INTVAL (XEXP (note, 0));
! last = emit_note_before (note_type, last);
! remove_note (insn, note);
! note = XEXP (note, 1);
! if (note_type == NOTE_INSN_EH_REGION_BEG
! || note_type == NOTE_INSN_EH_REGION_END)
! NOTE_EH_HANDLER (last) = INTVAL (XEXP (note, 0));
remove_note (insn, note);
}
}
Index: print-rtl.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/print-rtl.c,v
retrieving revision 1.80
diff -c -3 -p -r1.80 print-rtl.c
*** print-rtl.c 2 Jun 2002 21:09:37 -0000 1.80
--- print-rtl.c 4 Jun 2002 11:23:27 -0000
*************** print_rtx (in_rtx)
*** 251,266 ****
sawclose = 1;
break;
- case NOTE_INSN_RANGE_BEG:
- case NOTE_INSN_RANGE_END:
- case NOTE_INSN_LIVE:
- indent += 2;
- if (!sawclose)
- fprintf (outfile, " ");
- print_rtx (NOTE_RANGE_INFO (in_rtx));
- indent -= 2;
- break;
-
case NOTE_INSN_BASIC_BLOCK:
{
basic_block bb = NOTE_BASIC_BLOCK (in_rtx);
--- 251,256 ----
Index: rtl.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/rtl.c,v
retrieving revision 1.116
diff -c -3 -p -r1.116 rtl.c
*** rtl.c 2 Jun 2002 21:09:41 -0000 1.116
--- rtl.c 4 Jun 2002 11:23:27 -0000
*************** const char * const note_insn_name[NOTE_I
*** 214,221 ****
"NOTE_INSN_PROLOGUE_END", "NOTE_INSN_EPILOGUE_BEG",
"NOTE_INSN_DELETED_LABEL", "NOTE_INSN_FUNCTION_BEG",
"NOTE_INSN_EH_REGION_BEG", "NOTE_INSN_EH_REGION_END",
! "NOTE_INSN_REPEATED_LINE_NUMBER", "NOTE_INSN_RANGE_BEG",
! "NOTE_INSN_RANGE_END", "NOTE_INSN_LIVE",
"NOTE_INSN_BASIC_BLOCK", "NOTE_INSN_EXPECTED_VALUE",
"NOTE_INSN_PREDICTION"
};
--- 214,220 ----
"NOTE_INSN_PROLOGUE_END", "NOTE_INSN_EPILOGUE_BEG",
"NOTE_INSN_DELETED_LABEL", "NOTE_INSN_FUNCTION_BEG",
"NOTE_INSN_EH_REGION_BEG", "NOTE_INSN_EH_REGION_END",
! "NOTE_INSN_REPEATED_LINE_NUMBER",
"NOTE_INSN_BASIC_BLOCK", "NOTE_INSN_EXPECTED_VALUE",
"NOTE_INSN_PREDICTION"
};
Index: rtl.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/rtl.h,v
retrieving revision 1.352
diff -c -3 -p -r1.352 rtl.h
*** rtl.h 2 Jun 2002 21:09:43 -0000 1.352
--- rtl.h 4 Jun 2002 11:23:28 -0000
*************** extern const char * const reg_note_name[
*** 754,767 ****
line is in. We use the same field to record block numbers temporarily in
NOTE_INSN_BLOCK_BEG and NOTE_INSN_BLOCK_END notes. (We avoid lots of casts
between ints and pointers if we use a different macro for the block number.)
! The NOTE_INSN_RANGE_{START,END} and NOTE_INSN_LIVE notes record their
! information as an rtx in the field. */
#define NOTE_SOURCE_FILE(INSN) XCSTR (INSN, 4, NOTE)
#define NOTE_BLOCK(INSN) XCTREE (INSN, 4, NOTE)
#define NOTE_EH_HANDLER(INSN) XCINT (INSN, 4, NOTE)
- #define NOTE_RANGE_INFO(INSN) XCEXP (INSN, 4, NOTE)
- #define NOTE_LIVE_INFO(INSN) XCEXP (INSN, 4, NOTE)
#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)
--- 754,764 ----
line is in. We use the same field to record block numbers temporarily in
NOTE_INSN_BLOCK_BEG and NOTE_INSN_BLOCK_END notes. (We avoid lots of casts
between ints and pointers if we use a different macro for the block number.)
! */
#define NOTE_SOURCE_FILE(INSN) XCSTR (INSN, 4, NOTE)
#define NOTE_BLOCK(INSN) XCTREE (INSN, 4, NOTE)
#define NOTE_EH_HANDLER(INSN) XCINT (INSN, 4, NOTE)
#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)
*************** enum insn_note
*** 853,866 ****
the line containing the inline call from being counted twice in gcov. */
NOTE_INSN_REPEATED_LINE_NUMBER,
- /* Start/end of a live range region, where pseudos allocated on the stack
- can be allocated to temporary registers. Uses NOTE_RANGE_INFO. */
- NOTE_INSN_RANGE_BEG,
- NOTE_INSN_RANGE_END,
-
- /* Record which registers are currently live. Uses NOTE_LIVE_INFO. */
- NOTE_INSN_LIVE,
-
/* Record the struct for the following basic block. Uses NOTE_BASIC_BLOCK. */
NOTE_INSN_BASIC_BLOCK,
--- 850,855 ----
*************** do { \
*** 1260,1359 ****
#ifndef USE_STORE_PRE_DECREMENT
#define USE_STORE_PRE_DECREMENT(MODE) HAVE_PRE_DECREMENT
#endif
-
-
- /* Accessors for RANGE_INFO. */
- /* For RANGE_{START,END} notes return the RANGE_START note. */
- #define RANGE_INFO_NOTE_START(INSN) XCEXP (INSN, 0, RANGE_INFO)
-
- /* For RANGE_{START,END} notes return the RANGE_START note. */
- #define RANGE_INFO_NOTE_END(INSN) XCEXP (INSN, 1, RANGE_INFO)
-
- /* For RANGE_{START,END} notes, return the vector containing the registers used
- in the range. */
- #define RANGE_INFO_REGS(INSN) XCVEC (INSN, 2, RANGE_INFO)
- #define RANGE_INFO_REGS_REG(INSN, N) XCVECEXP (INSN, 2, N, RANGE_INFO)
- #define RANGE_INFO_NUM_REGS(INSN) XCVECLEN (INSN, 2, RANGE_INFO)
-
- /* For RANGE_{START,END} notes, the number of calls within the range. */
- #define RANGE_INFO_NCALLS(INSN) XCINT (INSN, 3, RANGE_INFO)
-
- /* For RANGE_{START,END} notes, the number of insns within the range. */
- #define RANGE_INFO_NINSNS(INSN) XCINT (INSN, 4, RANGE_INFO)
-
- /* For RANGE_{START,END} notes, a unique # to identify this range. */
- #define RANGE_INFO_UNIQUE(INSN) XCINT (INSN, 5, RANGE_INFO)
-
- /* For RANGE_{START,END} notes, the basic block # the range starts with. */
- #define RANGE_INFO_BB_START(INSN) XCINT (INSN, 6, RANGE_INFO)
-
- /* For RANGE_{START,END} notes, the basic block # the range ends with. */
- #define RANGE_INFO_BB_END(INSN) XCINT (INSN, 7, RANGE_INFO)
-
- /* For RANGE_{START,END} notes, the loop depth the range is in. */
- #define RANGE_INFO_LOOP_DEPTH(INSN) XCINT (INSN, 8, RANGE_INFO)
-
- /* For RANGE_{START,END} notes, the bitmap of live registers at the start
- of the range. */
- #define RANGE_INFO_LIVE_START(INSN) XCBITMAP (INSN, 9, RANGE_INFO)
-
- /* For RANGE_{START,END} notes, the bitmap of live registers at the end
- of the range. */
- #define RANGE_INFO_LIVE_END(INSN) XCBITMAP (INSN, 10, RANGE_INFO)
-
- /* For RANGE_START notes, the marker # of the start of the range. */
- #define RANGE_INFO_MARKER_START(INSN) XCINT (INSN, 11, RANGE_INFO)
-
- /* For RANGE_START notes, the marker # of the end of the range. */
- #define RANGE_INFO_MARKER_END(INSN) XCINT (INSN, 12, RANGE_INFO)
-
- /* Original pseudo register # for a live range note. */
- #define RANGE_REG_PSEUDO(INSN,N) XCINT (XCVECEXP (INSN, 2, N, RANGE_INFO), 0, REG)
-
- /* Pseudo register # original register is copied into or -1. */
- #define RANGE_REG_COPY(INSN,N) XCINT (XCVECEXP (INSN, 2, N, RANGE_INFO), 1, REG)
-
- /* How many times a register in a live range note was referenced. */
- #define RANGE_REG_REFS(INSN,N) XINT (XCVECEXP (INSN, 2, N, RANGE_INFO), 2)
-
- /* How many times a register in a live range note was set. */
- #define RANGE_REG_SETS(INSN,N) XINT (XCVECEXP (INSN, 2, N, RANGE_INFO), 3)
-
- /* How many times a register in a live range note died. */
- #define RANGE_REG_DEATHS(INSN,N) XINT (XCVECEXP (INSN, 2, N, RANGE_INFO), 4)
-
- /* Whether the original value is needed to be copied into the range register at
- the start of the range. */
- #define RANGE_REG_COPY_FLAGS(INSN,N) XINT (XCVECEXP (INSN, 2, N, RANGE_INFO), 5)
-
- /* # of insns the register copy is live over. */
- #define RANGE_REG_LIVE_LENGTH(INSN,N) XINT (XCVECEXP (INSN, 2, N, RANGE_INFO), 6)
-
- /* # of calls the register copy is live over. */
- #define RANGE_REG_N_CALLS(INSN,N) XINT (XCVECEXP (INSN, 2, N, RANGE_INFO), 7)
-
- /* DECL_NODE pointer of the declaration if the register is a user defined
- variable. */
- #define RANGE_REG_SYMBOL_NODE(INSN,N) XTREE (XCVECEXP (INSN, 2, N, RANGE_INFO), 8)
-
- /* BLOCK_NODE pointer to the block the variable is declared in if the
- register is a user defined variable. */
- #define RANGE_REG_BLOCK_NODE(INSN,N) XTREE (XCVECEXP (INSN, 2, N, RANGE_INFO), 9)
-
- /* EXPR_LIST of the distinct ranges a variable is in. */
- #define RANGE_VAR_LIST(INSN) (XEXP (INSN, 0))
-
- /* Block a variable is declared in. */
- #define RANGE_VAR_BLOCK(INSN) (XTREE (INSN, 1))
-
- /* # of distinct ranges a variable is in. */
- #define RANGE_VAR_NUM(INSN) (XINT (INSN, 2))
-
- /* For a NOTE_INSN_LIVE note, the registers which are currently live. */
- #define RANGE_LIVE_BITMAP(INSN) (XBITMAP (INSN, 0))
-
- /* For a NOTE_INSN_LIVE note, the original basic block number. */
- #define RANGE_LIVE_ORIG_BLOCK(INSN) (XINT (INSN, 1))
/* Determine if the insn is a PHI node. */
#define PHI_NODE_P(X) \
--- 1249,1254 ----
Index: sched-deps.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/sched-deps.c,v
retrieving revision 1.41
diff -c -3 -p -r1.41 sched-deps.c
*** sched-deps.c 29 May 2002 22:56:13 -0000 1.41
--- sched-deps.c 4 Jun 2002 11:23:29 -0000
*************** sched_analyze (deps, head, tail)
*** 1315,1331 ****
/* See comments on reemit_notes as to why we do this.
??? Actually, the reemit_notes just say what is done, not why. */
! else if (GET_CODE (insn) == NOTE
! && (NOTE_LINE_NUMBER (insn) == NOTE_INSN_RANGE_BEG
! || NOTE_LINE_NUMBER (insn) == NOTE_INSN_RANGE_END))
! {
! loop_notes = alloc_EXPR_LIST (REG_SAVE_NOTE, NOTE_RANGE_INFO (insn),
! loop_notes);
! loop_notes = alloc_EXPR_LIST (REG_SAVE_NOTE,
! GEN_INT (NOTE_LINE_NUMBER (insn)),
! loop_notes);
! }
! else if (GET_CODE (insn) == NOTE
&& (NOTE_LINE_NUMBER (insn) == NOTE_INSN_LOOP_BEG
|| NOTE_LINE_NUMBER (insn) == NOTE_INSN_LOOP_END
|| NOTE_LINE_NUMBER (insn) == NOTE_INSN_EH_REGION_BEG
--- 1315,1321 ----
/* See comments on reemit_notes as to why we do this.
??? Actually, the reemit_notes just say what is done, not why. */
! if (GET_CODE (insn) == NOTE
&& (NOTE_LINE_NUMBER (insn) == NOTE_INSN_LOOP_BEG
|| NOTE_LINE_NUMBER (insn) == NOTE_INSN_LOOP_END
|| NOTE_LINE_NUMBER (insn) == NOTE_INSN_EH_REGION_BEG
More information about the Gcc-patches
mailing list