diff options
author | Jean Christophe Beyler <jean.christophe.beyler@intel.com> | 2014-04-29 14:40:41 -0700 |
---|---|---|
committer | Jean Christophe Beyler <jean.christophe.beyler@intel.com> | 2014-05-22 11:29:01 -0700 |
commit | 44e5bdec17d0528b90cc0773be2beb76dcafdc5b (patch) | |
tree | 5d683f023d070f62d9355cc452c24920553fb9a4 /compiler/dex/pass_driver.cc | |
parent | b8033db2a8dc6f7c7e29b1552177542964f56e44 (diff) | |
download | android_art-44e5bdec17d0528b90cc0773be2beb76dcafdc5b.tar.gz android_art-44e5bdec17d0528b90cc0773be2beb76dcafdc5b.tar.bz2 android_art-44e5bdec17d0528b90cc0773be2beb76dcafdc5b.zip |
ART: Topological Sort Traversal Implementation
- Added a topological sort implementation for traversal.
- Useful for traversals that require traversing the predecessors first.
- Added a function to BasicBlock to detect if it is an exception block.
Change-Id: I573da1768a635c6fd0259573dbb46b112132e129
Signed-off-by: Jean Christophe Beyler <jean.christophe.beyler@intel.com>
Signed-off-by: Razvan A Lupusoru <razvan.a.lupusoru@intel.com>
Signed-off-by: Yixin Shou <yixin.shou@intel.com>
Signed-off-by: Chao-ying Fu <chao-ying.fu@intel.com>
Signed-off-by: Udayan Banerji <udayan.banerji@intel.com>
Diffstat (limited to 'compiler/dex/pass_driver.cc')
-rw-r--r-- | compiler/dex/pass_driver.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/dex/pass_driver.cc b/compiler/dex/pass_driver.cc index 999ed2af5c..ca936cd41a 100644 --- a/compiler/dex/pass_driver.cc +++ b/compiler/dex/pass_driver.cc @@ -162,6 +162,12 @@ void PassDriver::DispatchPass(CompilationUnit* c_unit, const Pass* curPass) { case kAllNodes: DoWalkBasicBlocks<AllNodesIterator>(c_unit, curPass); break; + case kTopologicalSortTraversal: + DoWalkBasicBlocks<TopologicalSortIterator>(c_unit, curPass); + break; + case kRepeatingTopologicalSortTraversal: + DoWalkBasicBlocks<RepeatingTopologicalSortIterator>(c_unit, curPass); + break; case kNoNodes: break; default: |