ART: Allow overridable calculation of basic block dataflow
Currently dataflow information is not calculated for catch blocks in order to
reduce overhead. However, this makes assumption that the lack of this
information is only preventing local optimizations to catch block. But in
reality this problematic for global optimizations.
However, since no optimizations need complete information for now, simply
leave logic same but factor it out in separate method.
Change-Id: I5c13344c18409bd172a5d9b07577b4a1353cc733
Signed-off-by: Razvan A Lupusoru <razvan.a.lupusoru@intel.com>
diff --git a/compiler/dex/mir_graph.h b/compiler/dex/mir_graph.h
index ea2ca39..7dc24e6 100644
--- a/compiler/dex/mir_graph.h
+++ b/compiler/dex/mir_graph.h
@@ -559,7 +559,7 @@
class MIRGraph {
public:
MIRGraph(CompilationUnit* cu, ArenaAllocator* arena);
- ~MIRGraph();
+ virtual ~MIRGraph();
/*
* Examine the graph to determine whether it's worthwile to spend the time compiling
@@ -1178,6 +1178,7 @@
void ComputeDefBlockMatrix();
void ComputeDominators();
void CompilerInitializeSSAConversion();
+ virtual void InitializeBasicBlockDataFlow();
void InsertPhiNodes();
void DoDFSPreOrderSSARename(BasicBlock* block);