diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2016-03-07 14:44:37 -0800 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2016-04-26 10:03:27 -0700 |
commit | 9aa6e19a6fc3bf8f39ab4deb9855249db053b3ba (patch) | |
tree | 366894e18f4f051b7b31e62e8c0f72a106efd138 /libtool.m4 | |
parent | 3f645e6df252745ee47d74f784cfc4216b09a81a (diff) | |
download | gcc-9aa6e19a6fc3bf8f39ab4deb9855249db053b3ba.tar.gz |
Extend STV pass to 64-bit modehjl/pr70155/master
128-bit SSE load and store instructions can be used for load and store
of 128-bit integers if they are the only operations on 128-bit integers.
To convert load and store of 128-bit integers to 128-bit SSE load and
store, the original STV pass, which is designed to convert 64-bit integer
operations to SSE2 operations in 32-bit mode, is extended to 64-bit mode
in the following ways:
1. Class scalar_chain is turned into base class. The 32-bit specific
member functions are moved to the new derived class, dimode_scalar_chain.
The new derived class, timode_scalar_chain, is added to convert oad and
store of 128-bit integers to 128-bit SSE load and store.
2. Add the 64-bit version of scalar_to_vector_candidate_p and
remove_non_convertible_regs. Only TImode load and store are allowed
for conversion. If one instruction on the chain of dependent
instructions aren't TImode load or store, the chain of instructions
won't be converted.
3. In 64-bit, we only convert from TImode to V1TImode, which have the
same size. The difference is only vector registers are allowed in
TImode so that 128-bit SSE load and store instructions will be used
for load and store of 128-bit integers.
4. Put the 64-bit STV pass before the CSE pass so that instructions
changed or generated by the STV pass can be CSEed.
convert_scalars_to_vector calls free_dominance_info in 64-bit mode to
work around ICE in fwprop pass:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70807
when building libgcc on Linux/x86-64.
gcc/
PR target/70155
* config/i386/i386.c (scalar_to_vector_candidate_p): Renamed
to ...
(dimode_scalar_to_vector_candidate_p): This.
(timode_scalar_to_vector_candidate_p): New function.
(scalar_to_vector_candidate_p): Likewise.
(timode_check_non_convertible_regs): Likewise.
(timode_remove_non_convertible_regs): Likewise.
(remove_non_convertible_regs): Likewise.
(remove_non_convertible_regs): Renamed to ...
(dimode_remove_non_convertible_regs): This.
(scalar_chain::~scalar_chain): Make it virtual.
(scalar_chain::compute_convert_gain): Make it pure virtual.
(scalar_chain::mark_dual_mode_def): Likewise.
(scalar_chain::convert_insn): Likewise.
(scalar_chain::convert_registers): Likewise.
(scalar_chain::add_to_queue): Make it protected.
(scalar_chain::emit_conversion_insns): Likewise.
(scalar_chain::replace_with_subreg): Likewise.
(scalar_chain::replace_with_subreg_in_insn): Likewise.
(scalar_chain::convert_op): Likewise.
(scalar_chain::convert_reg): Likewise.
(scalar_chain::make_vector_copies): Likewise.
(scalar_chain::convert_registers): New pure virtual function.
(class dimode_scalar_chain): New class.
(class timode_scalar_chain): Likewise.
(scalar_chain::mark_dual_mode_def): Renamed to ...
(dimode_scalar_chain::mark_dual_mode_def): This.
(timode_scalar_chain::mark_dual_mode_def): New function.
(timode_scalar_chain::convert_insn): Likewise.
(dimode_scalar_chain::convert_registers): Likewise.
(scalar_chain::compute_convert_gain): Renamed to ...
(dimode_scalar_chain::compute_convert_gain): This.
(scalar_chain::replace_with_subreg): Renamed to ...
(dimode_scalar_chain::replace_with_subreg): This.
(scalar_chain::replace_with_subreg_in_insn): Renamed to ...
(dimode_scalar_chain::replace_with_subreg_in_insn): This.
(scalar_chain::make_vector_copies): Renamed to ...
(dimode_scalar_chain::make_vector_copies): This.
(scalar_chain::convert_reg): Renamed to ...
(dimode_scalar_chain::convert_reg ): This.
(scalar_chain::convert_op): Renamed to ...
(dimode_scalar_chain::convert_op): This.
(scalar_chain::convert_insn): Renamed to ...
(dimode_scalar_chain::convert_insn): This.
(scalar_chain::convert): Call convert_registers.
(convert_scalars_to_vector): Change to scalar_chain pointer to
use timode_scalar_chain in 64-bit mode and dimode_scalar_chain
in 32-bit mode. Delete scalar_chain pointer. Call
free_dominance_info in 64-bit mode.
(pass_stv::gate): Remove TARGET_64BIT check.
(ix86_option_override): Put the 64-bit STV pass before the CSE
pass.
gcc/testsuite/
PR target/70155
* gcc.target/i386/pr55247-2.c: Updated to check movti_internal
and movv1ti_internal patterns
* gcc.target/i386/pr70155-1.c: New test.
* gcc.target/i386/pr70155-2.c: Likewise.
* gcc.target/i386/pr70155-3.c: Likewise.
* gcc.target/i386/pr70155-4.c: Likewise.
* gcc.target/i386/pr70155-5.c: Likewise.
* gcc.target/i386/pr70155-6.c: Likewise.
* gcc.target/i386/pr70155-7.c: Likewise.
* gcc.target/i386/pr70155-8.c: Likewise.
* gcc.target/i386/pr70155-9.c: Likewise.
* gcc.target/i386/pr70155-10.c: Likewise.
* gcc.target/i386/pr70155-11.c: Likewise.
* gcc.target/i386/pr70155-12.c: Likewise.
* gcc.target/i386/pr70155-13.c: Likewise.
* gcc.target/i386/pr70155-14.c: Likewise.
* gcc.target/i386/pr70155-15.c: Likewise.
* gcc.target/i386/pr70155-16.c: Likewise.
* gcc.target/i386/pr70155-17.c: Likewise.
* gcc.target/i386/pr70155-18.c: Likewise.
* gcc.target/i386/pr70155-19.c: Likewise.
* gcc.target/i386/pr70155-20.c: Likewise.
* gcc.target/i386/pr70155-21.c: Likewise.
* gcc.target/i386/pr70155-22.c: Likewise.
Diffstat (limited to 'libtool.m4')
0 files changed, 0 insertions, 0 deletions