Where are the optimization passes invoked?


I am trying to integrate a number of LLVM passes into clang. At the moment, I am quite lost as to where clang actually invokes the passes, I suppose there is a list of passes for the different optimization levels somewhere. Any hints of where to look?

/ Mattias

Look in CodeGen/BackendUtils.cpp. The LLVM PassManagerBuilder class is responsible for providing standard sets of passes.