[Mlir-commits] [mlir] fbb5f73 - [mlir][docgen] Change nested check

Jacques Pienaar llvmlistbot at llvm.org
Thu Jun 22 22:06:47 PDT 2023


Author: Jacques Pienaar
Date: 2023-06-22T22:05:55-07:00
New Revision: fbb5f73371cdf6f16d4034dd334792489d647095

URL: https://github.com/llvm/llvm-project/commit/fbb5f73371cdf6f16d4034dd334792489d647095
DIFF: https://github.com/llvm/llvm-project/commit/fbb5f73371cdf6f16d4034dd334792489d647095.diff

LOG: [mlir][docgen] Change nested check

Allows for single op nested regions.

Added: 
    

Modified: 
    mlir/tools/mlir-tblgen/OpDocGen.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/tools/mlir-tblgen/OpDocGen.cpp b/mlir/tools/mlir-tblgen/OpDocGen.cpp
index 0e6ec89370d8b..c546763880a85 100644
--- a/mlir/tools/mlir-tblgen/OpDocGen.cpp
+++ b/mlir/tools/mlir-tblgen/OpDocGen.cpp
@@ -368,7 +368,7 @@ static void emitBlock(ArrayRef<Attribute> attributes,
   if (!ops.empty()) {
     os << "## Operation definition\n\n";
     for (const OpDocGroup &grouping : ops) {
-      bool nested = grouping.ops.size() > 1;
+      bool nested = !grouping.summary.empty();
       maybeNest(
           nested,
           [&](raw_ostream &os) {


        


More information about the Mlir-commits mailing list