[llvm] [LLVM] Make more use of IRBuilder::CreateIntrinsic. NFC. (PR #112546)

Rahul Joshi via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 16 07:33:39 PDT 2024


================
@@ -541,8 +540,7 @@ static bool CreatePrologue(Function *F, Module *M, Instruction *CheckLoc,
   AI = B.CreateAlloca(PtrTy, nullptr, "StackGuardSlot");
 
   Value *GuardSlot = getStackGuard(TLI, M, B, &SupportsSelectionDAGSP);
-  B.CreateCall(Intrinsic::getOrInsertDeclaration(M, Intrinsic::stackprotector),
-               {GuardSlot, AI});
+  B.CreateIntrinsic(Intrinsic::stackprotector, {}, {GuardSlot, AI});
----------------
jurahul wrote:

Looks like we could use an overload where we do not need to specify Types or RetTy (for non-overloaded intrinsics).

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


More information about the llvm-commits mailing list