[mlir][Transforms][NFC] Rename MaterializationCallbackFn (#138814)

There are two kind of materialization callbacks: one for target
materializations and one for source materializations. The callback type
for target materializations is `TargetMaterializationCallbackFn`. This
commit renames the one for source materializations from
`MaterializationCallbackFn` to `SourceMaterializationCallbackFn`, for
consistency.

There used to be a single callback type for both kind of
materializations, but the materialization function signatures have
changed over time.

Also clean up a few places in the documentation that still referred to
argument materializations.
This commit is contained in:
Matthias Springer
2025-05-08 08:22:38 +02:00
committed by GitHub
parent df4eac2f8b
commit fc8484f0e3
3 changed files with 13 additions and 14 deletions

View File

@@ -338,7 +338,7 @@ class TypeConverter {
typename T = typename llvm::function_traits<FnT>::template arg_t<1>>
void addSourceMaterialization(FnT &&callback) {
sourceMaterializations.emplace_back(
wrapMaterialization<T>(std::forward<FnT>(callback)));
wrapSourceMaterialization<T>(std::forward<FnT>(callback)));
}
/// This method registers a materialization that will be called when
@@ -362,7 +362,7 @@ class TypeConverter {
typename T = typename llvm::function_traits<FnT>::template arg_t<1>>
void addTargetMaterialization(FnT &&callback) {
targetMaterializations.emplace_back(
wrapMaterialization<T>(std::forward<FnT>(callback)));
wrapTargetMaterialization<T>(std::forward<FnT>(callback)));
}
};
```