[clang] [CIR] Add support for AST call expressions on cir.call (PR #207261)
Andy Kaylor via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 2 12:53:58 PDT 2026
================
@@ -1684,6 +1684,10 @@ def CIR_ASTVarDeclAttr : CIR_AST<"VarDecl", "var.decl", [
ASTVarDeclInterface
]>;
+def CIR_ASTCallExprAttr : CIR_AST<"CallExpr", "call.expr", [
+ ASTCallExprInterface
----------------
andykaylor wrote:
Rithik and I talked about this earlier today, and I said then that I thought it was OK to go ahead with this under the understanding that the AST hook is just a temporary workaround until we know exactly what we need from the AST, but since then I've looked at how the incubator IdiomIdentifier pass is using it, and I think maybe it's better to handle it without the AST node, adding special attributes as we need them.
@SharmaRithik Look at how `CXXSpecialMemberAttr` is currently implemented on `cir::FuncOp`. I think we probably want something similar to that with optional call information on `CallOpBase`. For the things currently implemented in IdiomRecognizer and LibOpt, I think `isCalleeInStdNamespace` is really all you need. The rest can be deduced from that.
https://github.com/llvm/llvm-project/pull/207261
More information about the cfe-commits
mailing list