remove some dead code
authorNuno Lopes <nunoplopes@sapo.pt>
Thu, 17 Apr 2014 22:26:44 +0000 (22:26 +0000)
committerNuno Lopes <nunoplopes@sapo.pt>
Thu, 17 Apr 2014 22:26:44 +0000 (22:26 +0000)
 lib/Analysis/IPA/InlineCost.cpp         |   18 ------------------
 lib/Analysis/RegionPass.cpp             |    1 -
 lib/Analysis/TypeBasedAliasAnalysis.cpp |    1 -
 lib/Transforms/Scalar/LoopUnswitch.cpp  |   21 ---------------------
 lib/Transforms/Utils/LCSSA.cpp          |    2 --
 lib/Transforms/Utils/LoopSimplify.cpp   |    6 ------
 utils/TableGen/AsmWriterEmitter.cpp     |   13 -------------
 utils/TableGen/DFAPacketizerEmitter.cpp |    7 -------
 utils/TableGen/IntrinsicEmitter.cpp     |    2 --
 9 files changed, 71 deletions(-)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206506 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/IPA/InlineCost.cpp
lib/Analysis/RegionPass.cpp
lib/Analysis/TypeBasedAliasAnalysis.cpp
lib/Transforms/Scalar/LoopUnswitch.cpp
lib/Transforms/Utils/LCSSA.cpp
lib/Transforms/Utils/LoopSimplify.cpp
utils/TableGen/AsmWriterEmitter.cpp
utils/TableGen/DFAPacketizerEmitter.cpp
utils/TableGen/IntrinsicEmitter.cpp

index a803f8c3bf970161b3420e4177a5380eb91c2e56..aa108b945a71eb383ee9e16c438b2504a76654e3 100644 (file)
@@ -97,9 +97,6 @@ class CallAnalyzer : public InstVisitor<CallAnalyzer, bool> {
   void disableSROA(Value *V);
   void accumulateSROACost(DenseMap<Value *, int>::iterator CostIt,
                           int InstructionCost);
-  bool handleSROACandidate(bool IsSROAValid,
-                           DenseMap<Value *, int>::iterator CostIt,
-                           int InstructionCost);
   bool isGEPOffsetConstant(GetElementPtrInst &GEP);
   bool accumulateGEPOffset(GEPOperator &GEP, APInt &Offset);
   bool simplifyCallSite(Function *F, CallSite CS);
@@ -225,21 +222,6 @@ void CallAnalyzer::accumulateSROACost(DenseMap<Value *, int>::iterator CostIt,
   SROACostSavings += InstructionCost;
 }
 
-/// \brief Helper for the common pattern of handling a SROA candidate.
-/// Either accumulates the cost savings if the SROA remains valid, or disables
-/// SROA for the candidate.
-bool CallAnalyzer::handleSROACandidate(bool IsSROAValid,
-                                       DenseMap<Value *, int>::iterator CostIt,
-                                       int InstructionCost) {
-  if (IsSROAValid) {
-    accumulateSROACost(CostIt, InstructionCost);
-    return true;
-  }
-
-  disableSROA(CostIt);
-  return false;
-}
-
 /// \brief Check whether a GEP's indices are all constant.
 ///
 /// Respects any simplified values known during the analysis of this callsite.
index 1798c36fc1312168cce7521bc4a8ff49776cb64f..4986fab5ff6b5bb26f4937858f1fe6865b5e41da 100644 (file)
@@ -185,7 +185,6 @@ private:
 
 public:
   static char ID;
-  PrintRegionPass() : RegionPass(ID), Out(dbgs()) {}
   PrintRegionPass(const std::string &B, raw_ostream &o)
       : RegionPass(ID), Banner(B), Out(o) {}
 
index 620d1799a5499e877c807cd97fd413a1b1ad8eeb..6738720db954da697a727400817934c573c173cc 100644 (file)
@@ -182,7 +182,6 @@ namespace {
     const MDNode *Node;
 
   public:
-    TBAAStructTagNode() : Node(nullptr) {}
     explicit TBAAStructTagNode(const MDNode *N) : Node(N) {}
 
     /// Get the MDNode for this TBAAStructTagNode.
index 5954f4af51fbe563c64eb42d65948f573fb3843e..9cd6600f90517e995dd08dab4eba97dc95a1da71 100644 (file)
@@ -180,15 +180,6 @@ namespace {
       BranchesInfo.forgetLoop(currentLoop);
     }
 
-    /// RemoveLoopFromWorklist - If the specified loop is on the loop worklist,
-    /// remove it.
-    void RemoveLoopFromWorklist(Loop *L) {
-      std::vector<Loop*>::iterator I = std::find(LoopProcessWorklist.begin(),
-                                                 LoopProcessWorklist.end(), L);
-      if (I != LoopProcessWorklist.end())
-        LoopProcessWorklist.erase(I);
-    }
-
     void initLoopData() {
       loopHeader = currentLoop->getHeader();
       loopPreheader = currentLoop->getLoopPreheader();
@@ -212,7 +203,6 @@ namespace {
                                         Instruction *InsertPt);
 
     void SimplifyCode(std::vector<Instruction*> &Worklist, Loop *L);
-    void RemoveLoopFromHierarchy(Loop *L);
     bool IsTrivialUnswitchCondition(Value *Cond, Constant **Val = 0,
                                     BasicBlock **LoopExit = 0);
 
@@ -948,17 +938,6 @@ static void ReplaceUsesOfWith(Instruction *I, Value *V,
   ++NumSimplify;
 }
 
-/// RemoveLoopFromHierarchy - We have discovered that the specified loop has
-/// become unwrapped, either because the backedge was deleted, or because the
-/// edge into the header was removed.  If the edge into the header from the
-/// latch block was removed, the loop is unwrapped but subloops are still alive,
-/// so they just reparent loops.  If the loops are actually dead, they will be
-/// removed later.
-void LoopUnswitch::RemoveLoopFromHierarchy(Loop *L) {
-  LPM->deleteLoopFromQueue(L);
-  RemoveLoopFromWorklist(L);
-}
-
 // RewriteLoopBodyWithConditionConstant - We know either that the value LIC has
 // the value specified by Val in the specified loop, or we know it does NOT have
 // that value.  Rewrite any uses of LIC or of properties correlated to it.
index d5381753a29f88dde562e16fbe1c2a9e01f1771c..ade3d116cd42e80911877d50a0bb259944899b22 100644 (file)
@@ -267,8 +267,6 @@ struct LCSSA : public FunctionPass {
   }
 
 private:
-  bool processLoop(Loop &L);
-
   void verifyAnalysis() const override;
 };
 }
index 47083ead7b34b6421b1280a8b73484708f6dbc50..66542acc92b411448c317f6f67f2366ba14df3b2 100644 (file)
@@ -761,12 +761,6 @@ namespace {
 
     /// verifyAnalysis() - Verify LoopSimplifyForm's guarantees.
     void verifyAnalysis() const override;
-
-  private:
-    bool ProcessLoop(Loop *L);
-    BasicBlock *RewriteLoopExitBlock(Loop *L, BasicBlock *Exit);
-    Loop *SeparateNestedLoop(Loop *L, BasicBlock *Preheader);
-    BasicBlock *InsertUniqueBackedgeBlock(Loop *L, BasicBlock *Preheader);
   };
 }
 
