From 41968df51e11f581eb19c8f68a8cb2f4e8acc1c5 Mon Sep 17 00:00:00 2001 From: Devang Patel Date: Wed, 25 Apr 2007 17:15:20 +0000 Subject: [PATCH] Remove unused function argument. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36441 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Transforms/Utils/PromoteMemToReg.h | 2 +- lib/Transforms/Scalar/ScalarReplAggregates.cpp | 2 +- lib/Transforms/Utils/Mem2Reg.cpp | 2 +- lib/Transforms/Utils/PromoteMemoryToRegister.cpp | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/llvm/Transforms/Utils/PromoteMemToReg.h b/include/llvm/Transforms/Utils/PromoteMemToReg.h index a17e98c1f51..e2ad4cd847b 100644 --- a/include/llvm/Transforms/Utils/PromoteMemToReg.h +++ b/include/llvm/Transforms/Utils/PromoteMemToReg.h @@ -28,7 +28,7 @@ class AliasSetTracker; /// isAllocaPromotable - Return true if this alloca is legal for promotion. /// This is true if there are only loads and stores to the alloca... /// -bool isAllocaPromotable(const AllocaInst *AI, const TargetData &TD); +bool isAllocaPromotable(const AllocaInst *AI); /// PromoteMemToReg - Promote the specified list of alloca instructions into /// scalar registers, inserting PHI nodes as appropriate. This function makes diff --git a/lib/Transforms/Scalar/ScalarReplAggregates.cpp b/lib/Transforms/Scalar/ScalarReplAggregates.cpp index b35b087a63d..822b1786cea 100644 --- a/lib/Transforms/Scalar/ScalarReplAggregates.cpp +++ b/lib/Transforms/Scalar/ScalarReplAggregates.cpp @@ -119,7 +119,7 @@ bool SROA::performPromotion(Function &F) { // the entry node for (BasicBlock::iterator I = BB.begin(), E = --BB.end(); I != E; ++I) if (AllocaInst *AI = dyn_cast(I)) // Is it an alloca? - if (isAllocaPromotable(AI, TD)) + if (isAllocaPromotable(AI)) Allocas.push_back(AI); if (Allocas.empty()) break; diff --git a/lib/Transforms/Utils/Mem2Reg.cpp b/lib/Transforms/Utils/Mem2Reg.cpp index 9bcf0ab6486..bc29c9f2d60 100644 --- a/lib/Transforms/Utils/Mem2Reg.cpp +++ b/lib/Transforms/Utils/Mem2Reg.cpp @@ -70,7 +70,7 @@ bool PromotePass::runOnFunction(Function &F) { // the entry node for (BasicBlock::iterator I = BB.begin(), E = --BB.end(); I != E; ++I) if (AllocaInst *AI = dyn_cast(I)) // Is it an alloca? - if (isAllocaPromotable(AI, TD)) + if (isAllocaPromotable(AI)) Allocas.push_back(AI); if (Allocas.empty()) break; diff --git a/lib/Transforms/Utils/PromoteMemoryToRegister.cpp b/lib/Transforms/Utils/PromoteMemoryToRegister.cpp index 1508fbc5edf..11dca0e05f2 100644 --- a/lib/Transforms/Utils/PromoteMemoryToRegister.cpp +++ b/lib/Transforms/Utils/PromoteMemoryToRegister.cpp @@ -52,7 +52,7 @@ struct DenseMapKeyInfo > { /// isAllocaPromotable - Return true if this alloca is legal for promotion. /// This is true if there are only loads and stores to the alloca. /// -bool llvm::isAllocaPromotable(const AllocaInst *AI, const TargetData &TD) { +bool llvm::isAllocaPromotable(const AllocaInst *AI) { // FIXME: If the memory unit is of pointer or integer type, we can permit // assignments to subsections of the memory unit. @@ -178,7 +178,7 @@ void PromoteMem2Reg::run() { for (unsigned AllocaNum = 0; AllocaNum != Allocas.size(); ++AllocaNum) { AllocaInst *AI = Allocas[AllocaNum]; - assert(isAllocaPromotable(AI, TD) && + assert(isAllocaPromotable(AI) && "Cannot promote non-promotable alloca!"); assert(AI->getParent()->getParent() == &F && "All allocas should be in the same function, which is same as DF!");