diff --git a/mlir/include/mlir/IR/Builders.h b/mlir/include/mlir/IR/Builders.h index ad59ea63a6901..50fa6d0302a69 100644 --- a/mlir/include/mlir/IR/Builders.h +++ b/mlir/include/mlir/IR/Builders.h @@ -513,6 +513,12 @@ class OpBuilder : public Builder { /// Create an operation of specific op type at the current insertion point, /// and immediately try to fold it. This functions populates 'results' with /// the results of the operation. + /// + /// Note: This performs opportunistic eager folding during IR construction. + /// The folders are designed to operate efficiently on canonical IR, which + /// this API does not enforce. Complete folding isn't only expected in the + /// context of canonicalization which intertwine folders with pattern + /// rewrites until fixed-point. template void createOrFold(SmallVectorImpl &results, Location location, Args &&...args) {