O3 and krait optimizations

Change-Id: I9083e4943f6ee66036827e4996d4070260590ed7