[mlir] ConvertStandardToLLVM: do not rely on command line options internally
authorAlex Zinenko <zinenko@google.com>
Mon, 3 Feb 2020 12:49:21 +0000 (13:49 +0100)
committerAlex Zinenko <zinenko@google.com>
Mon, 3 Feb 2020 12:50:41 +0000 (13:50 +0100)
commite0ea706a59b9032b7f3590478080adf4f3e1486a
tree7bbf12554092ae31a7926b8aaf8b342db4e3a764
parent0ce57731da9bf5967d0332b0b1d35790b65007d7
[mlir] ConvertStandardToLLVM: do not rely on command line options internally

The patterns for converting `std.alloc` and `std.dealoc` can be configured to
use `llvm.alloca` instead of calling `malloc` and `free`. This configuration
has been only possible through a command-line flag, despite the presence of a
(misleading) parameter in the pass constructor. Use the parameter instead and
only initalize it from the command line flags if the pass is constructed from
the mlir-opt registration.
mlir/include/mlir/Conversion/StandardToLLVM/ConvertStandardToLLVMPass.h
mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp