diff options
author | zack <zack@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-12-16 18:23:00 +0000 |
---|---|---|
committer | zack <zack@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-12-16 18:23:00 +0000 |
commit | 805e22b2051e9c6a75377ea6599654d7415da483 (patch) | |
tree | c259697c448b0c6f548f153c48c46a8d7a75970f /gcc/jump.c | |
parent | 2c27ce73ee2229b0871c4ccad2342d8a4be85eff (diff) | |
download | gcc-805e22b2051e9c6a75377ea6599654d7415da483.tar.gz |
Merge basic-improvements-branch to trunk
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@60174 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/jump.c')
-rw-r--r-- | gcc/jump.c | 47 |
1 files changed, 20 insertions, 27 deletions
diff --git a/gcc/jump.c b/gcc/jump.c index ef031f2a8a1..2476a32eb9d 100644 --- a/gcc/jump.c +++ b/gcc/jump.c @@ -36,6 +36,8 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include "config.h" #include "system.h" +#include "coretypes.h" +#include "tm.h" #include "rtl.h" #include "tm_p.h" #include "flags.h" @@ -59,7 +61,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA or even change what is live at any point. So perhaps let combiner do it. */ -static int init_label_info PARAMS ((rtx)); +static void init_label_info PARAMS ((rtx)); static void mark_all_labels PARAMS ((rtx)); static int duplicate_loop_exit_test PARAMS ((rtx)); static void delete_computation PARAMS ((rtx)); @@ -78,10 +80,8 @@ rebuild_jump_labels (f) rtx f; { rtx insn; - int max_uid = 0; - - max_uid = init_label_info (f) + 1; + init_label_info (f); mark_all_labels (f); /* Keep track of labels used from static data; we don't track them @@ -186,36 +186,29 @@ purge_line_number_notes (f) /* Initialize LABEL_NUSES and JUMP_LABEL fields. Delete any REG_LABEL notes whose labels don't occur in the insn any more. Returns the largest INSN_UID found. */ -static int +static void init_label_info (f) rtx f; { - int largest_uid = 0; rtx insn; for (insn = f; insn; insn = NEXT_INSN (insn)) - { - if (GET_CODE (insn) == CODE_LABEL) - LABEL_NUSES (insn) = (LABEL_PRESERVE_P (insn) != 0); - else if (GET_CODE (insn) == JUMP_INSN) - JUMP_LABEL (insn) = 0; - else if (GET_CODE (insn) == INSN || GET_CODE (insn) == CALL_INSN) - { - rtx note, next; - - for (note = REG_NOTES (insn); note; note = next) - { - next = XEXP (note, 1); - if (REG_NOTE_KIND (note) == REG_LABEL - && ! reg_mentioned_p (XEXP (note, 0), PATTERN (insn))) - remove_note (insn, note); - } - } - if (INSN_UID (insn) > largest_uid) - largest_uid = INSN_UID (insn); - } + if (GET_CODE (insn) == CODE_LABEL) + LABEL_NUSES (insn) = (LABEL_PRESERVE_P (insn) != 0); + else if (GET_CODE (insn) == JUMP_INSN) + JUMP_LABEL (insn) = 0; + else if (GET_CODE (insn) == INSN || GET_CODE (insn) == CALL_INSN) + { + rtx note, next; - return largest_uid; + for (note = REG_NOTES (insn); note; note = next) + { + next = XEXP (note, 1); + if (REG_NOTE_KIND (note) == REG_LABEL + && ! reg_mentioned_p (XEXP (note, 0), PATTERN (insn))) + remove_note (insn, note); + } + } } /* Mark the label each jump jumps to. |