Fix unquickening logic for quickened input dexes

In the case where an input dex is already quickened (i.e.
obfuscation), do not attempt to unquicken it. This is done by
switching the quicken info table to the compact offset table (used by
cdex debug infos).

Added test.

Posssible to get a bit of extra savings by deleting the quicken info
num entries field.

Quicken filter size regression average on golem: -0.14%.

Bug: 72608794
Bug: 63756964
Test: test-art-host-gtest-dex2oat_test -j64
Change-Id: I5534a7509b4c718a9b959fa43b82bde857e0b59e
diff --git a/runtime/quicken_info.h b/runtime/quicken_info.h
index 32f7005..f20aa0c 100644
--- a/runtime/quicken_info.h
+++ b/runtime/quicken_info.h
@@ -18,66 +18,12 @@
 #define ART_RUNTIME_QUICKEN_INFO_H_
 
 #include "base/array_ref.h"
+#include "dex/compact_offset_table.h"
 #include "dex/dex_instruction.h"
 #include "leb128.h"
 
 namespace art {
 
-// Table for getting the offset of quicken info. Doesn't have one slot for each index, so a
-// combination of iteration and indexing is required to get the quicken info for a given dex method
-// index.
-class QuickenInfoOffsetTableAccessor {
- public:
-  using TableType = uint32_t;
-  static constexpr uint32_t kElementsPerIndex = 16;
-
-  class Builder {
-   public:
-    explicit Builder(std::vector<uint8_t>* out_data) : out_data_(out_data) {}
-
-    void AddOffset(uint32_t index) {
-      out_data_->insert(out_data_->end(),
-                        reinterpret_cast<const uint8_t*>(&index),
-                        reinterpret_cast<const uint8_t*>(&index + 1));
-    }
-
-   private:
-    std::vector<uint8_t>* const out_data_;
-  };
-
-  // The table only covers every kElementsPerIndex indices.
-  static bool IsCoveredIndex(uint32_t index) {
-    return index % kElementsPerIndex == 0;
-  }
-
-  QuickenInfoOffsetTableAccessor(const ArrayRef<const uint8_t>& data, uint32_t max_index)
-      : table_(ArrayRef<const TableType>::Cast(data).SubArray(
-          0,
-          RoundUp(max_index, kElementsPerIndex) / kElementsPerIndex)) {}
-
-  size_t SizeInBytes() const {
-    return NumIndices() * sizeof(table_[0]);
-  }
-
-  uint32_t NumIndices() const {
-    return table_.size();
-  }
-
-  // Returns the offset for the index at or before the desired index. If the offset is for an index
-  // before the desired one, remainder is how many elements to traverse to reach the desired index.
-  TableType ElementOffset(uint32_t index, uint32_t* remainder) const {
-    *remainder = index % kElementsPerIndex;
-    return table_[index / kElementsPerIndex];
-  }
-
-  static uint32_t Alignment() {
-    return alignof(TableType);
-  }
-
- private:
-  const ArrayRef<const TableType> table_;
-};
-
 // QuickenInfoTable is a table of 16 bit dex indices. There is one slot for every instruction that
 // is possibly dequickenable.
 class QuickenInfoTable {