Move MethodInfo to CodeInfo.

There is no need to treat it specially any more,
because of the de-duplication at BitTable level.

This saves 0.6% of oat file size.

Test: test-art-host-gtest
Change-Id: Ife7927d736243879a41d6f325d49ebf6930a63f6
diff --git a/runtime/stack_map.h b/runtime/stack_map.h
index 909aaa5..8bfae7c 100644
--- a/runtime/stack_map.h
+++ b/runtime/stack_map.h
@@ -28,7 +28,6 @@
 #include "base/memory_region.h"
 #include "dex/dex_file_types.h"
 #include "dex_register_location.h"
-#include "method_info.h"
 #include "quick/quick_method_frame_info.h"
 
 namespace art {
@@ -164,7 +163,6 @@
 
   void Dump(VariableIndentationOutputStream* vios,
             const CodeInfo& code_info,
-            const MethodInfo& method_info,
             uint32_t code_offset,
             InstructionSet instruction_set) const;
 };
@@ -188,10 +186,6 @@
   static constexpr uint32_t kLast = -1;
   static constexpr uint32_t kMore = 0;
 
-  uint32_t GetMethodIndex(const MethodInfo& method_info) const {
-    return method_info.GetMethodIndex(GetMethodInfoIndex());
-  }
-
   bool EncodesArtMethod() const {
     return HasArtMethodLo();
   }
@@ -204,8 +198,7 @@
 
   void Dump(VariableIndentationOutputStream* vios,
             const CodeInfo& info,
-            const StackMap& stack_map,
-            const MethodInfo& method_info) const;
+            const StackMap& stack_map) const;
 };
 
 class MaskInfo : public BitTableAccessor<1> {
@@ -262,6 +255,14 @@
   }
 };
 
+// Method indices are not very dedup friendly.
+// Separating them greatly improves dedup efficiency of the other tables.
+class MethodInfo : public BitTableAccessor<1> {
+ public:
+  BIT_TABLE_HEADER()
+  BIT_TABLE_COLUMN(0, MethodIndex)
+};
+
 /**
  * Wrapper around all compiler information collected for a method.
  * See the Decode method at the end for the precise binary format.
@@ -329,6 +330,10 @@
     return stack_maps_.NumRows();
   }
 
+  uint32_t GetMethodIndexOf(InlineInfo inline_info) const {
+    return method_infos_.GetRow(inline_info.GetMethodInfoIndex()).GetMethodIndex();
+  }
+
   ALWAYS_INLINE DexRegisterMap GetDexRegisterMapOf(StackMap stack_map) const {
     if (stack_map.HasDexRegisterMap()) {
       DexRegisterMap map(number_of_dex_registers_, DexRegisterLocation::Invalid());
@@ -405,8 +410,7 @@
   void Dump(VariableIndentationOutputStream* vios,
             uint32_t code_offset,
             bool verbose,
-            InstructionSet instruction_set,
-            const MethodInfo& method_info) const;
+            InstructionSet instruction_set) const;
 
   // Accumulate code info size statistics into the given Stats tree.
   void AddSizeStats(/*out*/ Stats* parent) const;
@@ -446,6 +450,7 @@
   uint32_t number_of_dex_registers_;
   BitTable<StackMap> stack_maps_;
   BitTable<InlineInfo> inline_infos_;
+  BitTable<MethodInfo> method_infos_;
   BitTable<RegisterMask> register_masks_;
   BitTable<MaskInfo> stack_masks_;
   BitTable<MaskInfo> dex_register_masks_;