================
@@ -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(
----------------
andykaylor wrote:
Should we produce a diagnostic in the case where calling convention lowering is
requested for a target that doesn't support it?
https://github.com/llvm/llvm-project/pull/211335
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits