From 3f267f32212c927cadf93345a4849922ae32ab90 Mon Sep 17 00:00:00 2001 From: "Wu, Yingcong" Date: Tue, 1 Apr 2025 19:07:13 -0700 Subject: [PATCH 1/4] fix auto copy --- llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp | 2 +- llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp b/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp index c75b1e3cc4a36..24caeb78a0389 100644 --- a/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp +++ b/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp @@ -4369,7 +4369,7 @@ void FunctionStackPoisoner::processStaticAllocas() { AI->replaceAllUsesWith(NewAllocaPtr); } - auto TargetTriple = Triple(F.getParent()->getTargetTriple()); + const auto &TargetTriple = Triple(F.getParent()->getTargetTriple()); // The left-most redzone has enough space for at least 4 pointers. Value *BasePlus0 = IRB.CreateIntToPtr(LocalStackBase, IntptrPtrTy); diff --git a/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp b/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp index bfe570f42257a..d568e9a589c82 100644 --- a/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp +++ b/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp @@ -783,7 +783,7 @@ class MemorySanitizerOnSpirv { public: MemorySanitizerOnSpirv(Module &M) : M(M), C(M.getContext()), DL(M.getDataLayout()) { - auto TargetTriple = Triple(M.getTargetTriple()); + const auto &TargetTriple = Triple(M.getTargetTriple()); IsSPIRV = TargetTriple.isSPIROrSPIRV(); IntptrTy = DL.getIntPtrType(C); @@ -1250,7 +1250,7 @@ PreservedAnalyses MemorySanitizerPass::run(Module &M, if (checkIfAlreadyInstrumented(M, "nosanitize_memory")) return PreservedAnalyses::all(); bool Modified = false; - auto TargetTriple = Triple(M.getTargetTriple()); + const auto &TargetTriple = Triple(M.getTargetTriple()); if (!Options.Kernel && !TargetTriple.isSPIROrSPIRV()) { insertModuleCtor(M); From 10091ce5d00c9ef18b4f9593b2915060ac3f02d7 Mon Sep 17 00:00:00 2001 From: "Wu, Yingcong" Date: Tue, 1 Apr 2025 20:40:46 -0700 Subject: [PATCH 2/4] trigger CI From 6213a986657600a4076cccdae636ba6e1f80235d Mon Sep 17 00:00:00 2001 From: "Wu, Yingcong" Date: Tue, 1 Apr 2025 22:00:16 -0700 Subject: [PATCH 3/4] trigger CI From e4048a731c94b3d43e4f65cd9d9a64a9e39592bb Mon Sep 17 00:00:00 2001 From: "Wu, Yingcong" Date: Wed, 2 Apr 2025 19:09:33 -0700 Subject: [PATCH 4/4] trigger CI