Integrate LLVM at llvm/llvm-project@b7cfa6ca92
Updates LLVM usage to match [b7cfa6ca9283](https://github.com/llvm/llvm-project/commit/b7cfa6ca9283) PiperOrigin-RevId: 324331764
This commit is contained in:
parent
577a81a66d
commit
7809320a5e
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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>();
|
||||||
|
|
Loading…
Reference in New Issue