Please see D63976 where we rejected a similar change in favor of just letting this be controllable at compile time.
To the extent that the pass pipeline is affected by the size optimization level, I think we should change the passes so that they respect the optsize/minsize attributes.
nit: getOptLevel seems a bit too generic for something that's LTO specific. The MachO port has the concept of passing an opt level that generates more efficient opcodes. Suggestions are welcome here - perhaps getLTOOptLevel would be better here?