Issue 97916
Summary [MLIR] [Pass] [Dialect] [New Feature]Add PassHelper Dialect and new feature for driver that enable dynamically passes order control
Labels mlir
Assignees
Reporter mingzheTerapines
    MLIR is an AI compiler, but for pass driver tool part, it is not that "AI". Because all passes are in static order.
However, we could predict what next pass or following passes should go after analysing the features of this IR(That's what machine learning/ AI does).
So here is my proposal:
1. Add PassHelper Dialect for every IR. This dialcet gives
a. information of this IR, such as involving what kinds of dialects, hardware/software based, LLM imported or something
b. features of this IR, having side effect Ops or something
c. following pass red list/black list (hoping some kind of optimization)
d. ...
2.  Add PassHelper related class in pass driver tool:
a. Generating sevral passes order by the features of IRs involved in projects.(It may be easy just referring to name like AA2BB BB2CC or red list mentioned in DIalect, also can be imporved by some machine learning)
b. Giving warnging for some IR meeting following IR in black list.
3. Add next layer IR/Dialect verifier or something.
 I am meeting this converting: hw.struct_inject was marked Pure, which means no memory effect. But after converting, here comes a llvm.insertvalue, which seems accessing memory.
![image](https://github.com/llvm/llvm-project/assets/166383385/25d56412-d260-4fd3-8c54-28eab8563ae7)

_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to