[BACKEND] Replace Func Dialect with custom triton ops (func, call, return) (#1502)

MLIR current only supports a custom inlining interface per dialect, so
we cannot change the inlining decision of `func.func`.


https://discourse.llvm.org/t/avoid-inlining-some-functions-using-the-func-dialect/69830/3

Could revert it back once they've designed a better inliner interface.

Inlining attributes will be implemented in the next PR since this PR is
already huge.
This commit is contained in:
Keren Zhou
2023-04-10 21:08:40 -07:00
committed by GitHub
parent 640f3c3921
commit 6d0ed41307
37 changed files with 834 additions and 502 deletions

View File

@@ -9,7 +9,7 @@ using namespace mlir;
namespace {
struct TestAliasPass
: public PassWrapper<TestAliasPass, OperationPass<func::FuncOp>> {
: public PassWrapper<TestAliasPass, OperationPass<triton::FuncOp>> {
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(TestAliasPass);

View File

@@ -6,7 +6,7 @@ using namespace mlir;
namespace {
struct TestAllocationPass
: public PassWrapper<TestAllocationPass, OperationPass<func::FuncOp>> {
: public PassWrapper<TestAllocationPass, OperationPass<triton::FuncOp>> {
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(TestAllocationPass);

View File

@@ -7,7 +7,7 @@ using namespace mlir;
namespace {
struct TestAxisInfoPass
: public PassWrapper<TestAxisInfoPass, OperationPass<func::FuncOp>> {
: public PassWrapper<TestAxisInfoPass, OperationPass<triton::FuncOp>> {
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(TestAxisInfoPass);

View File

@@ -11,7 +11,7 @@ using namespace mlir;
namespace {
struct TestMembarPass
: public PassWrapper<TestMembarPass, OperationPass<func::FuncOp>> {
: public PassWrapper<TestMembarPass, OperationPass<triton::FuncOp>> {
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(TestMembarPass);