This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] emit-rtl.c: Remove 3 unused functions.
- From: Kazu Hirata <kazu at cs dot umass dot edu>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sun, 08 Feb 2004 08:31:26 -0500 (EST)
- Subject: [patch] emit-rtl.c: Remove 3 unused functions.
Hi,
Attached is a patch to remove 3 unused functions.
I don't know when they are last used, but just to give you an idea,
here is how old they are:
subreg_realpart_p (since CVS import, at least 6 years old)
reorder_insns_with_line_notes (since CVS import, at least 6 years old)
end_full_sequence (almost 4 years old)
Bootstrapped on i686-pc-linux-gnu. OK to apply?
Kazu Hirata
2004-02-08 Kazu Hirata <kazu@cs.umass.edu>
* emit-rtl.c (subreg_realpart_p): Remove.
(reorder_insns_with_line_notes): Likewise.
(end_full_sequence): Likewise.
* rtl.h: Remove the prototype for the above functions.
Index: emit-rtl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/emit-rtl.c,v
retrieving revision 1.376
diff -u -r1.376 emit-rtl.c
--- emit-rtl.c 5 Feb 2004 14:15:35 -0000 1.376
+++ emit-rtl.c 8 Feb 2004 03:15:52 -0000
@@ -1070,21 +1070,6 @@
else
return gen_highpart (mode, x);
}
-
-/* Return 1 iff X, assumed to be a SUBREG,
- refers to the real part of the complex value in its containing reg.
- Complex values are always stored with the real part in the first word,
- regardless of WORDS_BIG_ENDIAN. */
-
-int
-subreg_realpart_p (rtx x)
-{
- if (GET_CODE (x) != SUBREG)
- abort ();
-
- return ((unsigned int) SUBREG_BYTE (x)
- < (unsigned int) GET_MODE_UNIT_SIZE (GET_MODE (SUBREG_REG (x))));
-}
/* Assuming that X is an rtx (e.g., MEM, REG or SUBREG) for a value,
return an rtx (MEM, SUBREG, or CONST_INT) that refers to the
@@ -3713,27 +3698,6 @@
return insn;
}
-/* Like reorder_insns, but inserts line notes to preserve the line numbers
- of the moved insns when debugging. This may insert a note between AFTER
- and FROM, and another one after TO. */
-
-void
-reorder_insns_with_line_notes (rtx from, rtx to, rtx after)
-{
- rtx from_line = find_line_note (from);
- rtx after_line = find_line_note (after);
-
- reorder_insns (from, to, after);
-
- if (from_line == after_line)
- return;
-
- if (from_line)
- emit_note_copy_after (from_line, after);
- if (after_line)
- emit_note_copy_after (after_line, to);
-}
-
/* Remove unnecessary notes from the instruction stream. */
void
@@ -4860,17 +4824,6 @@
memset (tem, 0, sizeof (*tem));
tem->next = free_sequence_stack;
free_sequence_stack = tem;
-}
-
-/* This works like end_sequence, but records the old sequence in FIRST
- and LAST. */
-
-void
-end_full_sequence (rtx *first, rtx *last)
-{
- *first = first_insn;
- *last = last_insn;
- end_sequence ();
}
/* Return 1 if currently emitting into a sequence. */
Index: rtl.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/rtl.h,v
retrieving revision 1.455
diff -u -r1.455 rtl.h
--- rtl.h 6 Feb 2004 20:03:43 -0000 1.455
+++ rtl.h 8 Feb 2004 03:15:53 -0000
@@ -1518,7 +1518,6 @@
extern void push_to_sequence (rtx);
extern void end_sequence (void);
extern void push_to_full_sequence (rtx, rtx);
-extern void end_full_sequence (rtx*, rtx*);
extern rtx immed_double_const (HOST_WIDE_INT, HOST_WIDE_INT,
enum machine_mode);
@@ -2073,7 +2072,6 @@
extern void init_emit_once (int);
extern void push_topmost_sequence (void);
extern void pop_topmost_sequence (void);
-extern int subreg_realpart_p (rtx);
extern void reverse_comparison (rtx);
extern void set_new_first_and_last_insn (rtx, rtx);
extern void set_new_last_label_num (int);
@@ -2087,7 +2085,6 @@
extern void add_insn_before (rtx, rtx);
extern void add_insn_after (rtx, rtx);
extern void remove_insn (rtx);
-extern void reorder_insns_with_line_notes (rtx, rtx, rtx);
extern void emit_insn_after_with_line_notes (rtx, rtx, rtx);
extern enum rtx_code classify_insn (rtx);
extern rtx emit (rtx);