aeubanks added a comment. In D89158#2357850 <https://reviews.llvm.org/D89158#2357850>, @ychen wrote:
> IIUC, this is the NPM version of EP_EarlyAsPossible in legacy PM for O0, > right? Between the choice of (1) [this patch and ] reusing all existing EP > callbacks and letting optnone filtering out non-required passes (which I > think does not work for `-disable-O0-optnone`) and (2) a separate EP > callback, say, O0EPCallbacks, I would vote for the latter since it is more > explicit and does exactly what we expect it to do. The cost is that we also > need to add passes to O0EPCallbacks separately which I think is justified > since required passes should be rare. I took a look at the legacy PM, it adds EP_EarlyAsPossible and EP_EnabledOnOptLevel0 for -O0. I changed this to match EP_EarlyAsPossible, then we can manually add passes corresponding to EP_EnabledOnOptLevel0. EP_EnabledOnOptLevel0 was only used for sanitizers and coroutines, which are already handled. So this should take care of target specific required IR passes, since those are typically run as EP_EarlyAsPossible in the legacy PM. (I'll update the documentation once we've agreed) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89158/new/ https://reviews.llvm.org/D89158 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits