https://github.com/boomanaiden154 created https://github.com/llvm/llvm-project/pull/240252 This abstracts across the LegacyPM and the NewPM. We add a new optional parameter to runCodeGenPipeline to take in a ModuleSummaryIndex to properly handle pipeline setup.