[clang] [CIR] Upstream initial support for CIR flattening (PR #130648)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 10 11:15:30 PDT 2025


================
@@ -0,0 +1,28 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef CLANG_CIR_DIALECT_PASSES_TD
+#define CLANG_CIR_DIALECT_PASSES_TD
+
+include "mlir/Pass/PassBase.td"
+
+def CIRFlattenCFG : Pass<"cir-flatten-cfg"> {
+  let summary = "Produces flatten CFG";
+  let description = [{
+    This pass transforms CIR and inline all the nested regions. Thus,
+    the next post condtions are met after the pass applied:
----------------
erichkeane wrote:

```suggestion
    the following conditions are true after the pass is applied:
```

https://github.com/llvm/llvm-project/pull/130648


More information about the cfe-commits mailing list