Align 64-bit registers on even dalvik registers

The following alignments are done during register allocation
- Align 64-bit registers that are not parameters by modifying the method
giving the next free register to take into account alignment constraints.
- Align the first register of a range to maximize the number of 64-bit
registers that will be aligned into the range.

The following alignments are done during instruction massaging
- Mov instructions inserted to transfer registers which are not compatible
with the selected instruction will use even registers for 64-bit registers
- Insert the right number of registers during instruction massaging in order
not to break alignment done by the register allocator
- Align parameters to maximize the number of 64-bit register aligned.

Change-Id: Iaac6d7038f33699e9d9897b95d923297c72e20c6
Merge "Align 64-bit registers on even dalvik registers"
Add tests about dx multidex options.

(cherry picked from commit fc30e016ca4dbd4224a693e2eb7600060e547d3a)

Change-Id: Ibfc0a9b54244197b0044f995e3a221898c86ca3d
Add DexMerge stress test

Also add use of DexIndexOverflowException

(cherry picked from commit f95ee7b39f09c13340387e5ae370b57589178b0f)

Change-Id: Ia8592173cf84d9e2119c0a81bbcba90ba9222f64
Add public API to ClassReferenceListBuilder.

For use as library and not just as a command line tool.

(cherry picked from commit 2012cf33fee4705fb983adee4febcff7e5462d63)

Change-Id: I1122807845603d0fa8f9a65dd4b66094fba27e91
Fix public API of ClassReferenceListBuilder

(cherry picked from commit 4767950c82328d115f34363ad783bfd950e7b2be)

Change-Id: Ifd0affe07160f8e7b865ee0200cdb750e1bd6617
Improve the new ClassReferenceListBuilder API.

(cherry picked from commit 6a8e552553647bf3c9fa032fe8f064250a54eb18)

Change-Id: I2755ce18eb1cded99d67d9458f75e2f2f56897ee
Fix mainDexClasses with obfuscation.

When the input jar is obfuscated, multidex package can be renamed so
the multidex classes were not always correctly included in the
main dex. Tracing from Application.attachBaseContext() is not
subject to this problem since the method is defined in android API
and this will keep the multidex clases in the main dex since
attachBaseContext must call MultiDex.install().

(cherry picked from commit 4f6a857f32dfb9bf17103a2bf94ee0f74cd951ce)

Change-Id: I45a277031949855e637cda429c400276f5bb11de
Fix detection of main dex overflow in multidex

Bug: 13239620

(cherry picked from commit c00fafdb91760a4cdfbe9e5323b5165ab4c01b76)

Change-Id: I1bdeee3b0279bed38e230ed3598c06227fc27477
Keep all annotation in main dex.

Because proguard does not trace annotation attribute it just filter the
annotation attributes according to annotation classes it already kept.

Bug: 14233284

(cherry picked from commit 8865839734749398cb42f6c8a9434956634e868b)

Change-Id: Iebee107d4622d0ce6a44e2a57ecf9b065289c037
Make a better detection of index limit in multidex.

- Intern annotation content sooner.
- Count declared methods separatly because it seems possible to have them
  generate more method ids than they account in the constant pool if their
  name and descriptor are the same as those of called methods.
- Take into account some possible ids that can be added during dex creation.
- Drop evaluation of type ids numbers because it was wrong, it's not simple
  to do better and it's nearly impossible to have type ids overflow before
  method ids.
Detection is still rough, only a max value is evaluated not the real value.

Bug 14633887

(cherry picked from commit 466d7d94b8b173a323fc5616837940219a216f9d)

Change-Id: Ib5e7b4a13a69ed76b3bbc19f7d138129fcc569c8
Bump version to 1.9.

Bug: 15670857

(cherry picked from commit c35978482146683fea79f081c22b223f9b561ddc)

Change-Id: I977bf26ba4cade2068d593594e8b111e076ab636
Remove LocalEnd since it is not used

Change-Id: I60de05704d387c33f5a12aa687161aead315f6f0
Fix bad debug info due to 64-bit registers alignment

- Registers of LocalStart and LocalSnapshot must also be shift when it is required.

Bug: 16344305

Change-Id: I015409abd41ca7f03f5e6718b37f558cd3be79ad
Merge "Remove LocalEnd since it is not used"
Merge "Fix bad debug info due to 64-bit registers alignment"
Merge "Add tests about dx multidex options."
Merge "Add DexMerge stress test"
Merge "Add public API to ClassReferenceListBuilder."
Merge "Fix public API of ClassReferenceListBuilder"