================
@@ -49,6 +60,19 @@ runCIRToCIRPasses(mlir::ModuleOp theModule, 
mlir::MLIRContext &mlirContext,
 
   pm.addPass(mlir::createTargetLoweringPass());
   pm.addPass(mlir::createCXXABILoweringPass());
+
+  if (enableCallConvLowering) {
+    // CallConvLowering rewrites signatures and call sites using the 
classifier,
+    // so it must run after CXXABILowering has lowered C++ ABI types to plain
+    // records the classifier can handle.  Only the x86_64 System V classifier
+    // is implemented; other targets are left unchanged.
+    CallConvTarget target =
+        getCallConvTarget(astContext.getTargetInfo().getTriple());
+    if (target != CallConvTarget::None)
+      pm.addPass(mlir::createCallConvLoweringPass(
----------------
adams381 wrote:

I'm not sure this is necessary.  I have the backlog of calling convention 
lowering work that I am upstreaming now that the LLVM ABI classifier is merged. 
 I have ~12 more PRs until this flag is no longer necessary and will be on by 
default.  This flag is mostly for you, Erich, and I to be able to use until it 
is on by default.  E.g., I think this flag might unblock Erich on self build.

https://github.com/llvm/llvm-project/pull/211335
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to