Hi Segher, Thanks for the comments!
on 2020/7/23 上午1:49, Segher Boessenkool wrote: > Hi! > > On Wed, Jul 22, 2020 at 09:26:39AM +0800, Kewen.Lin wrote: >> +/* For some target specific vectorization cost which can't be handled per >> stmt, >> + we check the requisite conditions and adjust the vectorization cost >> + accordingly if satisfied. One typical example is to model shift cost for >> + vector with length by counting number of required lengths under condition >> + LOOP_VINFO_FULLY_WITH_LENGTH_P. */ >> + >> +static void >> +adjust_vect_cost (rs6000_cost_data *data) >> +{ > > Maybe call it rs6000_adjust_vect_cost? For consistency, but also it > could (in the future) collide with a globalfunction of the same name (it > is a very non-specific name). Done in v4, used rs6000_adjust_vect_cost_per_loop. > >> + /* Each length needs one shift to fill into bits 0-7. */ >> + shift_cnt += (num_vectors_m1 + 1); > > That doesn't need parentheses. Done in v4. > >> if (cost_data->loop_info) >> - rs6000_density_test (cost_data); >> + { >> + adjust_vect_cost (cost_data); >> + rs6000_density_test (cost_data); >> + } > > ^^^ consistency :-) > > The rs6000 parts are fine for trunk, thanks! Thanks! BR, Kewen