Remove unused function argument.
authorDevang Patel <dpatel@apple.com>
Wed, 25 Apr 2007 17:15:20 +0000 (17:15 +0000)
committerDevang Patel <dpatel@apple.com>
Wed, 25 Apr 2007 17:15:20 +0000 (17:15 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36441 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Transforms/Utils/PromoteMemToReg.h
lib/Transforms/Scalar/ScalarReplAggregates.cpp
lib/Transforms/Utils/Mem2Reg.cpp
lib/Transforms/Utils/PromoteMemoryToRegister.cpp

index a17e98c1f51fb7c3a0f213f94348f3a1816dedbd..e2ad4cd847bc5e152abcf83fb70cc8b7bc74dc0a 100644 (file)
@@ -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
index b35b087a63de6813f5a7a7dadaacd5149d2a22a3..822b1786ceae6a7b37acaf319c53f7caef69310c 100644 (file)
@@ -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<AllocaInst>(I))       // Is it an alloca?
-        if (isAllocaPromotable(AI, TD))
+        if (isAllocaPromotable(AI))
           Allocas.push_back(AI);
 
     if (Allocas.empty()) break;
index 9bcf0ab64867cb155bfd4b8342b630ae7e1e8618..bc29c9f2d607e0e3664fc140462468fc5d761c8d 100644 (file)
@@ -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<AllocaInst>(I))       // Is it an alloca?
-        if (isAllocaPromotable(AI, TD))
+        if (isAllocaPromotable(AI))
           Allocas.push_back(AI);
 
     if (Allocas.empty()) break;
index 1508fbc5edfe815044589b666c8b82f8c710bcfd..11dca0e05f205ea70c9f9f150ce34086faa57b81 100644 (file)
@@ -52,7 +52,7 @@ struct DenseMapKeyInfo<std::pair<BasicBlock*, unsigned> > {
 /// 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!");