mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-09 11:25:55 +00:00
Remove CleanupDbgInfo, instcombine does this and its not worth duplicating it
here. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83789 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -141,10 +141,6 @@ namespace {
|
|||||||
///
|
///
|
||||||
void HoistRegion(DomTreeNode *N);
|
void HoistRegion(DomTreeNode *N);
|
||||||
|
|
||||||
// Cleanup debug information (remove stoppoints with no coressponding
|
|
||||||
// instructions).
|
|
||||||
void CleanupDbgInfoRegion(DomTreeNode *N);
|
|
||||||
|
|
||||||
/// inSubLoop - Little predicate that returns true if the specified basic
|
/// inSubLoop - Little predicate that returns true if the specified basic
|
||||||
/// block is in a subloop of the current one, not the current one itself.
|
/// block is in a subloop of the current one, not the current one itself.
|
||||||
///
|
///
|
||||||
@@ -292,7 +288,6 @@ bool LICM::runOnLoop(Loop *L, LPPassManager &LPM) {
|
|||||||
//
|
//
|
||||||
SinkRegion(DT->getNode(L->getHeader()));
|
SinkRegion(DT->getNode(L->getHeader()));
|
||||||
HoistRegion(DT->getNode(L->getHeader()));
|
HoistRegion(DT->getNode(L->getHeader()));
|
||||||
CleanupDbgInfoRegion(DT->getNode(L->getHeader()));
|
|
||||||
|
|
||||||
// Now that all loop invariants have been removed from the loop, promote any
|
// Now that all loop invariants have been removed from the loop, promote any
|
||||||
// memory references to scalars that we can...
|
// memory references to scalars that we can...
|
||||||
@@ -344,36 +339,6 @@ void LICM::SinkRegion(DomTreeNode *N) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void LICM::CleanupDbgInfoRegion(DomTreeNode *N) {
|
|
||||||
BasicBlock *BB = N->getBlock();
|
|
||||||
|
|
||||||
// If this subregion is not in the top level loop at all, exit.
|
|
||||||
if (!CurLoop->contains(BB)) return;
|
|
||||||
|
|
||||||
// We are processing blocks in reverse dfo, so process children first...
|
|
||||||
const std::vector<DomTreeNode*> &Children = N->getChildren();
|
|
||||||
for (unsigned i = 0, e = Children.size(); i != e; ++i)
|
|
||||||
CleanupDbgInfoRegion(Children[i]);
|
|
||||||
|
|
||||||
// Only need to process the contents of this block if it is not part of a
|
|
||||||
// subloop (which would already have been processed).
|
|
||||||
if (inSubLoop(BB)) return;
|
|
||||||
|
|
||||||
// We modify the basicblock, so don't cache end()
|
|
||||||
for (BasicBlock::iterator I=BB->begin(); I != BB->end();) {
|
|
||||||
Instruction *Last = 0;
|
|
||||||
// Remove consecutive dbgstoppoints, leave only last
|
|
||||||
do {
|
|
||||||
if (Last) {
|
|
||||||
Last->eraseFromParent();
|
|
||||||
Changed = true;
|
|
||||||
}
|
|
||||||
Last = I;
|
|
||||||
++I;
|
|
||||||
} while (isa<DbgStopPointInst>(Last) && isa<DbgStopPointInst>(I));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// HoistRegion - Walk the specified region of the CFG (defined by all blocks
|
/// HoistRegion - Walk the specified region of the CFG (defined by all blocks
|
||||||
/// dominated by the specified block, and that are in the current loop) in depth
|
/// dominated by the specified block, and that are in the current loop) in depth
|
||||||
/// first order w.r.t the DominatorTree. This allows us to visit definitions
|
/// first order w.r.t the DominatorTree. This allows us to visit definitions
|
||||||
|
Reference in New Issue
Block a user