Optimize code by clang