* Remove a few unused functions
@ 2004-07-09 13:25 Steven Bosscher
2004-07-09 13:44 ` Diego Novillo
2004-07-09 22:35 ` Richard Henderson
0 siblings, 2 replies; 3+ messages in thread
From: Steven Bosscher @ 2004-07-09 13:25 UTC (permalink / raw)
To: gcc-patches
Bootstrapped+tested on x86_64-suse-linux-gnu.
* stmt.c (conditional_context): Remove prototype.
* tree.h (conditional_context): Remove.
* tree-cfg.c (pre_insert_on_edge): Remove.
* c-common.h (c_expand_asm_operands): Remove prototype.
* c-typeck.c (c_expand_asm_operands): Remove.
cp/
* typeck.c (c_expand_asm_operands): Remove.
Index: c-common.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/c-common.h,v
retrieving revision 1.248
diff -c -3 -p -r1.248 c-common.h
*** c-common.h 30 Jun 2004 22:27:59 -0000 1.248
--- c-common.h 9 Jul 2004 11:29:26 -0000
*************** extern tree build_case_label (tree, tree
*** 798,805 ****
extern tree build_continue_stmt (void);
extern tree build_break_stmt (void);
- extern void c_expand_asm_operands (tree, tree, tree, tree, int, location_t);
-
/* These functions must be defined by each front-end which implements
a variant of the C language. They are used in c-common.c. */
--- 798,803 ----
Index: c-typeck.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/c-typeck.c,v
retrieving revision 1.336
diff -c -3 -p -r1.336 c-typeck.c
*** c-typeck.c 4 Jul 2004 17:28:55 -0000 1.336
--- c-typeck.c 9 Jul 2004 11:29:26 -0000
*************** build_asm_expr (tree string, tree output
*** 6187,6251 ****
}
return args;
}
-
- /* Expand an ASM statement with operands, handling output operands
- that are not variables or INDIRECT_REFS by transforming such
- cases into cases that expand_asm_operands can handle.
-
- Arguments are same as for expand_asm_operands. */
-
- void
- c_expand_asm_operands (tree string, tree outputs, tree inputs,
- tree clobbers, int vol, location_t locus)
- {
- int noutputs = list_length (outputs);
- int i;
- /* o[I] is the place that output number I should be written. */
- tree *o = alloca (noutputs * sizeof (tree));
- tree tail;
-
- /* Record the contents of OUTPUTS before it is modified. */
- for (i = 0, tail = outputs; tail; tail = TREE_CHAIN (tail), i++)
- {
- o[i] = TREE_VALUE (tail);
- if (o[i] == error_mark_node)
- return;
- }
-
- /* Generate the ASM_OPERANDS insn; store into the TREE_VALUEs of
- OUTPUTS some trees for where the values were actually stored. */
- expand_asm_operands (string, outputs, inputs, clobbers, vol, locus);
-
- /* Copy all the intermediate outputs into the specified outputs. */
- for (i = 0, tail = outputs; tail; tail = TREE_CHAIN (tail), i++)
- {
- if (o[i] != TREE_VALUE (tail))
- {
- expand_expr (build_modify_expr (o[i], NOP_EXPR, TREE_VALUE (tail)),
- NULL_RTX, VOIDmode, EXPAND_NORMAL);
- free_temp_slots ();
-
- /* Restore the original value so that it's correct the next
- time we expand this function. */
- TREE_VALUE (tail) = o[i];
- }
- /* Detect modification of read-only values.
- (Otherwise done by build_modify_expr.) */
- else
- {
- tree type = TREE_TYPE (o[i]);
- if (TREE_READONLY (o[i])
- || TYPE_READONLY (type)
- || ((TREE_CODE (type) == RECORD_TYPE
- || TREE_CODE (type) == UNION_TYPE)
- && C_TYPE_FIELDS_READONLY (type)))
- readonly_error (o[i], "modification by `asm'");
- }
- }
-
- /* Those MODIFY_EXPRs could do autoincrements. */
- emit_queue ();
- }
/* Generate a goto statement to LABEL. */
--- 6187,6192 ----
Index: stmt.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/stmt.c,v
retrieving revision 1.373
diff -c -3 -p -r1.373 stmt.c
*** stmt.c 9 Jul 2004 03:29:35 -0000 1.373
--- stmt.c 9 Jul 2004 11:29:27 -0000
*************** is_body_block (tree stmt)
*** 2308,2323 ****
return 0;
}
- /* True if we are currently emitting insns in an area of output code
- that is controlled by a conditional expression. This is used by
- the cleanup handling code to generate conditional cleanup actions. */
-
- int
- conditional_context (void)
- {
- return block_stack && block_stack->data.block.conditional_code;
- }
-
/* Return an opaque pointer to the current nesting level, so frontend code
can check its own sanity. */
--- 2308,2313 ----
Index: tree-cfg.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-cfg.c,v
retrieving revision 2.27
diff -c -3 -p -r2.27 tree-cfg.c
*** tree-cfg.c 8 Jul 2004 16:16:38 -0000 2.27
--- tree-cfg.c 9 Jul 2004 11:29:27 -0000
*************** bsi_insert_on_edge (edge e, tree stmt)
*** 3038,3064 ****
}
- /* Specialized edge insertion for SSA-PRE. FIXME: This should
- probably disappear. The only reason it's here is because PRE needs
- the call to tree_find_edge_insert_loc(). */
-
- void pre_insert_on_edge (edge e, tree stmt);
-
- void
- pre_insert_on_edge (edge e, tree stmt)
- {
- block_stmt_iterator bsi;
-
- if (PENDING_STMT (e))
- abort ();
-
- if (tree_find_edge_insert_loc (e, &bsi))
- bsi_insert_after (&bsi, stmt, BSI_NEW_STMT);
- else
- bsi_insert_before (&bsi, stmt, BSI_NEW_STMT);
- }
-
-
/*---------------------------------------------------------------------------
Tree specific functions for CFG manipulation
---------------------------------------------------------------------------*/
--- 3038,3043 ----
Index: tree.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree.h,v
retrieving revision 1.550
diff -c -3 -p -r1.550 tree.h
*** tree.h 9 Jul 2004 03:19:14 -0000 1.550
--- tree.h 9 Jul 2004 11:29:28 -0000
*************** extern void expand_end_bindings (tree, i
*** 3348,3354 ****
extern void warn_about_unused_variables (tree);
extern int is_body_block (tree);
- extern int conditional_context (void);
extern struct nesting * current_nesting_level (void);
extern void expand_start_case (int, tree, tree, const char *);
extern void expand_end_case_type (tree, tree);
--- 3348,3353 ----
Index: cp/typeck.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/typeck.c,v
retrieving revision 1.558
diff -c -3 -p -r1.558 typeck.c
*** cp/typeck.c 8 Jul 2004 10:03:54 -0000 1.558
--- cp/typeck.c 9 Jul 2004 11:29:29 -0000
*************** convert_for_initialization (tree exp, tr
*** 5773,5835 ****
return convert_for_assignment (type, rhs, errtype, fndecl, parmnum);
}
- /* Expand an ASM statement with operands, handling output operands
- that are not variables or INDIRECT_REFS by transforming such
- cases into cases that expand_asm_operands can handle.
-
- Arguments are same as for expand_asm_operands.
-
- We don't do default conversions on all inputs, because it can screw
- up operands that are expected to be in memory. */
-
- void
- c_expand_asm_operands (tree string, tree outputs, tree inputs, tree clobbers,
- int vol, location_t locus)
- {
- int noutputs = list_length (outputs);
- int i;
- /* o[I] is the place that output number I should be written. */
- tree *o = alloca (noutputs * sizeof (tree));
- tree tail;
-
- /* Record the contents of OUTPUTS before it is modified. */
- for (i = 0, tail = outputs; tail; tail = TREE_CHAIN (tail), i++)
- o[i] = TREE_VALUE (tail);
-
- /* Generate the ASM_OPERANDS insn;
- store into the TREE_VALUEs of OUTPUTS some trees for
- where the values were actually stored. */
- expand_asm_operands (string, outputs, inputs, clobbers, vol, locus);
-
- /* Copy all the intermediate outputs into the specified outputs. */
- for (i = 0, tail = outputs; tail; tail = TREE_CHAIN (tail), i++)
- {
- if (o[i] != TREE_VALUE (tail))
- {
- expand_expr (build_modify_expr (o[i], NOP_EXPR, TREE_VALUE (tail)),
- const0_rtx, VOIDmode, EXPAND_NORMAL);
- free_temp_slots ();
-
- /* Restore the original value so that it's correct the next
- time we expand this function. */
- TREE_VALUE (tail) = o[i];
- }
- /* Detect modification of read-only values.
- (Otherwise done by build_modify_expr.) */
- else
- {
- tree type = TREE_TYPE (o[i]);
- if (type != error_mark_node
- && (CP_TYPE_CONST_P (type)
- || (CLASS_TYPE_P (type) && C_TYPE_FIELDS_READONLY (type))))
- readonly_error (o[i], "modification by `asm'", 1);
- }
- }
-
- /* Those MODIFY_EXPRs could do autoincrements. */
- emit_queue ();
- }
-
/* If RETVAL is the address of, or a reference to, a local variable or
temporary give an appropriate warning. */
--- 5773,5778 ----
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Remove a few unused functions
2004-07-09 13:25 Remove a few unused functions Steven Bosscher
@ 2004-07-09 13:44 ` Diego Novillo
2004-07-09 22:35 ` Richard Henderson
1 sibling, 0 replies; 3+ messages in thread
From: Diego Novillo @ 2004-07-09 13:44 UTC (permalink / raw)
To: Steven Bosscher; +Cc: gcc-patches
On Fri, 2004-07-09 at 07:35, Steven Bosscher wrote:
> * tree-cfg.c (pre_insert_on_edge): Remove.
>
This one is certainly fine. I can't approve any of the rest, though
they seem harmless to me.
Diego.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Remove a few unused functions
2004-07-09 13:25 Remove a few unused functions Steven Bosscher
2004-07-09 13:44 ` Diego Novillo
@ 2004-07-09 22:35 ` Richard Henderson
1 sibling, 0 replies; 3+ messages in thread
From: Richard Henderson @ 2004-07-09 22:35 UTC (permalink / raw)
To: Steven Bosscher; +Cc: gcc-patches
On Fri, Jul 09, 2004 at 01:35:09PM +0200, Steven Bosscher wrote:
> * stmt.c (conditional_context): Remove prototype.
> * tree.h (conditional_context): Remove.
> * tree-cfg.c (pre_insert_on_edge): Remove.
> * c-common.h (c_expand_asm_operands): Remove prototype.
> * c-typeck.c (c_expand_asm_operands): Remove.
> * typeck.c (c_expand_asm_operands): Remove.
Ok.
r~
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-07-09 21:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-09 13:25 Remove a few unused functions Steven Bosscher
2004-07-09 13:44 ` Diego Novillo
2004-07-09 22:35 ` Richard Henderson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).