mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-29 10:25:12 +00:00
Pull predecessor and successor iterators out of the CFG*.h files, and plop them into
the BasicBlock class where they should be. pred_begin/pred_end become methods on BasicBlock, and the cfg namespace isn't used anymore. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@691 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -63,7 +63,8 @@ void cfg::DominatorSet::calcForwardDominatorSet(const Method *M) {
|
||||
df_iterator<const Method*> It = df_begin(M), End = df_end(M);
|
||||
for ( ; It != End; ++It) {
|
||||
const BasicBlock *BB = *It;
|
||||
pred_const_iterator PI = pred_begin(BB), PEnd = pred_end(BB);
|
||||
BasicBlock::pred_const_iterator PI = BB->pred_begin(),
|
||||
PEnd = BB->pred_end();
|
||||
if (PI != PEnd) { // Is there SOME predecessor?
|
||||
// Loop until we get to a predecessor that has had it's dom set filled
|
||||
// in at least once. We are guaranteed to have this because we are
|
||||
@@ -114,7 +115,8 @@ cfg::DominatorSet::DominatorSet(Method *M, bool PostDomSet)
|
||||
idf_iterator<const BasicBlock*> It = idf_begin(Root), End = idf_end(Root);
|
||||
for ( ; It != End; ++It) {
|
||||
const BasicBlock *BB = *It;
|
||||
succ_const_iterator PI = succ_begin(BB), PEnd = succ_end(BB);
|
||||
BasicBlock::succ_const_iterator PI = BB->succ_begin(),
|
||||
PEnd = BB->succ_end();
|
||||
if (PI != PEnd) { // Is there SOME predecessor?
|
||||
// Loop until we get to a successor that has had it's dom set filled
|
||||
// in at least once. We are guaranteed to have this because we are
|
||||
@@ -320,8 +322,8 @@ cfg::DominanceFrontier::calcDomFrontier(const DominatorTree &DT,
|
||||
const BasicBlock *BB = Node->getNode();
|
||||
DomSetType &S = Frontiers[BB]; // The new set to fill in...
|
||||
|
||||
for (succ_const_iterator SI = succ_begin(BB), SE = succ_end(BB);
|
||||
SI != SE; ++SI) {
|
||||
for (BasicBlock::succ_const_iterator SI = BB->succ_begin(),
|
||||
SE = BB->succ_end(); SI != SE; ++SI) {
|
||||
// Does Node immediately dominate this successor?
|
||||
if (DT[*SI]->getIDom() != Node)
|
||||
S.insert(*SI);
|
||||
@@ -354,8 +356,8 @@ cfg::DominanceFrontier::calcPostDomFrontier(const DominatorTree &DT,
|
||||
DomSetType &S = Frontiers[BB]; // The new set to fill in...
|
||||
if (!Root) return S;
|
||||
|
||||
for (pred_const_iterator SI = pred_begin(BB), SE = pred_end(BB);
|
||||
SI != SE; ++SI) {
|
||||
for (BasicBlock::pred_const_iterator SI = BB->pred_begin(),
|
||||
SE = BB->pred_end(); SI != SE; ++SI) {
|
||||
// Does Node immediately dominate this predeccessor?
|
||||
if (DT[*SI]->getIDom() != Node)
|
||||
S.insert(*SI);
|
||||
|
Reference in New Issue
Block a user