This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFA: temp slot TLC [3/3]


On Sun, May 27, 2012 at 2:48 AM, Michael Matz <matz@suse.de> wrote:
> Hi,
>
> and this is a further small cleanup. ?pop_temp_slots is now the same as
> free_temp_slots (modulo the level-- of course), so there's no need in
> calling both. ?(and preserve_temp_slots(NULL) is useless now).
>
> Regstrapped on x86_64-linux together with [1/3] and [2/3], all languages
> (+Ada,+obj-c++). ?Okay for trunk?

Ok for all three patches.

Thanks,
Richard.

>
> Ciao,
> Michael.
> ----------------------
> ? ? ? ?* function.c (pop_temp_slots): Call free_temp_slots.
> ? ? ? ?* calls.c (store_one_arg): Don't call preserve_temp_slots or
> ? ? ? ?free_temp_slots.
> ? ? ? ?* expr.c (expand_assignment): Don't call free_temp_slots.
>
> Index: calls.c
> ===================================================================
> --- calls.c.orig ? ? ? ?2012-05-26 21:47:02.000000000 +0200
> +++ calls.c ? ? 2012-05-26 23:42:57.000000000 +0200
> @@ -4721,11 +4721,7 @@ store_one_arg (struct arg_data *arg, rtx
> ? ? ?be deferred during the rest of the arguments. ?*/
> ? NO_DEFER_POP;
>
> - ?/* Free any temporary slots made in processing this argument. ?Show
> - ? ? that we might have taken the address of something and pushed that
> - ? ? as an operand. ?*/
> - ?preserve_temp_slots (NULL_RTX);
> - ?free_temp_slots ();
> + ?/* Free any temporary slots made in processing this argument. ?*/
> ? pop_temp_slots ();
>
> ? return sibcall_failure;
> Index: expr.c
> ===================================================================
> --- expr.c.orig 2012-05-26 21:47:02.000000000 +0200
> +++ expr.c ? ? ?2012-05-26 23:43:23.000000000 +0200
> @@ -4836,7 +4836,6 @@ expand_assignment (tree to, tree from, b
>
> ? ? ? if (result)
> ? ? ? ?preserve_temp_slots (result);
> - ? ? ?free_temp_slots ();
> ? ? ? pop_temp_slots ();
> ? ? ? return;
> ? ? }
> @@ -4884,7 +4883,6 @@ expand_assignment (tree to, tree from, b
> ? ? ? ? ?emit_move_insn (to_rtx, value);
> ? ? ? ?}
> ? ? ? preserve_temp_slots (to_rtx);
> - ? ? ?free_temp_slots ();
> ? ? ? pop_temp_slots ();
> ? ? ? return;
> ? ? }
> @@ -4911,7 +4909,6 @@ expand_assignment (tree to, tree from, b
> ? ? ? ?emit_move_insn (to_rtx, temp);
>
> ? ? ? preserve_temp_slots (to_rtx);
> - ? ? ?free_temp_slots ();
> ? ? ? pop_temp_slots ();
> ? ? ? return;
> ? ? }
> @@ -4941,7 +4938,6 @@ expand_assignment (tree to, tree from, b
> ? ? ? ? ? ? ? ? ? ? ? ? TYPE_MODE (sizetype));
>
> ? ? ? preserve_temp_slots (to_rtx);
> - ? ? ?free_temp_slots ();
> ? ? ? pop_temp_slots ();
> ? ? ? return;
> ? ? }
> @@ -4951,7 +4947,6 @@ expand_assignment (tree to, tree from, b
> ? push_temp_slots ();
> ? result = store_expr (from, to_rtx, 0, nontemporal);
> ? preserve_temp_slots (result);
> - ?free_temp_slots ();
> ? pop_temp_slots ();
> ? return;
> ?}
> Index: function.c
> ===================================================================
> --- function.c.orig ? ? 2012-05-26 23:41:39.000000000 +0200
> +++ function.c ?2012-05-26 23:42:27.000000000 +0200
> @@ -1200,22 +1200,7 @@ push_temp_slots (void)
> ?void
> ?pop_temp_slots (void)
> ?{
> - ?struct temp_slot *p, *next;
> - ?bool some_available = false;
> -
> - ?for (p = *temp_slots_at_level (temp_slot_level); p; p = next)
> - ? ?{
> - ? ? ?next = p->next;
> - ? ? ?make_slot_available (p);
> - ? ? ?some_available = true;
> - ? ?}
> -
> - ?if (some_available)
> - ? ?{
> - ? ? ?remove_unused_temp_slot_addresses ();
> - ? ? ?combine_temp_slots ();
> - ? ?}
> -
> + ?free_temp_slots ();
> ? temp_slot_level--;
> ?}
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]