summaryrefslogtreecommitdiff
path: root/compiler/optimizing/optimizing_compiler.cc
diff options
context:
space:
mode:
authorMingyao Yang <mingyao@google.com>2015-08-24 11:21:42 -0700
committerMingyao Yang <mingyao@google.com>2015-10-15 01:36:34 -0700
commit589dac7f0ce078d19aad7e35bb0195c47ddf01d2 (patch)
tree5c77fb845997b21ce1aa97b1fa176c64a76e14f1 /compiler/optimizing/optimizing_compiler.cc
parentd2e0dd179fd2e8c6c820194e187fc5e9164154ff (diff)
load store elimination.
This adds a pass to eliminate some unnecessary heap loads/stores. It first collects heap locations and then tracks values stored to those heap locations. Alias analysis is done based on offset, type, singleton, pre-existence, etc. Change-Id: I11a9d8ef20d1b2f245607eb25118e9aff9be472a
Diffstat (limited to 'compiler/optimizing/optimizing_compiler.cc')
-rw-r--r--compiler/optimizing/optimizing_compiler.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/optimizing/optimizing_compiler.cc b/compiler/optimizing/optimizing_compiler.cc
index c7f08066d4..607ce7e6cc 100644
--- a/compiler/optimizing/optimizing_compiler.cc
+++ b/compiler/optimizing/optimizing_compiler.cc
@@ -58,6 +58,7 @@
#include "intrinsics.h"
#include "licm.h"
#include "jni/quick/jni_compiler.h"
+#include "load_store_elimination.h"
#include "nodes.h"
#include "prepare_for_register_allocation.h"
#include "reference_type_propagation.h"
@@ -460,6 +461,7 @@ static void RunOptimizations(HGraph* graph,
SideEffectsAnalysis* side_effects = new (arena) SideEffectsAnalysis(graph);
GVNOptimization* gvn = new (arena) GVNOptimization(graph, *side_effects);
LICM* licm = new (arena) LICM(graph, *side_effects);
+ LoadStoreElimination* lse = new (arena) LoadStoreElimination(graph, *side_effects);
HInductionVarAnalysis* induction = new (arena) HInductionVarAnalysis(graph);
BoundsCheckElimination* bce = new (arena) BoundsCheckElimination(graph, induction);
ReferenceTypePropagation* type_propagation =
@@ -512,6 +514,7 @@ static void RunOptimizations(HGraph* graph,
induction,
bce,
simplify3,
+ lse,
dce2,
// The codegen has a few assumptions that only the instruction simplifier
// can satisfy. For example, the code generator does not expect to see a