]> gcc.gnu.org Git - gcc.git/commit
Take register pressure into account for vec_construct/scalar_to_vec when the componen...
authorliuhongt <hongtao.liu@intel.com>
Mon, 27 Nov 2023 05:35:41 +0000 (13:35 +0800)
committerliuhongt <hongtao.liu@intel.com>
Tue, 5 Dec 2023 02:40:59 +0000 (10:40 +0800)
commitb1cb2d993cc1148281fb4922a7ae26a4ae9ecf6f
tree850b553431ec1942a20914c81e0ebfecbb09bf09
parent48cf8d0773fee2f7acf2b9778c7af7e344de07e6
Take register pressure into account for vec_construct/scalar_to_vec when the components are not loaded from memory.

For vec_contruct, the components must be live at the same time if
they're not loaded from memory, when the number of those components
exceeds available registers, spill happens. Try to account that with a
rough estimation.
??? Ideally, we should have an overall estimation of register pressure
if we know the live range of all variables.

gcc/ChangeLog:

* config/i386/i386.cc (ix86_vector_costs::add_stmt_cost):
Count sse_reg/gpr_regs for components not loaded from memory.
(ix86_vector_costs:ix86_vector_costs): New constructor.
(ix86_vector_costs::m_num_gpr_needed[3]): New private memeber.
(ix86_vector_costs::m_num_sse_needed[3]): Ditto.
(ix86_vector_costs::finish_cost): Estimate overall register
pressure cost.
(ix86_vector_costs::ix86_vect_estimate_reg_pressure): New
function.
gcc/config/i386/i386.cc
This page took 0.211343 seconds and 5 git commands to generate.