Move code around and address growable_array comment.
- Move SideEffectsAnalysis to its own file.
- Move most of gvn.h to gvn.cc.
- Don't call Resize in GrowableArray constructor, but just set num_used
directly.
Change-Id: I1f1291207945d678d3c99cc0ec1ec155bcae82f6
diff --git a/compiler/optimizing/bounds_check_elimination_test.cc b/compiler/optimizing/bounds_check_elimination_test.cc
index d5de3ef..b6aaab5 100644
--- a/compiler/optimizing/bounds_check_elimination_test.cc
+++ b/compiler/optimizing/bounds_check_elimination_test.cc
@@ -19,6 +19,7 @@
#include "gvn.h"
#include "nodes.h"
#include "optimizing_unit_test.h"
+#include "side_effects_analysis.h"
#include "utils/arena_allocator.h"
#include "gtest/gtest.h"
@@ -28,7 +29,7 @@
static void RunGvn(HGraph* graph) {
SideEffectsAnalysis side_effects(graph);
side_effects.Run();
- GlobalValueNumberer(graph->GetArena(), graph, side_effects).Run();
+ GVNOptimization(graph, side_effects).Run();
}
// if (i < 0) { array[i] = 1; // Can't eliminate. }