Remove unneccesary &*
authorChris Lattner <sabre@nondot.org>
Wed, 23 Apr 2003 16:36:11 +0000 (16:36 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 23 Apr 2003 16:36:11 +0000 (16:36 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5871 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/InductionVariable.cpp
lib/CodeGen/InstrSelection/InstrSelection.cpp
lib/CodeGen/MachineFunction.cpp
lib/Target/CBackend/CBackend.cpp
lib/Target/CBackend/Writer.cpp
lib/Target/SparcV9/InstrSelection/InstrSelection.cpp

index c71033e4607db668495a6dc3333d57962d3b2594..321c237c872e54701ccebccaccdc20847d5dbedc 100644 (file)
@@ -213,7 +213,7 @@ Value* InductionVariable::getExecutionCount(LoopInfo *LoopInfo) {
     DEBUG(std::cerr << "no terminator instruction!");
     return NULL; 
   }
-  SetCondInst *SCI = dyn_cast<SetCondInst>(&*B->getCondition());
+  SetCondInst *SCI = dyn_cast<SetCondInst>(B->getCondition());
 
   if (SCI && InductionType == Cannonical) {
     DEBUG(std::cerr << "sci:" << *SCI);
index 0c30b3d17da636a11c2548ccb4a7bd65e8a4858c..5e0fb8ec7259d238ff5d64432e9f267ac79d3c3b 100644 (file)
@@ -182,7 +182,7 @@ InstructionSelection::InsertCodeForPhis(Function &F)
   MachineFunction &MF = MachineFunction::get(&F);
   for (MachineFunction::iterator BB = MF.begin(); BB != MF.end(); ++BB) {
     for (BasicBlock::iterator IIt = BB->getBasicBlock()->begin();
-         PHINode *PN = dyn_cast<PHINode>(&*IIt); ++IIt) {
+         PHINode *PN = dyn_cast<PHINode>(IIt); ++IIt) {
       // FIXME: This is probably wrong...
       Value *PhiCpRes = new PHINode(PN->getType(), "PhiCp:");
 
index 7ee2dcf457877054f05ec62ba025f2fa2dc16f6d..57b34fae1f528b74dbf5db800611c3fa6171095c 100644 (file)
@@ -247,7 +247,7 @@ ComputeMaxOptionalArgsSize(const TargetMachine& target, const Function *F,
   
   for (Function::const_iterator BB = F->begin(), BBE = F->end(); BB !=BBE; ++BB)
     for (BasicBlock::const_iterator I = BB->begin(), E = BB->end(); I != E; ++I)
-      if (const CallInst *callInst = dyn_cast<CallInst>(&*I))
+      if (const CallInst *callInst = dyn_cast<CallInst>(I))
         {
           unsigned numOperands = callInst->getNumOperands() - 1;
           int numExtra = (int)numOperands-frameInfo.getNumFixedOutgoingArgs();
index 6fe00ee1afcde3b163bf7cf1b27828c937072b5b..dfe5ec2f58a6c25590be73cc905f40b5479ec483 100644 (file)
@@ -896,7 +896,7 @@ static bool isGotoCodeNeccessary(BasicBlock *From, BasicBlock *To) {
 void CWriter::printBranchToBlock(BasicBlock *CurBB, BasicBlock *Succ,
                                            unsigned Indent) {
   for (BasicBlock::iterator I = Succ->begin();
-       PHINode *PN = dyn_cast<PHINode>(&*I); ++I) {
+       PHINode *PN = dyn_cast<PHINode>(I); ++I) {
     //  now we have to do the printing
     Out << string(Indent, ' ');
     outputLValue(PN);
index 6fe00ee1afcde3b163bf7cf1b27828c937072b5b..dfe5ec2f58a6c25590be73cc905f40b5479ec483 100644 (file)
@@ -896,7 +896,7 @@ static bool isGotoCodeNeccessary(BasicBlock *From, BasicBlock *To) {
 void CWriter::printBranchToBlock(BasicBlock *CurBB, BasicBlock *Succ,
                                            unsigned Indent) {
   for (BasicBlock::iterator I = Succ->begin();
-       PHINode *PN = dyn_cast<PHINode>(&*I); ++I) {
+       PHINode *PN = dyn_cast<PHINode>(I); ++I) {
     //  now we have to do the printing
     Out << string(Indent, ' ');
     outputLValue(PN);
index 0c30b3d17da636a11c2548ccb4a7bd65e8a4858c..5e0fb8ec7259d238ff5d64432e9f267ac79d3c3b 100644 (file)
@@ -182,7 +182,7 @@ InstructionSelection::InsertCodeForPhis(Function &F)
   MachineFunction &MF = MachineFunction::get(&F);
   for (MachineFunction::iterator BB = MF.begin(); BB != MF.end(); ++BB) {
     for (BasicBlock::iterator IIt = BB->getBasicBlock()->begin();
-         PHINode *PN = dyn_cast<PHINode>(&*IIt); ++IIt) {
+         PHINode *PN = dyn_cast<PHINode>(IIt); ++IIt) {
       // FIXME: This is probably wrong...
       Value *PhiCpRes = new PHINode(PN->getType(), "PhiCp:");