summaryrefslogtreecommitdiffstats
path: root/compiler/dex/ssa_transformation.cc
diff options
context:
space:
mode:
authorJean Christophe Beyler <jean.christophe.beyler@intel.com>2014-01-07 10:07:18 -0800
committerIan Rogers <irogers@google.com>2014-01-13 19:34:52 -0800
commit4e97c539408f47145526f0062c1c06df99146a73 (patch)
treef196db2807a8e3640ad86e1d8026f2007348db19 /compiler/dex/ssa_transformation.cc
parent121f6a1ebaf8abd2b7ec99df8347ec87b78548f7 (diff)
downloadandroid_art-4e97c539408f47145526f0062c1c06df99146a73.tar.gz
android_art-4e97c539408f47145526f0062c1c06df99146a73.tar.bz2
android_art-4e97c539408f47145526f0062c1c06df99146a73.zip
Added pass framework
The patch adds a Middle-End pass system and normalizes the current passes into the pass framework. Passes have: - A start, work, and end functions. - A gate to determine to apply the pass. - Can provide a CFG dump folder. mir_dataflow.cc, mir_graph.cc, mir_optimization.cc, ssa_transformation.cc: - Changed due to moving code into bb_optimizations.cc. - Moved certain functions from private to public due to needed from the passes. pass.cc, pass.h: - Pass base class pass_driver.cc, pass_driver.h: - The pass driver implementation. frontend.cc: - Replace the function calls to the passes with the pass driver. Change-Id: I88cd82efbf6499df9e6c7f135d7e294dd724a079 Signed-off-by: Jean Christophe Beyler <jean.christophe.beyler@intel.com>
Diffstat (limited to 'compiler/dex/ssa_transformation.cc')
-rw-r--r--compiler/dex/ssa_transformation.cc42
1 files changed, 0 insertions, 42 deletions
diff --git a/compiler/dex/ssa_transformation.cc b/compiler/dex/ssa_transformation.cc
index 0d8bd07f40..502df1e9e9 100644
--- a/compiler/dex/ssa_transformation.cc
+++ b/compiler/dex/ssa_transformation.cc
@@ -669,46 +669,4 @@ void MIRGraph::DoDFSPreOrderSSARename(BasicBlock* block) {
return;
}
-/* Perform SSA transformation for the whole method */
-void MIRGraph::SSATransformation() {
- /* Compute the DFS order */
- ComputeDFSOrders();
-
- /* Compute the dominator info */
- ComputeDominators();
-
- /* Allocate data structures in preparation for SSA conversion */
- CompilerInitializeSSAConversion();
-
- /* Find out the "Dalvik reg def x block" relation */
- ComputeDefBlockMatrix();
-
- /* Insert phi nodes to dominance frontiers for all variables */
- InsertPhiNodes();
-
- /* Rename register names by local defs and phi nodes */
- ClearAllVisitedFlags();
- DoDFSPreOrderSSARename(GetEntryBlock());
-
- /*
- * Shared temp bit vector used by each block to count the number of defs
- * from all the predecessor blocks.
- */
- temp_ssa_register_v_ =
- new (arena_) ArenaBitVector(arena_, GetNumSSARegs(), false, kBitMapTempSSARegisterV);
-
- /* Insert phi-operands with latest SSA names from predecessor blocks */
- PreOrderDfsIterator iter2(this);
- for (BasicBlock* bb = iter2.Next(); bb != NULL; bb = iter2.Next()) {
- InsertPhiNodeOperands(bb);
- }
-
- if (cu_->enable_debug & (1 << kDebugDumpCFG)) {
- DumpCFG("/sdcard/3_post_ssa_cfg/", false);
- }
- if (cu_->enable_debug & (1 << kDebugVerifyDataflow)) {
- VerifyDataflow();
- }
-}
-
} // namespace art