-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
start trying to build the pdll-generated code
- Loading branch information
Showing
5 changed files
with
70 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#include "lib/Transform/Arith/MulToAddPdll.h" | ||
#include "mlir/Dialect/Arith/IR/Arith.h" | ||
#include "mlir/IR/PatternMatch.h" | ||
#include "mlir/Transforms/GreedyPatternRewriteDriver.h" | ||
#include "mlir/include/mlir/Pass/Pass.h" | ||
|
||
namespace mlir { | ||
namespace tutorial { | ||
|
||
#define GEN_PASS_DEF_MULTOADDPDLL | ||
#include "lib/Transform/Arith/Passes.h.inc" | ||
|
||
struct MulToAddPdll : impl::MulToAddPdllBase<MulToAddPdll> { | ||
using MulToAddPdllBase::MulToAddPdllBase; | ||
|
||
void runOnOperation() { | ||
mlir::RewritePatternSet patterns(&getContext()); | ||
populateGeneratedPDLLPatterns(patterns); | ||
(void)applyPatternsAndFoldGreedily(getOperation(), std::move(patterns)); | ||
} | ||
}; | ||
|
||
} // namespace tutorial | ||
} // namespace mlir |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#ifndef LIB_TRANSFORM_ARITH_MULTOADDPDLL_H_ | ||
#define LIB_TRANSFORM_ARITH_MULTOADDPDLL_H_ | ||
|
||
#include "mlir/Pass/Pass.h" | ||
#include "mlir/IR/PatternMatch.h" | ||
#include "mlir/Dialect/Arith/IR/Arith.h" | ||
|
||
namespace mlir { | ||
namespace tutorial { | ||
|
||
#define GEN_PASS_DECL_MULTOADDPDLL | ||
#include "lib/Transform/Arith/Passes.h.inc" | ||
|
||
#include "lib/Transform/Arith/MulToAddPdll.h.inc" | ||
|
||
} // namespace tutorial | ||
} // namespace mlir | ||
|
||
#endif // LIB_TRANSFORM_ARITH_MULTOADDPDLL_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters