function.h (struct sequence_stack): Remove rtl_expr.
* function.h (struct sequence_stack): Remove rtl_expr. (struct emit_staus): Likewise. (seq_rtl_expr): Remove. * tree.h (free_temps_for_rtl_expr): Don't declare. (start_sequence_for_rtl_expr): Likewise. * rtl.h (preserve_rtl_expr_result): Likewise. * emit-rtl.c (start_sequence): Don't set sequence_rtl_expr. (start_sequence_for_rtl_expr): Remove. (push_topmost_sequence): Don't save sequence_rtl_expr. (pop_topmost_sequence): Remove comment about not restoring it. (end_sequence): Don't set seq_rtl_expr. (init_emit): Don't initialize it. (mark_sequence_stack): Don't mark it. (mark_emit_status): Likewise. * except.c (protect_with_terminate): Use start_sequence_for_rtl_expr, not start_sequence. * expr.c (expand_expr, case RTL_EXPR): Don't call preserve_rtl_expr_result or free_temps_for_rtl_expr. (assign_stack_temp_for_type): Don't set rtl_expr. (preserve_rtl_expr_result): Remove. (free_temps_for_rtl_expr): Likewise. (pop_temp_slots): Likewise. (mark_temp_slot): Don't mark the rtl_expr. * stmt.c (expand_start_stmt_expr): Use start_sequence, not start_sequence_for_rtl_expr. From-SVN: r32333
This commit is contained in:
parent
5f12e98764
commit
08d0be2f4c
@ -1,3 +1,31 @@
|
||||
2000-03-04 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
* function.h (struct sequence_stack): Remove rtl_expr.
|
||||
(struct emit_staus): Likewise.
|
||||
(seq_rtl_expr): Remove.
|
||||
* tree.h (free_temps_for_rtl_expr): Don't declare.
|
||||
(start_sequence_for_rtl_expr): Likewise.
|
||||
* rtl.h (preserve_rtl_expr_result): Likewise.
|
||||
* emit-rtl.c (start_sequence): Don't set sequence_rtl_expr.
|
||||
(start_sequence_for_rtl_expr): Remove.
|
||||
(push_topmost_sequence): Don't save sequence_rtl_expr.
|
||||
(pop_topmost_sequence): Remove comment about not restoring it.
|
||||
(end_sequence): Don't set seq_rtl_expr.
|
||||
(init_emit): Don't initialize it.
|
||||
(mark_sequence_stack): Don't mark it.
|
||||
(mark_emit_status): Likewise.
|
||||
* except.c (protect_with_terminate): Use
|
||||
start_sequence_for_rtl_expr, not start_sequence.
|
||||
* expr.c (expand_expr, case RTL_EXPR): Don't call
|
||||
preserve_rtl_expr_result or free_temps_for_rtl_expr.
|
||||
(assign_stack_temp_for_type): Don't set rtl_expr.
|
||||
(preserve_rtl_expr_result): Remove.
|
||||
(free_temps_for_rtl_expr): Likewise.
|
||||
(pop_temp_slots): Likewise.
|
||||
(mark_temp_slot): Don't mark the rtl_expr.
|
||||
* stmt.c (expand_start_stmt_expr): Use start_sequence, not
|
||||
start_sequence_for_rtl_expr.
|
||||
|
||||
2000-03-04 Zack Weinberg <zack@wolery.cumb.org>
|
||||
|
||||
* mkdeps.c, mkdeps.h: New files.
|
||||
|
@ -3376,7 +3376,6 @@ start_sequence ()
|
||||
tem->next = seq_stack;
|
||||
tem->first = first_insn;
|
||||
tem->last = last_insn;
|
||||
tem->sequence_rtl_expr = seq_rtl_expr;
|
||||
|
||||
seq_stack = tem;
|
||||
|
||||
@ -3384,19 +3383,6 @@ start_sequence ()
|
||||
last_insn = 0;
|
||||
}
|
||||
|
||||
/* Similarly, but indicate that this sequence will be placed in T, an
|
||||
RTL_EXPR. See the documentation for start_sequence for more
|
||||
information about how to use this function. */
|
||||
|
||||
void
|
||||
start_sequence_for_rtl_expr (t)
|
||||
tree t;
|
||||
{
|
||||
start_sequence ();
|
||||
|
||||
seq_rtl_expr = t;
|
||||
}
|
||||
|
||||
/* Set up the insn chain starting with FIRST as the current sequence,
|
||||
saving the previously current one. See the documentation for
|
||||
start_sequence for more information about how to use this function. */
|
||||
@ -3430,7 +3416,6 @@ push_topmost_sequence ()
|
||||
|
||||
first_insn = top->first;
|
||||
last_insn = top->last;
|
||||
seq_rtl_expr = top->sequence_rtl_expr;
|
||||
}
|
||||
|
||||
/* After emitting to the outer-level insn chain, update the outer-level
|
||||
@ -3446,7 +3431,6 @@ pop_topmost_sequence ()
|
||||
|
||||
top->first = first_insn;
|
||||
top->last = last_insn;
|
||||
/* ??? Why don't we save seq_rtl_expr here? */
|
||||
|
||||
end_sequence ();
|
||||
}
|
||||
@ -3471,7 +3455,6 @@ end_sequence ()
|
||||
|
||||
first_insn = tem->first;
|
||||
last_insn = tem->last;
|
||||
seq_rtl_expr = tem->sequence_rtl_expr;
|
||||
seq_stack = tem->next;
|
||||
|
||||
free (tem);
|
||||
@ -3760,7 +3743,6 @@ init_emit ()
|
||||
f->emit = (struct emit_status *) xmalloc (sizeof (struct emit_status));
|
||||
first_insn = NULL;
|
||||
last_insn = NULL;
|
||||
seq_rtl_expr = NULL;
|
||||
cur_insn_uid = 1;
|
||||
reg_rtx_no = LAST_VIRTUAL_REGISTER + 1;
|
||||
last_linenum = 0;
|
||||
@ -3834,7 +3816,6 @@ mark_sequence_stack (ss)
|
||||
while (ss)
|
||||
{
|
||||
ggc_mark_rtx (ss->first);
|
||||
ggc_mark_tree (ss->sequence_rtl_expr);
|
||||
ss = ss->next;
|
||||
}
|
||||
}
|
||||
@ -3856,7 +3837,6 @@ mark_emit_status (es)
|
||||
ggc_mark_rtx (*r);
|
||||
|
||||
mark_sequence_stack (es->sequence_stack);
|
||||
ggc_mark_tree (es->sequence_rtl_expr);
|
||||
ggc_mark_rtx (es->x_first_insn);
|
||||
}
|
||||
|
||||
|
@ -2095,7 +2095,7 @@ protect_with_terminate (e)
|
||||
TREE_TYPE (handler) = void_type_node;
|
||||
RTL_EXPR_RTL (handler) = const0_rtx;
|
||||
TREE_SIDE_EFFECTS (handler) = 1;
|
||||
start_sequence_for_rtl_expr (handler);
|
||||
start_sequence ();
|
||||
|
||||
emit_library_call (terminate_libfunc, 0, VOIDmode, 0);
|
||||
emit_barrier ();
|
||||
|
@ -6306,8 +6306,6 @@ expand_expr (exp, target, tmode, modifier)
|
||||
emit_insns (RTL_EXPR_SEQUENCE (exp));
|
||||
RTL_EXPR_SEQUENCE (exp) = const0_rtx;
|
||||
}
|
||||
preserve_rtl_expr_result (RTL_EXPR_RTL (exp));
|
||||
free_temps_for_rtl_expr (exp);
|
||||
return RTL_EXPR_RTL (exp);
|
||||
|
||||
case CONSTRUCTOR:
|
||||
|
@ -46,7 +46,6 @@ struct sequence_stack
|
||||
{
|
||||
/* First and last insns in the chain of the saved sequence. */
|
||||
rtx first, last;
|
||||
tree sequence_rtl_expr;
|
||||
struct sequence_stack *next;
|
||||
};
|
||||
|
||||
@ -77,11 +76,6 @@ struct emit_status
|
||||
rtx x_first_insn;
|
||||
rtx x_last_insn;
|
||||
|
||||
/* RTL_EXPR within which the current sequence will be placed. Use to
|
||||
prevent reuse of any temporaries within the sequence until after the
|
||||
RTL_EXPR is emitted. */
|
||||
tree sequence_rtl_expr;
|
||||
|
||||
/* Stack of pending (incomplete) sequences saved by `start_sequence'.
|
||||
Each element describes one pending sequence.
|
||||
The main insn-chain is saved in the last element of the chain,
|
||||
@ -117,7 +111,6 @@ struct emit_status
|
||||
|
||||
/* For backward compatibility... eventually these should all go away. */
|
||||
#define reg_rtx_no (cfun->emit->x_reg_rtx_no)
|
||||
#define seq_rtl_expr (cfun->emit->sequence_rtl_expr)
|
||||
#define regno_reg_rtx (cfun->emit->x_regno_reg_rtx)
|
||||
#define seq_stack (cfun->emit->sequence_stack)
|
||||
|
||||
|
@ -1508,7 +1508,6 @@ extern void reposition_prologue_and_epilogue_notes PARAMS ((rtx));
|
||||
extern void thread_prologue_and_epilogue_insns PARAMS ((rtx));
|
||||
extern int prologue_epilogue_contains PARAMS ((rtx));
|
||||
extern HOST_WIDE_INT get_frame_size PARAMS ((void));
|
||||
extern void preserve_rtl_expr_result PARAMS ((rtx));
|
||||
extern void mark_temp_addr_taken PARAMS ((rtx));
|
||||
extern void update_temp_slot_address PARAMS ((rtx, rtx));
|
||||
extern void purge_addressof PARAMS ((rtx));
|
||||
|
@ -2025,7 +2025,7 @@ expand_start_stmt_expr ()
|
||||
t = make_node (RTL_EXPR);
|
||||
resume_momentary (momentary);
|
||||
do_pending_stack_adjust ();
|
||||
start_sequence_for_rtl_expr (t);
|
||||
start_sequence ();
|
||||
NO_DEFER_POP;
|
||||
expr_stmts_for_value++;
|
||||
return t;
|
||||
|
65
gcc/testsuite/g++.old-deja/g++.other/inline8.C
Normal file
65
gcc/testsuite/g++.old-deja/g++.other/inline8.C
Normal file
@ -0,0 +1,65 @@
|
||||
// Origin: Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
|
||||
// Special g++ Options: -O1
|
||||
|
||||
#include <map>
|
||||
#include <cstdlib>
|
||||
|
||||
class NAMES_ITEM
|
||||
{
|
||||
public:
|
||||
char *name;
|
||||
|
||||
NAMES_ITEM(const NAMES_ITEM& item2);
|
||||
|
||||
NAMES_ITEM(const char* name2);
|
||||
|
||||
~NAMES_ITEM();
|
||||
|
||||
bool operator==(const NAMES_ITEM& n) const;
|
||||
};
|
||||
|
||||
|
||||
NAMES_ITEM::NAMES_ITEM (const NAMES_ITEM& item2)
|
||||
{
|
||||
size_t length=strlen(item2.name);
|
||||
|
||||
name=new char[length+1];
|
||||
memcpy(name,item2.name,length+1);
|
||||
}
|
||||
|
||||
NAMES_ITEM::NAMES_ITEM (const char* name2)
|
||||
{
|
||||
size_t length=strlen(name2);
|
||||
|
||||
name=new char[length+1];
|
||||
memcpy(name,name2,length+1);
|
||||
}
|
||||
|
||||
NAMES_ITEM::~NAMES_ITEM ()
|
||||
{
|
||||
if (strcmp (name, "one") != 0)
|
||||
abort ();
|
||||
|
||||
name=0;
|
||||
}
|
||||
|
||||
bool NAMES_ITEM::operator==(const NAMES_ITEM& n) const
|
||||
{
|
||||
return (strcmp(name,n.name) == 0);
|
||||
}
|
||||
|
||||
bool operator<(const NAMES_ITEM& n1, const NAMES_ITEM& n2)
|
||||
{
|
||||
return (strcmp(n1.name,n2.name) < 0);
|
||||
}
|
||||
|
||||
typedef map<NAMES_ITEM,size_t,less<NAMES_ITEM> > lookup_t;
|
||||
|
||||
lookup_t lookup;
|
||||
|
||||
NAMES_ITEM item ("one");
|
||||
main()
|
||||
{
|
||||
lookup.insert(pair<NAMES_ITEM,size_t>(item,0));
|
||||
}
|
||||
|
@ -2452,7 +2452,6 @@ extern void preserve_temp_slots PARAMS ((struct rtx_def *));
|
||||
extern int aggregate_value_p PARAMS ((tree));
|
||||
extern tree reorder_blocks PARAMS ((tree,
|
||||
struct rtx_def *));
|
||||
extern void free_temps_for_rtl_expr PARAMS ((tree));
|
||||
extern void instantiate_virtual_regs PARAMS ((tree, struct rtx_def *));
|
||||
extern void unshare_all_rtl PARAMS ((tree, struct rtx_def *));
|
||||
extern int max_parm_reg_num PARAMS ((void));
|
||||
@ -2486,7 +2485,6 @@ extern struct rtx_def *store_expr PARAMS ((tree, struct rtx_def *,
|
||||
extern void check_max_integer_computation_mode PARAMS ((tree));
|
||||
|
||||
/* In emit-rtl.c */
|
||||
extern void start_sequence_for_rtl_expr PARAMS ((tree));
|
||||
extern struct rtx_def *emit_line_note_after PARAMS ((char *, int,
|
||||
struct rtx_def *));
|
||||
extern struct rtx_def *emit_line_note PARAMS ((char *, int));
|
||||
|
Loading…
x
Reference in New Issue
Block a user