Updates LLVM usage to match
[b7cfa6ca9283](https://github.com/llvm/llvm-project/commit/b7cfa6ca9283)

PiperOrigin-RevId: 324331764
This commit is contained in:
A. Unique TensorFlower 2020-07-31 18:23:00 -07:00 committed by TensorFlow MLIR Team
parent 577a81a66d
commit 7809320a5e
3 changed files with 7 additions and 11 deletions

View File

@ -90,8 +90,7 @@ void PopulateTanhToApproximationPatterns(MLIRContext *context,
namespace lmhlo { namespace lmhlo {
/// Collect a set of patterns to convert from the LHLO dialect to LLVM. /// Collect a set of patterns to convert from the LHLO dialect to LLVM.
void PopulateLhloToLLVMConversionPatterns(const LowerToLLVMOptions &options, void PopulateLhloToLLVMConversionPatterns(LLVMTypeConverter *converter,
LLVMTypeConverter *converter,
OwningRewritePatternList *patterns); OwningRewritePatternList *patterns);
} // namespace lmhlo } // namespace lmhlo

View File

@ -361,11 +361,10 @@ struct ReshapeMemRefCastOpConverter
} // namespace } // namespace
void PopulateLhloToLLVMConversionPatterns(const LowerToLLVMOptions &options, void PopulateLhloToLLVMConversionPatterns(LLVMTypeConverter *converter,
LLVMTypeConverter *converter,
OwningRewritePatternList *patterns) { OwningRewritePatternList *patterns) {
patterns->insert<DynamicMemRefCastOpConverter, ReshapeMemRefCastOpConverter, patterns->insert<DynamicMemRefCastOpConverter, ReshapeMemRefCastOpConverter,
StaticMemRefCastOpConverter>(*converter, options); StaticMemRefCastOpConverter>(*converter);
} }
} // namespace lmhlo } // namespace lmhlo

View File

@ -36,13 +36,11 @@ class TestLhloToLLVMPass
ModuleOp m = getOperation(); ModuleOp m = getOperation();
OwningRewritePatternList patterns; OwningRewritePatternList patterns;
LLVMTypeConverter converter(m.getContext()); LLVMTypeConverter converter(&getContext());
populateStdToLLVMConversionPatterns(converter, patterns); populateStdToLLVMConversionPatterns(converter, patterns);
PopulateLhloToLLVMConversionPatterns( PopulateLhloToLLVMConversionPatterns(&converter, &patterns);
LowerToLLVMOptions::getDefaultOptions(), &converter, &patterns); populateLoopToStdConversionPatterns(patterns, &getContext());
mlir::populateLoopToStdConversionPatterns(patterns, &getContext()); populateAffineToStdConversionPatterns(patterns, &getContext());
mlir::populateAffineToStdConversionPatterns(patterns, m.getContext());
ConversionTarget target(getContext()); ConversionTarget target(getContext());
target.addLegalDialect<LLVM::LLVMDialect>(); target.addLegalDialect<LLVM::LLVMDialect>();