[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

@@ -77,7 +77,7 @@ AxisInfo AxisInfo::getPessimisticValueState(Value value) {
if (blockArg && blockArg.getOwner()->isEntryBlock()) {
Operation *op = blockArg.getOwner()->getParentOp();
if (auto fun = dyn_cast<func::FuncOp>(op))
if (auto fun = dyn_cast<triton::FuncOp>(op))
initPessimisticStateFromFunc(blockArg.getArgNumber(), fun,
&knownContiguity, &knownDivisibility,
&knownConstancy);