some llvm refactoring