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]

[PATCH, i386]: Implement post-reload vzeroupper insertion pass


On Sun, Nov 11, 2012 at 7:36 PM, Uros Bizjak <ubizjak@gmail.com> wrote:

> Regarding vzeroupper insertion pass - we will use gcc pass manager to
> insert a target-dependant pass directly after reload ...

... like attached patch. The patch inserts vzeroupper pass directly
after reload, so spills from 256bit registers are considered when
processing AVX_U128 entity. The patched gcc reruns mode-switching
pass, so an export of entry function from mode-switching is needed.

2012-11-10  Uros Bizjak  <ubizjak@gmail.com>
            Vladimir Yakovlev  <vladimir.b.yakovlev@intel.com>

        PR target/47440
        * config/i386/i386.c (struct rtl_opt_pass pass_insert_vzeroupper): New.
        (gate_insert_vzeroupper): New function.
        (rest_of_handle_insert_vzeroupper): Ditto.
        (ix86_option_override): Register vzeroupper insertion pass here.
        (ix86_init_machine_status): Remove optimize_mode_switching[AVX_U128]
        initialization.
        * mode-switching.c (optimize_mode_switching): Export.
        * rtl.h (optimize_mode_switching): Declare prototype.

Bootstrapped and regression tested on x86_64-pc-linux-gnu {,-m32} AVX
target. Functionally equivalent patch was tested on SPEC2000/2006 by
Vladimir.

I will wait a day or two for possible comments. I guess that
non-algorithmic change to mode-switching doesn't need an approval...

Uros.

Attachment: p.diff.txt
Description: Text document


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