This is the mail archive of the
mailing list for the GCC project.
Ada's use of mark_all_temps_used
- From: Mike Stump <mrs at apple dot com>
- To: Richard Kenner <kenner at vlsi1 dot ultra dot nyu dot edu>, gcc at gcc dot gnu dot org
- Date: Mon, 26 Aug 2002 12:08:44 -0700
- Subject: Ada's use of mark_all_temps_used
/* Insert the code for GNAT_NODE at the position saved for that node.
if (global_bindings_p ())
insert_elaboration_list (get_gnu_tree (gnat_node));
insns = get_insns ();
emit_insn_after (insns, RTL_EXPR_RTL (get_gnu_tree (gnat_node)));
I have a question, do you really mean to mark all temp slots, including
those that had been allocated and freed already as used and kept?
struct temp_slot *p;
for (p = temp_slots; p; p = p->next)
p->in_use = p->keep = 1;
p->level = MIN (p->level, temp_slot_level);
It seems slightly beyond clean to do this. What if the compiler grabs
a temp slot for pic or something after you freed a slot, and before you
mark all temps used? Also, if the temp slot had been in use before but
not now, why preserve the previous level? Isn't temp_slot_level enough?
I'm redoing the slot code and came across these interesting semantics.