[clang] [ClangIR] Add ABI Lowering Design Document (PR #178326)

Andy Kaylor via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 13 14:57:39 PST 2026


================
@@ -0,0 +1,602 @@
+# ClangIR ABI Lowering - Design Document
+
+## 1. Introduction
+
+This design describes calling convention lowering that **builds on the GSoC ABI
+Lowering Library** (PR #140112): we use its `abi::Type*` and target ABI logic
+and add an MLIR integration layer (MLIRTypeMapper, ABI lowering pass, and
+dialect rewriters).  The framework relies on the LLVM ABI library in
+`llvm/lib/ABI/` as the single source of truth for ABI classification; MLIR
+dialects use it via an adapter layer.  The design enables CIR to perform
+ABI-compliant calling convention lowering, be reusable by other MLIR dialects
+(particularly FIR), and achieve parity with the CIR incubator for x86_64 and
----------------
andykaylor wrote:

```suggestion
dialects use it via an adapter layer.  The design provides a way to perform
ABI-compliant calling convention lowering that can be used by any MLIR dialect
that implements the necessary interfaces.
```


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


More information about the cfe-commits mailing list