This is the mail archive of the gcc-bugs@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]

[Bug tree-optimization/50031] Sphinx3 has a 10% regression going from GCC 4.5 to GCC 4.6 on powerpc


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50031

--- Comment #3 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-08-10 09:13:03 UTC ---
I think for more elaborate costs we should allow the backend to track costs
per loop by something like

  void *state = targetm.start_vect_loop_cost ();

pass that state pointer to each cost hook we call (making sure to avoid
"duplicate" calls)

and then finish off with

  final_cost = targetm.end_vect_loop_cost (state);

so the target could have for example a way to estimate resource allocation
(like in this case, 1000s permutes but only 10 real insns) and raise
costs accordingly.

A default implementation would simply have a unsigned int where it accumulates
costs (and we would maybe stop doing that in the vectorizer itself).  Thus,
really defer costs to the target (maybe even let it compute the cost for
the scalar variants by means of passing in the scalar gimple stmt).


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