summaryrefslogtreecommitdiff
path: root/compiler/optimizing/optimizing_compiler.cc
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2015-06-18 15:52:30 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2015-06-18 15:52:31 +0000
commit822c00d0fe3b70d1f1fe5bac03713674d45f8173 (patch)
treef44fb5642da30dc334c6ec3b264e59f53c1739c5 /compiler/optimizing/optimizing_compiler.cc
parent01b6ec8c982400fe415533296ab0b563971c239d (diff)
parentb2bdfce7f805b00668a2521b1c939a0aafb2be49 (diff)
Merge "Run a simplification pass before code generation."
Diffstat (limited to 'compiler/optimizing/optimizing_compiler.cc')
-rw-r--r--compiler/optimizing/optimizing_compiler.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/compiler/optimizing/optimizing_compiler.cc b/compiler/optimizing/optimizing_compiler.cc
index c695abea14..8d43adaada 100644
--- a/compiler/optimizing/optimizing_compiler.cc
+++ b/compiler/optimizing/optimizing_compiler.cc
@@ -340,9 +340,11 @@ static void RunOptimizations(HGraph* graph,
InstructionSimplifier* simplify2 = new (arena) InstructionSimplifier(
graph, stats, "instruction_simplifier_after_types");
InstructionSimplifier* simplify3 = new (arena) InstructionSimplifier(
- graph, stats, "last_instruction_simplifier");
+ graph, stats, "instruction_simplifier_after_bce");
ReferenceTypePropagation* type_propagation2 =
new (arena) ReferenceTypePropagation(graph, handles);
+ InstructionSimplifier* simplify4 = new (arena) InstructionSimplifier(
+ graph, stats, "instruction_simplifier_before_codegen");
IntrinsicsRecognizer* intrinsics = new (arena) IntrinsicsRecognizer(graph, driver);
@@ -367,6 +369,10 @@ static void RunOptimizations(HGraph* graph,
bce,
simplify3,
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
+ // HTypeConversion from a type to the same type.
+ simplify4,
};
RunOptimizations(optimizations, arraysize(optimizations), pass_info_printer);