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: [PATCH, PR58066] preferred_stack_boundary update for tls expanded call


On Thu, May 8, 2014 at 12:59 AM, Wei Mi <wmi@google.com> wrote:

> The calls added in the templates of tls_local_dynamic_base_32 and
> tls_global_dynamic_32 in pr58066-3.patch are used to prevent sched2
> from moving sp setting across implicit tls calls, but those calls make
> the combine of UNSPEC_TLS_LD_BASE and UNSPEC_DTPOFF difficult, so that
> the optimization in tls_local_dynamic_32_once to convert local_dynamic
> to global_dynamic mode for single tls reference cannot take effect. In
> the updated patch, I remove those calls from insn templates and add
> "reg:SI SP_REG" explicitly in the templates of UNSPEC_TLS_GD and
> UNSPEC_TLS_LD_BASE. It solves the sched2 and combine problems above,
> and now the optimization in tls_local_dynamic_32_once works.
>
> bootstrapped ok on x86_64-linux-gnu. regression is going on. Is it OK
> if regression passes?

Please update ChangeLog with all changes, see below:

> ChangeLog:
>
> gcc/
> 2014-05-07  Wei Mi  <wmi@google.com>
>
>         * config/i386/i386.c (ix86_compute_frame_layout):
>         preferred_stack_boundary updated for tls expanded call.

(...): Update preferred_stack_boundary for call, expanded from tls descriptor.

>         * config/i386/i386.md: Set ix86_tls_descriptor_calls_expanded_in_cfun.

* config/i386/i386.md (*tls_global_dynamic_32_gnu): Depend on SP register.
(*tls_local_dynamic_base_32_gnu): Ditto.
...
(tls_global_dynamic_32): Set
ix86_tls_descriptor_calls_expanded_in_cfun.  Update RTX to depend on
SP register.
(tls_local_dynamic_base_32): Ditto.
...

The patch is OK for mainline with updated and complete ChangeLog entry.

Thanks,
Uros.


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