Add O3 optimization for modules