This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/50031] Sphinx3 has a 10% regression going from GCC 4.5 to GCC 4.6 on powerpc
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 10 Aug 2011 09:13:03 +0000
- Subject: [Bug tree-optimization/50031] Sphinx3 has a 10% regression going from GCC 4.5 to GCC 4.6 on powerpc
- Auto-submitted: auto-generated
- References: <bug-50031-4@http.gcc.gnu.org/bugzilla/>
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).