remove some dead code

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
This commit is contained in:
Nuno Lopes 2014-04-17 22:26:44 +00:00
parent f90e2bb56a
commit 07f099b867
9 changed files with 0 additions and 71 deletions

View File

@ -97,9 +97,6 @@ class CallAnalyzer : public InstVisitor<CallAnalyzer, bool> {
void disableSROA(Value *V); void disableSROA(Value *V);
void accumulateSROACost(DenseMap<Value *, int>::iterator CostIt, void accumulateSROACost(DenseMap<Value *, int>::iterator CostIt,
int InstructionCost); int InstructionCost);
bool handleSROACandidate(bool IsSROAValid,
DenseMap<Value *, int>::iterator CostIt,
int InstructionCost);
bool isGEPOffsetConstant(GetElementPtrInst &GEP); bool isGEPOffsetConstant(GetElementPtrInst &GEP);
bool accumulateGEPOffset(GEPOperator &GEP, APInt &Offset); bool accumulateGEPOffset(GEPOperator &GEP, APInt &Offset);
bool simplifyCallSite(Function *F, CallSite CS); bool simplifyCallSite(Function *F, CallSite CS);
@ -225,21 +222,6 @@ void CallAnalyzer::accumulateSROACost(DenseMap<Value *, int>::iterator CostIt,
SROACostSavings += InstructionCost; 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. /// \brief Check whether a GEP's indices are all constant.
/// ///
/// Respects any simplified values known during the analysis of this callsite. /// Respects any simplified values known during the analysis of this callsite.

View File

@ -185,7 +185,6 @@ private:
public: public:
static char ID; static char ID;
PrintRegionPass() : RegionPass(ID), Out(dbgs()) {}
PrintRegionPass(const std::string &B, raw_ostream &o) PrintRegionPass(const std::string &B, raw_ostream &o)
: RegionPass(ID), Banner(B), Out(o) {} : RegionPass(ID), Banner(B), Out(o) {}

View File

@ -182,7 +182,6 @@ namespace {
const MDNode *Node; const MDNode *Node;
public: public:
TBAAStructTagNode() : Node(nullptr) {}
explicit TBAAStructTagNode(const MDNode *N) : Node(N) {} explicit TBAAStructTagNode(const MDNode *N) : Node(N) {}
/// Get the MDNode for this TBAAStructTagNode. /// Get the MDNode for this TBAAStructTagNode.

View File

@ -180,15 +180,6 @@ namespace {
BranchesInfo.forgetLoop(currentLoop); 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() { void initLoopData() {
loopHeader = currentLoop->getHeader(); loopHeader = currentLoop->getHeader();
loopPreheader = currentLoop->getLoopPreheader(); loopPreheader = currentLoop->getLoopPreheader();
@ -212,7 +203,6 @@ namespace {
Instruction *InsertPt); Instruction *InsertPt);
void SimplifyCode(std::vector<Instruction*> &Worklist, Loop *L); void SimplifyCode(std::vector<Instruction*> &Worklist, Loop *L);
void RemoveLoopFromHierarchy(Loop *L);
bool IsTrivialUnswitchCondition(Value *Cond, Constant **Val = 0, bool IsTrivialUnswitchCondition(Value *Cond, Constant **Val = 0,
BasicBlock **LoopExit = 0); BasicBlock **LoopExit = 0);
@ -948,17 +938,6 @@ static void ReplaceUsesOfWith(Instruction *I, Value *V,
++NumSimplify; ++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 // 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 // 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. // that value. Rewrite any uses of LIC or of properties correlated to it.

View File

@ -267,8 +267,6 @@ struct LCSSA : public FunctionPass {
} }
private: private:
bool processLoop(Loop &L);
void verifyAnalysis() const override; void verifyAnalysis() const override;
}; };
} }

View File

@ -761,12 +761,6 @@ namespace {
/// verifyAnalysis() - Verify LoopSimplifyForm's guarantees. /// verifyAnalysis() - Verify LoopSimplifyForm's guarantees.
void verifyAnalysis() const override; 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);
}; };
} }

View File

@ -709,19 +709,6 @@ public:
return true; 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 } // end anonymous namespace

View File

@ -139,7 +139,6 @@ public:
// //
// Modify the DFA. // Modify the DFA.
// //
void initialize();
void addState(State *); 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) { void DFA::addState(State *S) {
assert(!states.count(S) && "State already exists"); assert(!states.count(S) && "State already exists");
states.insert(S); states.insert(S);

View File

@ -45,8 +45,6 @@ public:
raw_ostream &OS); raw_ostream &OS);
void EmitIntrinsicToOverloadTable(const std::vector<CodeGenIntrinsic> &Ints, void EmitIntrinsicToOverloadTable(const std::vector<CodeGenIntrinsic> &Ints,
raw_ostream &OS); raw_ostream &OS);
void EmitVerifier(const std::vector<CodeGenIntrinsic> &Ints,
raw_ostream &OS);
void EmitGenerator(const std::vector<CodeGenIntrinsic> &Ints, void EmitGenerator(const std::vector<CodeGenIntrinsic> &Ints,
raw_ostream &OS); raw_ostream &OS);
void EmitAttributes(const std::vector<CodeGenIntrinsic> &Ints, void EmitAttributes(const std::vector<CodeGenIntrinsic> &Ints,