[PATCH] D73912: [mlir] Turn flags in ConvertStandardToLLVM into pass flags

Alex Zinenko via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 3 13:24:11 PST 2020


ftynse added inline comments.


================
Comment at: mlir/include/mlir/Conversion/StandardToLLVM/ConvertStandardToLLVMPass.h:55
 /// this may become an enum when we have concrete uses for other options.
-std::unique_ptr<OpPassBase<ModuleOp>>
-createLowerToLLVMPass(bool useAlloca = false);
+std::unique_ptr<OpPassBase<ModuleOp>> createLowerToLLVMPass();
 
----------------
rriddle wrote:
> flaub wrote:
> > When building a pipeline at runtime (that is, not using the command line parsing), it'd be good to be able to specify options during pass creation. I've noticed that currently, even the `useAlloca` bool wasn't actually being used, only the `clUseAlloca` was used. So this is a step in the right direction (using instance specific options rather than global ones), but I think we still need the ability to pass options to the creation function.
> +1
> I've noticed that currently, even the useAlloca bool wasn't actually being used

I fixed that in e0ea706a59b9032b7f3590478080adf4f3e1486a.

+1 on being able to specify flags at pass creation time.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D73912/new/

https://reviews.llvm.org/D73912





More information about the llvm-commits mailing list