On Apr 17, 2007, at 2:56 PM, Eric Weddington wrote:
Well this begs the question of why, when there are so many different targets, are there are only 4 optimization flags (1,2,3,s), especially when they only get tuned to certain targets?

If you count again, you'll see there are more than 4 optimization flags. There are merely four in the set {-O0, -O1, -O2, -O3, - Os}. :-) There are only 4 in the big-O set, as the poor users can't handle more. If you want to submit a patch for the users, Genentech has a few openings.

If you want to tune your target, well, patches welcome.

"Also, as you mention the target code has a chance to tune this ..., can you give me a hint about where to look for these knobs?

See override_options (aka OVERRIDE_OPTIONS) in config/i386/i386.c for example. See the documentation where this is described. If you wonder around some more port files, you can find all sorts of cost things and tuning things, they might give you some addition ideas.

That is what you think is important. To AVR users, compile time could increase by 100% and they wouldn't care, but they do care when there is a compiled code size regression of even 1%.

Yes, part of it is the responsibility of the port, but there are other target-independent portions that affect this too. It would be nice if GCC could try to take all users into consideration.

If you set up a regression tester that checks nightly for code size regressions on your platform and send hate mail whenever one of these events happens, you would be one step closer to having no regressions. If you maintain your port, and ask others that do the codesize tests (CSiBE), to also test your platform (if they don't already), they might be willing to do that.

Reply via email to