mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-21 18:24:23 +00:00
fit some more code in 80 cols.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50016 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -115,8 +115,8 @@ namespace {
|
|||||||
LoopProcessWorklist.erase(I);
|
LoopProcessWorklist.erase(I);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Split all of the edges from inside the loop to their exit blocks. Update
|
/// Split all of the edges from inside the loop to their exit blocks.
|
||||||
/// the appropriate Phi nodes as we do so.
|
/// Update the appropriate Phi nodes as we do so.
|
||||||
void SplitExitEdges(Loop *L, const SmallVector<BasicBlock *, 8> &ExitBlocks,
|
void SplitExitEdges(Loop *L, const SmallVector<BasicBlock *, 8> &ExitBlocks,
|
||||||
SmallVector<BasicBlock *, 8> &MiddleBlocks);
|
SmallVector<BasicBlock *, 8> &MiddleBlocks);
|
||||||
|
|
||||||
@ -644,10 +644,10 @@ void LoopUnswitch::ReplaceLoopExternalDFMember(Loop *L, BasicBlock *BB,
|
|||||||
DF->addToFrontier(DFI, NewDFMember);
|
DF->addToFrontier(DFI, NewDFMember);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// SplitExitEdges -
|
/// SplitExitEdges - Split all of the edges from inside the loop to their exit
|
||||||
/// Split all of the edges from inside the loop to their exit blocks. Update
|
/// blocks. Update the appropriate Phi nodes as we do so.
|
||||||
/// the appropriate Phi nodes as we do so.
|
void LoopUnswitch::SplitExitEdges(Loop *L,
|
||||||
void LoopUnswitch::SplitExitEdges(Loop *L, const SmallVector<BasicBlock *, 8> &ExitBlocks,
|
const SmallVector<BasicBlock *, 8> &ExitBlocks,
|
||||||
SmallVector<BasicBlock *, 8> &MiddleBlocks) {
|
SmallVector<BasicBlock *, 8> &MiddleBlocks) {
|
||||||
|
|
||||||
for (unsigned i = 0, e = ExitBlocks.size(); i != e; ++i) {
|
for (unsigned i = 0, e = ExitBlocks.size(); i != e; ++i) {
|
||||||
@ -854,8 +854,8 @@ void LoopUnswitch::UnswitchNontrivialCondition(Value *LIC, Constant *Val,
|
|||||||
// If LBB's dominance frontier includes DFMember
|
// If LBB's dominance frontier includes DFMember
|
||||||
// such that DFMember is also a member of LoopDF then
|
// such that DFMember is also a member of LoopDF then
|
||||||
// - Remove DFMember from LBB's dominance frontier
|
// - Remove DFMember from LBB's dominance frontier
|
||||||
// - Copy loop exiting blocks', that are dominated by BB, dominance frontier
|
// - Copy loop exiting blocks', that are dominated by BB,
|
||||||
// member in BB's dominance frontier
|
// dominance frontier member in BB's dominance frontier
|
||||||
|
|
||||||
DominanceFrontier::iterator LBBI = DF->find(LBB);
|
DominanceFrontier::iterator LBBI = DF->find(LBB);
|
||||||
DominanceFrontier::iterator NBBI = DF->find(NBB);
|
DominanceFrontier::iterator NBBI = DF->find(NBB);
|
||||||
@ -874,7 +874,8 @@ void LoopUnswitch::UnswitchNontrivialCondition(Value *LIC, Constant *Val,
|
|||||||
|
|
||||||
// If LBB dominates loop exits then insert loop exit block's DF
|
// If LBB dominates loop exits then insert loop exit block's DF
|
||||||
// into B's DF.
|
// into B's DF.
|
||||||
for(SmallVector<BasicBlock *, 4>::iterator LExitI = ExitingBlocks.begin(),
|
for(SmallVector<BasicBlock *, 4>::iterator
|
||||||
|
LExitI = ExitingBlocks.begin(),
|
||||||
LExitE = ExitingBlocks.end(); LExitI != LExitE; ++LExitI) {
|
LExitE = ExitingBlocks.end(); LExitI != LExitE; ++LExitI) {
|
||||||
BasicBlock *E = *LExitI;
|
BasicBlock *E = *LExitI;
|
||||||
|
|
||||||
@ -892,7 +893,8 @@ void LoopUnswitch::UnswitchNontrivialCondition(Value *LIC, Constant *Val,
|
|||||||
removeB = true;
|
removeB = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If B's replacement is inserted in DF then now is the time to remove B.
|
// If B's replacement is inserted in DF then now is the time to remove
|
||||||
|
// B.
|
||||||
if (removeB) {
|
if (removeB) {
|
||||||
DF->removeFromFrontier(LBBI, B);
|
DF->removeFromFrontier(LBBI, B);
|
||||||
if (L->contains(B))
|
if (L->contains(B))
|
||||||
|
Reference in New Issue
Block a user