This patch is the first in the sequence of three patches for supporting size optimization with LTO. The planned patches are:
1: Standardizing the use of OptimizationLevel across pass builders, which includes both SpeedupLevel and SizeLevel.
2: Enable the support for -Os and -Oz for LTO in lld.
3: Tune the LTO pipeline for size optimization.
Since we already have a class that describes both speed and size levels of optimization, I believe it is a good idea to use across the code base when defining optimization levels.
In the next patch, instead of adding a SizeLevel variable for the LTO configuration, I'll be able to simply use this OptimizationLevel variable.
I think this change - moving OptimizationLevel out - should be in its own patch, to avoid noise.