================ @@ -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 +AArch64. **What the design is, in concrete terms:** inputs are high-level +function signatures in CIR, FIR, or other MLIR dialects; outputs are ABI-lowered +signatures and call sites; lowering runs as an MLIR pass in the compilation +pipeline, before dialect lowering to LLVM IR or other back ends. + +### 1.1 Problem Statement ---------------- andykaylor wrote:
I think you should remove this section. It won't be useful after this is implemented. https://github.com/llvm/llvm-project/pull/178326 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
