[clang] [CIR] Emit no-trapping-math and stack-protector-buffer-size function attribute (PR #234029)

Andy Kaylor via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 4 17:09:30 PST 2026


================
@@ -4058,10 +4065,16 @@ cir::FuncOp CIRGenModule::createRuntimeFunction(cir::FuncType ty,
   if (assumeConvergent)
     errorNYI("createRuntimeFunction: assumeConvergent");
 
+  bool isNew = !getGlobalValue(name);
----------------
andykaylor wrote:

I don't like that we're doing this lookup just to see if a new function was created. We're repeating the lookup inside `getOrCreateCIRFunction`. I guess this will get cached, so it should be cheap, but it feels wrong. How does classic codegen handle this?

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


More information about the cfe-commits mailing list