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 {
/// Collect a set of patterns to convert from the LHLO dialect to LLVM.
void PopulateLhloToLLVMConversionPatterns(const LowerToLLVMOptions &options,
LLVMTypeConverter *converter,
void PopulateLhloToLLVMConversionPatterns(LLVMTypeConverter *converter,
OwningRewritePatternList *patterns);
} // namespace lmhlo

View File

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

View File

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