Skip to content

Commit e01be29

Browse files
committed
add option to docstrings
1 parent bf5c68f commit e01be29

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

mlir/include/mlir/Pass/Pass.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,8 @@ class Pass {
118118
function_ref<LogicalResult(const Twine &)> errorHandler);
119119

120120
/// Prints out the pass in the textual representation of pipelines. If this is
121-
/// an adaptor pass, print its pass managers.
121+
/// an adaptor pass, print its pass managers. When `pretty` is true, the
122+
/// printed pipeline is formatted for readability.
122123
void printAsTextualPipeline(raw_ostream &os, bool pretty = false);
123124

124125
//===--------------------------------------------------------------------===//

mlir/include/mlir/Pass/PassManager.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,9 @@ class OpPassManager {
140140
detail::OpPassManagerImpl &getImpl();
141141

142142
/// Prints out the passes of the pass manager as the textual representation
143-
/// of pipelines.
143+
/// of pipelines. When `pretty` is true, the printed pipeline is formatted
144+
/// for readability.
145+
///
144146
/// Note: The quality of the string representation depends entirely on the
145147
/// the correctness of per-pass overrides of Pass::printAsTextualPipeline.
146148
void printAsTextualPipeline(raw_ostream &os, bool pretty = false) const;

mlir/lib/Pass/Pass.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,8 @@ void Pass::copyOptionValuesFrom(const Pass *other) {
8181
}
8282

8383
/// Prints out the pass in the textual representation of pipelines. If this is
84-
/// an adaptor pass, print its pass managers.
84+
/// an adaptor pass, print its pass managers. When `pretty` is true, the
85+
/// printed pipeline is formatted for readability.
8586
void Pass::printAsTextualPipeline(raw_ostream &os, bool pretty) {
8687
// Special case for adaptors to print its pass managers.
8788
if (auto *adaptor = dyn_cast<OpToOpPassAdaptor>(this)) {
@@ -395,7 +396,8 @@ StringRef OpPassManager::getOpAnchorName() const {
395396
}
396397

397398
/// Prints out the passes of the pass manager as the textual representation
398-
/// of pipelines.
399+
/// of pipelines. When `pretty` is true, the printed pipeline is formatted for
400+
/// readability.
399401
void printAsTextualPipeline(
400402
raw_indented_ostream &os, StringRef anchorName,
401403
const llvm::iterator_range<OpPassManager::pass_iterator> &passes,

0 commit comments

Comments
 (0)