aeubanks added a comment.

I'm more convinced now that my initial direction was the cleanest way. It would 
simplify users of `PassBuilder` quite a bit.

I don't want to include PassManager.h into TargetMachine.h just to get 
`PassBuilder::OptimizationLevel`, so either we could factor out 
`OptimizationLevel` into its own header file so that we can pass an 
`OptimizationLevel` to `TargetMachine::registerPassBuilderCallbacks`, or we 
could just pass a `OnlyAddRequiredPasses` bool to 
`TargetMachine::registerPassBuilderCallbacks`. But either way, that can happen 
in a future change when the need arises (such as when we implement 
`AMDGPUTargetMachine::registerPassBuilderCallbacks`).


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

Reply via email to