This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[basic-improvements] function.[ch]: Remove unused functions.
- From: Kazu Hirata <kazu at cs dot umass dot edu>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sat, 21 Sep 2002 01:03:16 -0400 (EDT)
- Subject: [basic-improvements] function.[ch]: Remove unused functions.
Hi,
Attached is a patch to remove unused functions.
The #if 0 has been around for almost 3 years.
Bootstrapped on i386-redhat-linux. OK to apply?
Kazu Hirata
2002-09-21 Kazu Hirata <kazu@cs.umass.edu>
* function.c (push_temp_slots_for_block): Remove.
(push_temp_slots_for_target): Likewise.
(get_target_temp_slot_level): Likewise.
(set_target_temp_slot_level): Likewise.
(get_first_block_beg): Likewise.
* function.h: Remove corresponding prototypes.
Index: function.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/function.c,v
retrieving revision 1.380.4.5
diff -u -r1.380.4.5 function.c
--- function.c 17 Sep 2002 22:58:42 -0000 1.380.4.5
+++ function.c 21 Sep 2002 04:56:34 -0000
@@ -1251,46 +1251,6 @@
temp_slot_level++;
}
-/* Likewise, but save the new level as the place to allocate variables
- for blocks. */
-
-#if 0
-void
-push_temp_slots_for_block ()
-{
- push_temp_slots ();
-
- var_temp_slot_level = temp_slot_level;
-}
-
-/* Likewise, but save the new level as the place to allocate temporaries
- for TARGET_EXPRs. */
-
-void
-push_temp_slots_for_target ()
-{
- push_temp_slots ();
-
- target_temp_slot_level = temp_slot_level;
-}
-
-/* Set and get the value of target_temp_slot_level. The only
- permitted use of these functions is to save and restore this value. */
-
-int
-get_target_temp_slot_level ()
-{
- return target_temp_slot_level;
-}
-
-void
-set_target_temp_slot_level (level)
- int level;
-{
- target_temp_slot_level = level;
-}
-#endif
-
/* Pop a temporary nesting level. All slots in use in the current level
are freed. */
@@ -4188,24 +4148,6 @@
if (last_parm_insn)
return NEXT_INSN (last_parm_insn);
return get_insns ();
-}
-
-/* Return the first NOTE_INSN_BLOCK_BEG note in the function.
- Crash if there is none. */
-
-rtx
-get_first_block_beg ()
-{
- rtx searcher;
- rtx insn = get_first_nonparm_insn ();
-
- for (searcher = insn; searcher; searcher = NEXT_INSN (searcher))
- if (GET_CODE (searcher) == NOTE
- && NOTE_LINE_NUMBER (searcher) == NOTE_INSN_BLOCK_BEG)
- return searcher;
-
- abort (); /* Invalid call to this function. (See comments above.) */
- return NULL_RTX;
}
/* Return 1 if EXP is an aggregate type (or a value with aggregate type).
Index: function.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/function.h,v
retrieving revision 1.85.4.2
diff -u -r1.85.4.2 function.h
--- function.h 17 Sep 2002 22:58:43 -0000 1.85.4.2
+++ function.h 21 Sep 2002 04:56:34 -0000
@@ -601,8 +601,6 @@
extern void init_varasm_status PARAMS ((struct function *));
-extern rtx get_first_block_beg PARAMS ((void));
-
#ifdef RTX_CODE
extern void diddle_return_value PARAMS ((void (*)(rtx, void*), void*));
extern void clobber_return_register PARAMS ((void));