After compiling my application with the 8.1 GNU compilers, my code size increased significantly. Why does this happen?
The GNU compiler in EDK 8.1 includes an algorithm change which effects code optimization when no barrel shifter is present. The -O3 option is not optimally optimizing the code in this case. For long shifts (N), it used to use an N-times loop with a single bit shift, instead of spitting out a long series of SRL instructions. The former is low on code size, and the latter is very fast.
So when you compile using -O2 or -O3 in EDK 8.1i you will see the latter "faster" code. When you compile with -Os (size optimization) you will see smaller (original) code.