summaryrefslogtreecommitdiff
path: root/lib/Transforms/Instrumentation
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2006-11-02 20:25:50 +0000
committerReid Spencer <rspencer@reidspencer.com>2006-11-02 20:25:50 +0000
commit3ed469ccd7b028a030b550d84b7336d146f5d8fa (patch)
tree66c6b892b6330e9e2eacb4a2c4e4dacf078ee216 /lib/Transforms/Instrumentation
parentef42a01113a1ee8ef0f2c803ec05a5f20eca2854 (diff)
downloadllvm-3ed469ccd7b028a030b550d84b7336d146f5d8fa.tar.gz
llvm-3ed469ccd7b028a030b550d84b7336d146f5d8fa.tar.bz2
llvm-3ed469ccd7b028a030b550d84b7336d146f5d8fa.tar.xz
For PR786:
Turn on -Wunused and -Wno-unused-parameter. Clean up most of the resulting fall out by removing unused variables. Remaining warnings have to do with unused functions (I didn't want to delete code without review) and unused variables in generated code. Maintainers should clean up the remaining issues when they see them. All changes pass DejaGnu tests and Olden. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31380 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Instrumentation')
-rw-r--r--lib/Transforms/Instrumentation/RSProfiling.cpp1
-rw-r--r--lib/Transforms/Instrumentation/TraceBasicBlocks.cpp2
2 files changed, 1 insertions, 2 deletions
diff --git a/lib/Transforms/Instrumentation/RSProfiling.cpp b/lib/Transforms/Instrumentation/RSProfiling.cpp
index 5d6654d504..671b3bcf22 100644
--- a/lib/Transforms/Instrumentation/RSProfiling.cpp
+++ b/lib/Transforms/Instrumentation/RSProfiling.cpp
@@ -580,7 +580,6 @@ static void CollapsePhi(BasicBlock* btarget, BasicBlock* bsrc) {
for(BasicBlock::iterator ib = btarget->begin(), ie = btarget->end();
ib != ie; ++ib)
if (PHINode* phi = dyn_cast<PHINode>(&*ib)) {
- unsigned total = phi->getNumIncomingValues();
std::map<BasicBlock*, Value*> counter;
for(unsigned i = 0; i < phi->getNumIncomingValues(); ) {
if (counter[phi->getIncomingBlock(i)]) {
diff --git a/lib/Transforms/Instrumentation/TraceBasicBlocks.cpp b/lib/Transforms/Instrumentation/TraceBasicBlocks.cpp
index 8bf6001053..003ea0d26a 100644
--- a/lib/Transforms/Instrumentation/TraceBasicBlocks.cpp
+++ b/lib/Transforms/Instrumentation/TraceBasicBlocks.cpp
@@ -56,7 +56,7 @@ static void InsertInstrumentationCall (BasicBlock *BB,
while (isa<AllocaInst>(InsertPos) || isa<PHINode>(InsertPos))
++InsertPos;
- Instruction *InstrCall = new CallInst (InstrFn, Args, "", InsertPos);
+ new CallInst (InstrFn, Args, "", InsertPos);
}
bool TraceBasicBlocks::runOnModule(Module &M) {