ART: Refactor frontend.cc

Refactor frontend.cc. Pull out flags, merge them in arrays keyed by
the instruction set. Simplify the checks and application of flags.

Change-Id: I12d5216df8d1f12e7fbe39d8132e4725c55bc8e7
Merge "ART: Refactor frontend.cc"
Use memory chunks for monitors on LP64

Monitor IDs in lock words are only 30b. On a 32b system that works
fine, as memory is usually aligned enough that shifting works out.
On 64b systems, the virtual memory space is too large for that.
This adds memory chunks into which we allocate the monitors so that
we have base_addr + offset and can use the offset as the monitor ID.
To allow for relatively compact but growable storage, we use a list
of chunks.

Added a global lock for the monitor pool.

Change-Id: I0e290c4914a2556e0b2eef9902422d7c4dcf536d
Merge "Use memory chunks for monitors on LP64"
Handle potential <clinit>() correctly in LVN.

Bug: 16177324
Change-Id: I727ab6ce9aa9a608fe570cf391a6b732a12a8655
Faster deduplication in OatWriter.

Use lower_bound() to look for duplicates and use it as
a hint for insertion of new entries. Add a few useful
functions to SafeMap<>.

Change-Id: If7eab3f5d153be6e0d7ae040929849f1a636ee29
Fix GC to use art::Atomic rather than compiler intrinsics.

Changes to SpaceBitmap::AtomicTestAndSet and Space::end_. Space::end_ is made
atomic rather than volatile to fully capture all its uses multi-threaded or not
uses.

Change-Id: I3058964b8ad90a8c253b3d7f75585f63ca2fb5e3
Merge "Fix GC to use art::Atomic rather than compiler intrinsics."
Merge "Faster deduplication in OatWriter."
Merge "Handle potential <clinit>() correctly in LVN."
Global Value Numbering.

Implement the Global Value Numbering for optimization
purposes. Use it for the null check and range check
elimination as the LVN used to do.

The order of evaluation of basic blocks needs improving as
we currently fail to recognize some obviously identical
values in methods with more than one loop. (There are three
disabled tests that check this. This is just a missed
optimization, not a correctness issue.)

Change-Id: I0d0ce16b2495b5a3b17ad1b2b32931cd69f5a25a
Merge "Global Value Numbering."
Slow path for iget should expect return in core reg

Slow path for iget invokes the C implementation.
In all cases the C function returns the result in core reg.
So implementation should expect the result in core reg
independent on whether it is fp or not.

Change-Id: I57fb0e684c38af22316398d8071f087bd4bd253c
Signed-off-by: Serguei Katkov <serguei.i.katkov@intel.com>
Merge "Slow path for iget should expect return in core reg"
ART: Enable some ARM64 optimizations.

Enables kSuppressLoads, kTrackLiveTemps, kSafeOptimizations,
kPromoteCompilerTemps, kClassInitCheckElimination,
kSuppressExceptionEdges and kMatch.

Change-Id: Id3650adce7140dde8d667cd3f1b4a1c2598f156e
Merge "ART: Enable some ARM64 optimizations."
Merge branch 'master_aosp'