NFC: Implement OwningRewritePatternList as a class instead of a using directive.

This allows for proper forward declaration, as opposed to leaking the internal implementation via a using directive. This also allows for all pattern building to go through 'insert' methods on the OwningRewritePatternList, replacing uses of 'push_back' and 'RewriteListBuilder'.

PiperOrigin-RevId: 261816316
This commit is contained in:
River Riddle
2019-08-05 18:37:56 -07:00
committed by A. Unique TensorFlower
parent 3657966e83
commit a0df3ebd15
34 changed files with 113 additions and 133 deletions

View File

@@ -1023,7 +1023,7 @@ void mlir::LLVM::ensureDistinctSuccessors(ModuleOp m) {
void mlir::populateStdToLLVMConversionPatterns(
LLVMTypeConverter &converter, OwningRewritePatternList &patterns) {
// FIXME: this should be tablegen'ed
RewriteListBuilder<
patterns.insert<
AddFOpLowering, AddIOpLowering, AndOpLowering, AllocOpLowering,
BranchOpLowering, CallIndirectOpLowering, CallOpLowering, CmpIOpLowering,
CondBranchOpLowering, ConstLLVMOpLowering, DeallocOpLowering,
@@ -1032,8 +1032,7 @@ void mlir::populateStdToLLVMConversionPatterns(
MemRefCastOpLowering, MulFOpLowering, MulIOpLowering, OrOpLowering,
RemISOpLowering, RemIUOpLowering, RemFOpLowering, ReturnOpLowering,
SelectOpLowering, SIToFPLowering, StoreOpLowering, SubFOpLowering,
SubIOpLowering, XOrOpLowering>::build(patterns, *converter.getDialect(),
converter);
SubIOpLowering, XOrOpLowering>(*converter.getDialect(), converter);
}
// Convert types using the stored LLVM IR module.