[PATCH] D28031: Allow target to specify early module passes

Justin Lebar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 28 10:29:22 PST 2016


jlebar added a comment.

I strongly approve of the principle of letting us add early-as-possible module passes, but I am not sure about the API here.  It seems kind of clunky that we have to check `if (PMT != PMT_FunctionPassManager)`, and that when building the PM we have to call addExtension twice.

Could we instead just make the `addEarlyAsPossiblePasses` API take a module pass manager?  It would be the responsibility of the target to instantiate a function pass manager and add it to the MPM.  This way our solution is fully general -- if we decide we want (say) early-as-possible CGSCC passes, we don't have to do anything special to make that work.

Separately, can we split the AMDGPU changes into a separate patch?


Repository:
  rL LLVM

https://reviews.llvm.org/D28031





More information about the llvm-commits mailing list