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>
diff --git a/compiler/Android.mk b/compiler/Android.mk
index d9a573f..4340929 100644
--- a/compiler/Android.mk
+++ b/compiler/Android.mk
@@ -54,6 +54,8 @@
dex/dex_to_dex_compiler.cc \
dex/mir_dataflow.cc \
dex/mir_optimization.cc \
+ dex/pass_driver.cc \
+ dex/bb_optimizations.cc \
dex/frontend.cc \
dex/mir_graph.cc \
dex/mir_analysis.cc \