diff options
author | Hongbin Zheng <etherzhhb@gmail.com> | 2012-08-27 13:49:24 +0000 |
---|---|---|
committer | Hongbin Zheng <etherzhhb@gmail.com> | 2012-08-27 13:49:24 +0000 |
commit | 23a22a29441b8b7d948e6ff7c2afb39e6528cfbd (patch) | |
tree | 0bb4504427bfc0b72c531a3ebb1eb25ebfd21baf /lib/Analysis | |
parent | 3b4998fd8bb0c9e6c0c0a5cfc79cf4df0b0d75f7 (diff) | |
download | llvm-23a22a29441b8b7d948e6ff7c2afb39e6528cfbd.tar.gz llvm-23a22a29441b8b7d948e6ff7c2afb39e6528cfbd.tar.bz2 llvm-23a22a29441b8b7d948e6ff7c2afb39e6528cfbd.tar.xz |
Remove the the block_node_iterator of Region, replace it by the block_iterator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162672 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis')
-rw-r--r-- | lib/Analysis/RegionInfo.cpp | 24 | ||||
-rw-r--r-- | lib/Analysis/RegionPass.cpp | 5 |
2 files changed, 5 insertions, 24 deletions
diff --git a/lib/Analysis/RegionInfo.cpp b/lib/Analysis/RegionInfo.cpp index 868f4834b7..ea5bf02870 100644 --- a/lib/Analysis/RegionInfo.cpp +++ b/lib/Analysis/RegionInfo.cpp @@ -47,7 +47,7 @@ static cl::opt<enum Region::PrintStyle> printStyle("print-region-style", cl::values( clEnumValN(Region::PrintNone, "none", "print no details"), clEnumValN(Region::PrintBB, "bb", - "print regions in detail with block_node_iterator"), + "print regions in detail with block_iterator"), clEnumValN(Region::PrintRN, "rn", "print regions in detail with element_iterator"), clEnumValEnd)); @@ -246,22 +246,6 @@ void Region::verifyRegionNest() const { verifyRegion(); } -Region::block_node_iterator Region::block_node_begin() { - return GraphTraits<FlatIt<Region*> >::nodes_begin(this); -} - -Region::block_node_iterator Region::block_node_end() { - return GraphTraits<FlatIt<Region*> >::nodes_end(this); -} - -Region::const_block_node_iterator Region::block_node_begin() const { - return GraphTraits<FlatIt<const Region*> >::nodes_begin(this); -} - -Region::const_block_node_iterator Region::block_node_end() const { - return GraphTraits<FlatIt<const Region*> >::nodes_end(this); -} - Region::element_iterator Region::element_begin() { return GraphTraits<Region*>::nodes_begin(this); } @@ -425,10 +409,8 @@ void Region::print(raw_ostream &OS, bool print_tree, unsigned level, OS.indent(level*2 + 2); if (Style == PrintBB) { - for (const_block_node_iterator I = block_node_begin(), - E = block_node_end(); - I != E; ++I) - OS << **I << ", "; // TODO: remove the last "," + for (const_block_iterator I = block_begin(), E = block_end(); I != E; ++I) + OS << (*I)->getName() << ", "; // TODO: remove the last "," } else if (Style == PrintRN) { for (const_element_iterator I = element_begin(), E = element_end(); I!=E; ++I) OS << **I << ", "; // TODO: remove the last ", diff --git a/lib/Analysis/RegionPass.cpp b/lib/Analysis/RegionPass.cpp index c97b5ebd7d..9208fa21d7 100644 --- a/lib/Analysis/RegionPass.cpp +++ b/lib/Analysis/RegionPass.cpp @@ -195,10 +195,9 @@ public: virtual bool runOnRegion(Region *R, RGPassManager &RGM) { Out << Banner; - for (Region::block_node_iterator I = R->block_node_begin(), - E = R->block_node_end(); + for (Region::block_iterator I = R->block_begin(), E = R->block_end(); I != E; ++I) - (*I)->getEntry()->print(Out); + (*I)->print(Out); return false; } |