index 754b61ef3ffe1dcc88293798d374261712fe4fcc..718bb805fe41429eb128d6c2d54cc3642d13df53 100644 (file)
@@ -709,19 +709,6 @@ public:
 
     return true;
   }
-
-  bool operator()(const IAPrinter &RHS) {
-    if (Conds.size() < RHS.Conds.size())
-      return true;
-
-    unsigned Idx = 0;
-    for (std::vector<std::string>::iterator
-           I = Conds.begin(), E = Conds.end(); I != E; ++I)
-      if (*I != RHS.Conds[Idx++])
-        return *I < RHS.Conds[Idx++];
-
-    return false;
-  }
 };
 
 } // end anonymous namespace
index 8de624234142804bf739d3c0169ac116bc297f70..b9e34af90e7f486d0ce2b652f61c2fb7c1ac7875 100644 (file)
@@ -139,7 +139,6 @@ public:
   //
   // Modify the DFA.
   //
-  void initialize();
   void addState(State *);
 
   //
@@ -248,12 +247,6 @@ bool State::canAddInsnClass(unsigned InsnClass) const {
 }
 
 
-void DFA::initialize() {
-  assert(currentState && "Missing current state");
-  currentState->isInitial = true;
-}
-
-
 void DFA::addState(State *S) {
   assert(!states.count(S) && "State already exists");
   states.insert(S);
index 7b0a2b6c6d252f56536a6c3975898dba9b9b5aae..2dfa3641aa9d78a7d7efa454eeffe2b7321e4c8f 100644 (file)
@@ -45,8 +45,6 @@ public:
                                 raw_ostream &OS);
   void EmitIntrinsicToOverloadTable(const std::vector<CodeGenIntrinsic> &Ints,
                                     raw_ostream &OS);
-  void EmitVerifier(const std::vector<CodeGenIntrinsic> &Ints,
-                    raw_ostream &OS);
   void EmitGenerator(const std::vector<CodeGenIntrinsic> &Ints,
                      raw_ostream &OS);
   void EmitAttributes(const std::vector<CodeGenIntrinsic> &Ints,