On Fri, 16 Jul 2021 at 16:33, Jason Merrill wrote: > Adjusting them based on tuning would certainly simplify a significant use > case, perhaps the only reasonable use. Cases more concerned with ABI > stability probably shouldn't use them at all. And that would mean not > needing to worry about the impossible task of finding the right values for > an entire architecture.
But it would be quite a significant change in behaviour if -mtune started affecting ABI, wouldn't it? > I'm thinking about warning by default for any use of the variables without > explicitly specifying their values on the command line. Users could disable > the warning if they're happy using whatever the defaults happen to be. I like that suggestion. Maybe the warning could suggest optimal values based on the current -mtune flag. That way -mtune wouldn't need to alter ABI, but by combining -mtune with explicit values for the variables you get the best performance. And -mtune without overriding the default values preserves ABI.