mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-25 17:20:48 +00:00
The name (and comment describing) of llvm::GetFirstDebuigLocInBasicBlock no longer represents what the function does. Therefore, the function is removed and its functionality is folded into the only place in the code-base where it was being used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159133 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -202,10 +202,6 @@ void SplitLandingPadPredecessors(BasicBlock *OrigBB,ArrayRef<BasicBlock*> Preds,
|
|||||||
ReturnInst *FoldReturnIntoUncondBranch(ReturnInst *RI, BasicBlock *BB,
|
ReturnInst *FoldReturnIntoUncondBranch(ReturnInst *RI, BasicBlock *BB,
|
||||||
BasicBlock *Pred);
|
BasicBlock *Pred);
|
||||||
|
|
||||||
/// GetFirstDebugLocInBasicBlock - Return first valid DebugLoc entry in a
|
|
||||||
/// given basic block.
|
|
||||||
DebugLoc GetFirstDebugLocInBasicBlock(const BasicBlock *BB);
|
|
||||||
|
|
||||||
} // End llvm namespace
|
} // End llvm namespace
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -671,12 +671,3 @@ ReturnInst *llvm::FoldReturnIntoUncondBranch(ReturnInst *RI, BasicBlock *BB,
|
|||||||
return cast<ReturnInst>(NewRet);
|
return cast<ReturnInst>(NewRet);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// GetFirstDebugLocInBasicBlock - Return first valid DebugLoc entry in a
|
|
||||||
/// given basic block.
|
|
||||||
DebugLoc llvm::GetFirstDebugLocInBasicBlock(const BasicBlock *BB) {
|
|
||||||
if (const Instruction *I = BB->getFirstNonPHI())
|
|
||||||
return I->getDebugLoc();
|
|
||||||
// Scanning entire block may be too expensive, if the first instruction
|
|
||||||
// does not have valid location info.
|
|
||||||
return DebugLoc();
|
|
||||||
}
|
|
||||||
|
@@ -190,8 +190,11 @@ Value *SSAUpdater::GetValueInMiddleOfBlock(BasicBlock *BB) {
|
|||||||
return V;
|
return V;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set DebugLoc.
|
// Set the DebugLoc of the inserted PHI, if available.
|
||||||
InsertedPHI->setDebugLoc(GetFirstDebugLocInBasicBlock(BB));
|
DebugLoc DL;
|
||||||
|
if (const Instruction *I = BB->getFirstNonPHI())
|
||||||
|
DL = I->getDebugLoc();
|
||||||
|
InsertedPHI->setDebugLoc(DL);
|
||||||
|
|
||||||
// If the client wants to know about all new instructions, tell it.
|
// If the client wants to know about all new instructions, tell it.
|
||||||
if (InsertedPHIs) InsertedPHIs->push_back(InsertedPHI);
|
if (InsertedPHIs) InsertedPHIs->push_back(InsertedPHI);
|
||||||
|
Reference in New Issue
Block a user