mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-26 05:25:47 +00:00
Add a mechanism for invalidating the LiveOutInfo of a PHI, and use it whenever
a block is visited before all of its predecessors. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126378 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -832,8 +832,25 @@ void SelectionDAGISel::SelectAllBasicBlocks(const Function &Fn) {
|
||||
CheckLineNumbers(LLVMBB);
|
||||
#endif
|
||||
|
||||
if (OptLevel != CodeGenOpt::None)
|
||||
if (OptLevel != CodeGenOpt::None) {
|
||||
bool AllPredsVisited = true;
|
||||
for (const_pred_iterator PI = pred_begin(LLVMBB), PE = pred_end(LLVMBB);
|
||||
PI != PE; ++PI) {
|
||||
if (!FuncInfo->VisitedBBs.count(*PI)) {
|
||||
AllPredsVisited = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!AllPredsVisited) {
|
||||
for (BasicBlock::const_iterator I = LLVMBB->begin(), E = LLVMBB->end();
|
||||
I != E && isa<PHINode>(I); ++I) {
|
||||
FuncInfo->InvalidatePHILiveOutRegInfo(cast<PHINode>(I));
|
||||
}
|
||||
}
|
||||
|
||||
FuncInfo->VisitedBBs.insert(LLVMBB);
|
||||
}
|
||||
|
||||
FuncInfo->MBB = FuncInfo->MBBMap[LLVMBB];
|
||||
FuncInfo->InsertPt = FuncInfo->MBB->getFirstNonPHI();
|
||||
|
Reference in New Issue
Block a user