Plug new optimizing compiler in compilation pipeline.

Also rename accessors to ART's conventions.

Change-Id: I344807055b98aa4b27215704ec362191464acecc
diff --git a/compiler/optimizing/code_generator_arm.h b/compiler/optimizing/code_generator_arm.h
index 33d8e62..52a7bf4 100644
--- a/compiler/optimizing/code_generator_arm.h
+++ b/compiler/optimizing/code_generator_arm.h
@@ -19,6 +19,7 @@
 
 #include "code_generator.h"
 #include "nodes.h"
+#include "utils/arm/assembler_arm.h"
 
 namespace art {
 
@@ -42,12 +43,13 @@
   DISALLOW_COPY_AND_ASSIGN(LocationsBuilderARM);
 };
 
-class CodeGeneratorARM : public CodeGenerator {
+class InstructionCodeGeneratorARM : public HGraphVisitor {
  public:
-  CodeGeneratorARM(Assembler* assembler, HGraph* graph)
-      : CodeGenerator(assembler, graph), location_builder_(graph) { }
+  explicit InstructionCodeGeneratorARM(HGraph* graph, CodeGenerator* codegen)
+      : HGraphVisitor(graph),
+        assembler_(codegen->GetAssembler()),
+        codegen_(codegen) { }
 
-  // Visit functions for instruction classes.
 #define DECLARE_VISIT_INSTRUCTION(name)     \
   virtual void Visit##name(H##name* instr);
 
@@ -55,6 +57,23 @@
 
 #undef DECLARE_VISIT_INSTRUCTION
 
+  Assembler* GetAssembler() const { return assembler_; }
+
+ private:
+  Assembler* const assembler_;
+  CodeGenerator* const codegen_;
+
+  DISALLOW_COPY_AND_ASSIGN(InstructionCodeGeneratorARM);
+};
+
+class CodeGeneratorARM : public CodeGenerator {
+ public:
+  explicit CodeGeneratorARM(HGraph* graph)
+      : CodeGenerator(graph),
+        location_builder_(graph),
+        instruction_visitor_(graph, this) { }
+  virtual ~CodeGeneratorARM() { }
+
  protected:
   virtual void GenerateFrameEntry() OVERRIDE;
   virtual void GenerateFrameExit() OVERRIDE;
@@ -66,8 +85,19 @@
     return &location_builder_;
   }
 
+  virtual HGraphVisitor* GetInstructionVisitor() OVERRIDE {
+    return &instruction_visitor_;
+  }
+
+  virtual Assembler* GetAssembler() OVERRIDE {
+    return &assembler_;
+  }
+
  private:
   LocationsBuilderARM location_builder_;
+  InstructionCodeGeneratorARM instruction_visitor_;
+  ArmAssembler assembler_;
+
 
   DISALLOW_COPY_AND_ASSIGN(CodeGeneratorARM);
 };