summaryrefslogtreecommitdiff
path: root/lib/Transforms/Instrumentation
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-04-23 16:37:45 +0000
committerChris Lattner <sabre@nondot.org>2003-04-23 16:37:45 +0000
commite408e25132b8de8c757db1e3ddcd70432dfeb24d (patch)
tree629c22dc753c0a18f2188a3089f0a8d19fc73464 /lib/Transforms/Instrumentation
parent2ee82e05e3e41fa23951d3503db5483a36dc3ae3 (diff)
downloadllvm-e408e25132b8de8c757db1e3ddcd70432dfeb24d.tar.gz
llvm-e408e25132b8de8c757db1e3ddcd70432dfeb24d.tar.bz2
llvm-e408e25132b8de8c757db1e3ddcd70432dfeb24d.tar.xz
Remove unnecesary &*'s
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5872 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Instrumentation')
-rw-r--r--lib/Transforms/Instrumentation/ProfilePaths/EdgeCode.cpp2
-rw-r--r--lib/Transforms/Instrumentation/ProfilePaths/InstLoops.cpp2
-rw-r--r--lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp2
-rw-r--r--lib/Transforms/Instrumentation/ProfilePaths/RetracePath.cpp16
-rw-r--r--lib/Transforms/Instrumentation/TraceValues.cpp6
5 files changed, 14 insertions, 14 deletions
diff --git a/lib/Transforms/Instrumentation/ProfilePaths/EdgeCode.cpp b/lib/Transforms/Instrumentation/ProfilePaths/EdgeCode.cpp
index 8fabbc9ca3..61c60ec7c5 100644
--- a/lib/Transforms/Instrumentation/ProfilePaths/EdgeCode.cpp
+++ b/lib/Transforms/Instrumentation/ProfilePaths/EdgeCode.cpp
@@ -386,7 +386,7 @@ void insertBB(Edge ed,
for(BasicBlock::iterator BB2Inst = BB2->begin(), BBend = BB2->end();
BB2Inst != BBend; ++BB2Inst){
- if(PHINode *phiInst=dyn_cast<PHINode>(&*BB2Inst)){
+ if(PHINode *phiInst=dyn_cast<PHINode>(BB2Inst)){
int bbIndex=phiInst->getBasicBlockIndex(BB1);
assert(bbIndex>=0);
phiInst->setIncomingBlock(bbIndex, newBB);
diff --git a/lib/Transforms/Instrumentation/ProfilePaths/InstLoops.cpp b/lib/Transforms/Instrumentation/ProfilePaths/InstLoops.cpp
index c876238a1e..64075c8024 100644
--- a/lib/Transforms/Instrumentation/ProfilePaths/InstLoops.cpp
+++ b/lib/Transforms/Instrumentation/ProfilePaths/InstLoops.cpp
@@ -133,7 +133,7 @@ void getBackEdgesVisit(BasicBlock *u,
for(BasicBlock::iterator BB2Inst = BB->begin(), BBend = BB->end();
BB2Inst != BBend; ++BB2Inst){
- if(PHINode *phiInst=dyn_cast<PHINode>(&*BB2Inst)){
+ if (PHINode *phiInst = dyn_cast<PHINode>(BB2Inst)){
int bbIndex = phiInst->getBasicBlockIndex(u);
if(bbIndex>=0){
phiInst->setIncomingBlock(bbIndex, newBB);
diff --git a/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp b/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp
index 57b17a590f..79b94e8755 100644
--- a/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp
+++ b/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp
@@ -87,7 +87,7 @@ bool ProfilePaths::runOnFunction(Function &F){
nodes.push_back(nd);
if(&*BB == ExitNode)
exitNode=nd;
- if(&*BB==F.begin())
+ if(BB==F.begin())
startNode=nd;
}
diff --git a/lib/Transforms/Instrumentation/ProfilePaths/RetracePath.cpp b/lib/Transforms/Instrumentation/ProfilePaths/RetracePath.cpp
index c222bdfb34..805250fd9a 100644
--- a/lib/Transforms/Instrumentation/ProfilePaths/RetracePath.cpp
+++ b/lib/Transforms/Instrumentation/ProfilePaths/RetracePath.cpp
@@ -140,7 +140,7 @@ void getBBtrace(vector<BasicBlock *> &vBB, int pathNo, Function *M){//,
BasicBlock *ExitNode = 0;
for (Function::iterator I = M->begin(), E = M->end(); I != E; ++I){
if (isa<ReturnInst>(I->getTerminator())) {
- ExitNode = &*I;
+ ExitNode = I;
break;
}
}
@@ -160,7 +160,7 @@ void getBBtrace(vector<BasicBlock *> &vBB, int pathNo, Function *M){//,
if(BB->size()==3 || BB->size() ==2){
for(BasicBlock::iterator II = BB->begin(), IE = BB->end();
II != IE; ++II){
- if(CallInst *callInst = dyn_cast<CallInst>(&*II)){
+ if(CallInst *callInst = dyn_cast<CallInst>(II)){
//std::cerr<<*callInst;
Function *calledFunction = callInst->getCalledFunction();
if(calledFunction && calledFunction->getName() == "trigger"){
@@ -199,7 +199,7 @@ void getBBtrace(vector<BasicBlock *> &vBB, int pathNo, Function *M){//,
continue;
//if(BB->size()==3)
- //if(CallInst *callInst = dyn_cast<CallInst>(&*BB->getInstList().begin()))
+ //if(CallInst *callInst = dyn_cast<CallInst>(BB->getInstList().begin()))
//if(callInst->getCalledFunction()->getName() == "trigger")
//continue;
@@ -216,20 +216,20 @@ void getBBtrace(vector<BasicBlock *> &vBB, int pathNo, Function *M){//,
Node *nd=findBB(nodes, BB);
assert(nd && "No node for this edge!");
- for(BasicBlock::succ_iterator s=succ_begin(&*BB), se=succ_end(&*BB);
+ for(BasicBlock::succ_iterator s=succ_begin(BB), se=succ_end(BB);
s!=se; ++s){
if(triggerBBs[*s] == 9){
//if(!pathReg[M]){ //Get the path register for this!
//if(BB->size()>8)
- // if(LoadInst *ldInst = dyn_cast<LoadInst>(&*BB->getInstList().begin()))
+ // if(LoadInst *ldInst = dyn_cast<LoadInst>(BB->getInstList().begin()))
// pathReg[M] = ldInst->getPointerOperand();
//}
continue;
}
//if((*s)->size()==3)
//if(CallInst *callInst =
- // dyn_cast<CallInst>(&*(*s)->getInstList().begin()))
+ // dyn_cast<CallInst>((*s)->getInstList().begin()))
// if(callInst->getCalledFunction()->getName() == "trigger")
// continue;
@@ -284,11 +284,11 @@ void getBBtrace(vector<BasicBlock *> &vBB, int pathNo, Function *M){//,
VBI != VBE; ++VBI){
for(BasicBlock::iterator BBI = (*VBI)->begin(), BBE = (*VBI)->end();
BBI != BBE; ++BBI){
- if(LoadInst *ldInst = dyn_cast<LoadInst>(&*BBI)){
+ if(LoadInst *ldInst = dyn_cast<LoadInst>(BBI)){
if(pathReg[M] == ldInst->getPointerOperand())
instToErase.push_back(ldInst);
}
- else if(StoreInst *stInst = dyn_cast<StoreInst>(&*BBI)){
+ else if(StoreInst *stInst = dyn_cast<StoreInst>(BBI)){
if(pathReg[M] == stInst->getPointerOperand())
instToErase.push_back(stInst);
}
diff --git a/lib/Transforms/Instrumentation/TraceValues.cpp b/lib/Transforms/Instrumentation/TraceValues.cpp
index 75149ce912..499bc4cf9d 100644
--- a/lib/Transforms/Instrumentation/TraceValues.cpp
+++ b/lib/Transforms/Instrumentation/TraceValues.cpp
@@ -298,9 +298,9 @@ ReleasePtrSeqNumbers(BasicBlock *BB,
ExternalFuncs& externalFuncs) {
for (BasicBlock::iterator II=BB->begin(), IE = BB->end(); II != IE; ++II)
- if (FreeInst *FI = dyn_cast<FreeInst>(&*II))
+ if (FreeInst *FI = dyn_cast<FreeInst>(II))
InsertReleaseInst(FI->getOperand(0), BB, FI,externalFuncs.ReleasePtrFunc);
- else if (AllocaInst *AI = dyn_cast<AllocaInst>(&*II))
+ else if (AllocaInst *AI = dyn_cast<AllocaInst>(II))
InsertRecordInst(AI, BB, AI->getNext(), externalFuncs.RecordPtrFunc);
}
@@ -332,7 +332,7 @@ static void TraceValuesAtBBExit(BasicBlock *BB,
// instruction *preceding* InsertPos to check when to terminate the loop.
//
for (BasicBlock::iterator II = BB->begin(); &*II != InsertPos; ++II) {
- if (StoreInst *SI = dyn_cast<StoreInst>(&*II)) {
+ if (StoreInst *SI = dyn_cast<StoreInst>(II)) {
assert(valuesStoredInFunction &&
"Should not be printing a store instruction at function exit");
LoadInst *LI = new LoadInst(SI->getPointerOperand(), "reload." +