[llvm] 14e819f - [Instrumentor] Delete dead code from getAlloca() (#226331)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 25 14:11:14 PDT 2026
Author: Eli Friedman
Date: 2026-09-25T14:11:08-07:00
New Revision: 14e819f14307fd85fe830cf9fe8d168a27b3db89
URL: https://github.com/llvm/llvm-project/commit/14e819f14307fd85fe830cf9fe8d168a27b3db89
DIFF: https://github.com/llvm/llvm-project/commit/14e819f14307fd85fe830cf9fe8d168a27b3db89.diff
LOG: [Instrumentor] Delete dead code from getAlloca() (#226331)
Added:
Modified:
llvm/include/llvm/Transforms/IPO/InstrumentorUtils.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/Transforms/IPO/InstrumentorUtils.h b/llvm/include/llvm/Transforms/IPO/InstrumentorUtils.h
index d90c4b255ff8c..44c6c87057850 100644
--- a/llvm/include/llvm/Transforms/IPO/InstrumentorUtils.h
+++ b/llvm/include/llvm/Transforms/IPO/InstrumentorUtils.h
@@ -60,15 +60,13 @@ struct InstrumentorIRBuilderTy {
}
/// Get a temporary alloca to communicate (large) values with the runtime.
- AllocaInst *getAlloca(Function *Fn, Type *Ty, bool MatchType = false) {
+ AllocaInst *getAlloca(Function *Fn, Type *Ty) {
const DataLayout &DL = Fn->getDataLayout();
auto *&AllocaList = AllocaMap[{Fn, DL.getTypeAllocSize(Ty)}];
if (!AllocaList)
AllocaList = new AllocaListTy;
AllocaInst *AI = nullptr;
for (auto *&ListAI : *AllocaList) {
- if (MatchType && ListAI->getAllocatedType() != Ty)
- continue;
AI = ListAI;
ListAI = *AllocaList->rbegin();
break;
More information about the llvm-commits
mailing list