Mike Stump wrote:
On Apr 20, 2007, at 6:42 PM, Robert Dewar wrote:
One possibility would be to have a -Om switch (or whatever) that
says "do all optimizations for this machine that help".
Ick, gross. No.
Well OK, Ick, but below you recommend removingf the overly
pedantic rule. I agree with that, but the above is a
compromise suggestion if we can't remove the rule.
So, Mike, my question is, assuming we cannot remove the
rule what do you want to do
a) nothing
b) something like the above
c) something else, please specify
I must say the rule about all optimizations being the same on
all machines seems odd to me
I'd look at it this way, it isn't unreasonable to have cost metrics
that are in fact different for each cpu and possible each tune choice
that greatly effects _any_ codegen choice. Sure, we can unroll the
loops always on all targets, but, we can crank up the costs of extra
instructions on chips where those costs are high, net result, almost
no unrolling. For chips where the costs are cheap and they need to
exposed instructions to be able to optimizer further, trivially, the
costs involved are totally different. Net result, better code gen
for each.
I do however think the concept of not allowing targets to set and
unset optimization choices is, well, overly pedantic.