Currently, AbstractOperation fields are function pointers.
Modifying them to unique_function allow them to contain
runtime information.
For instance, this allows operations to be defined at runtime.
Paths
| Differential D103031
[mlir] Use unique_function in AbstractOperation fields ClosedPublic Authored by math-fehr on May 24 2021, 8:53 AM.
Details Summary Currently, AbstractOperation fields are function pointers. For instance, this allows operations to be defined at runtime.
Diff Detail
Event TimelineThis revision is now accepted and ready to land.May 24 2021, 9:16 AM Comment Actions There seems to be a compilation problem on windows, and my last two patches fix it. Basically, if A is a class and foo a templated static method of A, then constructing a unique_function with unique_function(&A::foo<Args>) triggers a compilation error C2298 on windows. I believe that this is a bug in the windows compiler, since this is a pointer to a static method. I found a workaround using lambdas to make my code work on windows, but I believe that this can have a runtime cost.
Comment Actions Thanks, I addressed the comments. Also, I do not have commit access, so could one of you land it? This revision was landed with ongoing or failed builds.May 25 2021, 11:40 AM Closed by commit rG1bf3fd9bb55a: [mlir] Use unique_function in AbstractOperation fields (authored by math-fehr, committed by rriddle). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 347695 mlir/include/mlir/IR/OpDefinition.h
mlir/include/mlir/IR/OperationSupport.h
mlir/lib/IR/MLIRContext.cpp
mlir/lib/Parser/Parser.cpp
|
Accidental change?