[PATCH] Add vector cost model density heuristic

Richard Guenther rguenther@suse.de
Mon Jun 11 14:58:00 GMT 2012


On Mon, 11 Jun 2012, David Edelsohn wrote:

> On Mon, Jun 11, 2012 at 10:48 AM, Richard Guenther <rguenther@suse.de> wrote:
> > On Mon, 11 Jun 2012, David Edelsohn wrote:
> >
> >> On Mon, Jun 11, 2012 at 7:40 AM, Richard Guenther <rguenther@suse.de> wrote:
> >>
> >> > Hmm.  I don't like this patch or its general idea too much.  Instead
> >> > I'd like us to move more of the cost model detail to the target, giving
> >> > it a chance to look at the whole loop before deciding on a cost.  ISTR
> >> > posting the overall idea at some point, but let me repeat it here instead
> >> > of trying to find that e-mail.
> >>
> >> Richard,
> >>
> >> Allowing the target to see the entire loop and have more control over
> >> the cost model is a fine goal, but the current code is using incorrect
> >> heuristics. Requiring a complete re-write of the auto-vectorizer cost
> >> model should not be a requirement for fixing the current code.
> >
> > If fixing the current code adds more "magic" hooks at the wrong spot
> > then yes, in stage1 I can make you think about a more proper solution
> > to the issue.
> 
> First, these are not magic hooks.

Well, they are at least magic numbers and heuristics that apply
generally and not only to the single issue in sphinx.  And in
fact how it works for sphinx _is_ magic.

> Second, I suggest that you need to rephrase "I can make you" and
> re-send your reply.

Sorry for my bad english.  Consider it meaning that I'd rather have
you think about a more proper solution.  That's what patch review
is about after all, no?  Sometimes a complete re-write (which gets
more difficult which each of the patches "enhancing" the not ideal
current state) is the best thing to do.

Richard.


More information about the Gcc-patches mailing list