OSDN Git Service

android-x86/art.git
9 years agoMerge "[optimizing] Use more X86_64 addressing modes"
Nicolas Geoffray [Wed, 22 Apr 2015 13:28:09 +0000 (13:28 +0000)]
Merge "[optimizing] Use more X86_64 addressing modes"

9 years agoMerge "[optimizing] Name the last DCE pass."
Calin Juravle [Wed, 22 Apr 2015 12:42:14 +0000 (12:42 +0000)]
Merge "[optimizing] Name the last DCE pass."

9 years ago[optimizing] Name the last DCE pass.
Calin Juravle [Wed, 22 Apr 2015 12:31:47 +0000 (13:31 +0100)]
[optimizing] Name the last DCE pass.

This will allow Checker to differentiate between them.

Change-Id: I972d452a64f1c19d370567b9ef3d620f9b835a9a

9 years agoMerge "Run DCE again after all the other optimizations have run."
Calin Juravle [Wed, 22 Apr 2015 11:18:33 +0000 (11:18 +0000)]
Merge "Run DCE again after all the other optimizations have run."

9 years agoRun DCE again after all the other optimizations have run.
Calin Juravle [Tue, 21 Apr 2015 13:07:50 +0000 (14:07 +0100)]
Run DCE again after all the other optimizations have run.

On docs this doubles the amount of instructions removed.

9 years agoMerge "[optimizing] Fix a bug in moving the null check to the user."
Calin Juravle [Wed, 22 Apr 2015 11:11:07 +0000 (11:11 +0000)]
Merge "[optimizing] Fix a bug in moving the null check to the user."

9 years ago[optimizing] Fix a bug in moving the null check to the user.
Calin Juravle [Tue, 21 Apr 2015 21:08:51 +0000 (22:08 +0100)]
[optimizing] Fix a bug in moving the null check to the user.

When taking the decision to move a null check to the user we did not
verify if the next instruction checks the same object.

Change-Id: I2f4533a4bb18aa4b0b6d5e419f37dcccd60354d2

9 years agoMerge "Propertly quote arguments after latest adb/vogar changes."
Nicolas Geoffray [Wed, 22 Apr 2015 10:12:43 +0000 (10:12 +0000)]
Merge "Propertly quote arguments after latest adb/vogar changes."

9 years agoPropertly quote arguments after latest adb/vogar changes.
Nicolas Geoffray [Wed, 22 Apr 2015 10:10:30 +0000 (11:10 +0100)]
Propertly quote arguments after latest adb/vogar changes.

Change-Id: If3452b616df48ecec0d85ac34d8af9253c3ea925

9 years agoMerge "Fix tlsPtr_.long_jump_context == nullptr check failure."
Mingyao Yang [Wed, 22 Apr 2015 08:09:29 +0000 (08:09 +0000)]
Merge "Fix tlsPtr_.long_jump_context == nullptr check failure."

9 years agoFix tlsPtr_.long_jump_context == nullptr check failure.
Mingyao Yang [Tue, 21 Apr 2015 23:55:22 +0000 (16:55 -0700)]
Fix tlsPtr_.long_jump_context == nullptr check failure.

This is a bogus assertion. We need to handle the case
though to free the existing tlsPtr_.long_jump_context.

Bug: 20449310
Change-Id: Ie1e49dd1fec9defab69f081d1f129aa8dc1dc6bf

9 years agoMerge "Class.forName(..., ..., null) fixes - Add test for Class.forName(..., ......
Brian Carlstrom [Wed, 22 Apr 2015 03:48:14 +0000 (03:48 +0000)]
Merge "Class.forName(..., ..., null) fixes - Add test for Class.forName(..., ..., null) - Simplify VMStack.getClosestUserClassLoader based on new behavior of Class.forName(..., ..., null)"

9 years agoClass.forName(..., ..., null) fixes
Brian Carlstrom [Tue, 21 Apr 2015 04:55:19 +0000 (21:55 -0700)]
Class.forName(..., ..., null) fixes
- Add test for Class.forName(..., ..., null)
- Simplify VMStack.getClosestUserClassLoader based on new behavior of Class.forName(..., ..., null)

Change-Id: I6bc470e20fa177e8a3debe55c90a84eef7ef518e

9 years agoMerge "ART: Add compiled-methods"
Andreas Gampe [Wed, 22 Apr 2015 03:10:20 +0000 (03:10 +0000)]
Merge "ART: Add compiled-methods"

9 years agoMerge "Add AbstractMethod, Constructor, Method"
Mathieu Chartier [Tue, 21 Apr 2015 23:03:43 +0000 (23:03 +0000)]
Merge "Add AbstractMethod, Constructor, Method"

9 years agoAdd AbstractMethod, Constructor, Method
Mathieu Chartier [Fri, 17 Apr 2015 01:00:39 +0000 (18:00 -0700)]
Add AbstractMethod, Constructor, Method

Moves functionality to ART from libcore. Precursor to moving
ArtMethods to native. Mostly performance improvements.

N5 perf before (irrelevant results removed):
            Class_getConstructor  962.87 ===========
         Class_getDeclaredMethod 2394.37 ============================
                 Class_getMethod 2509.20 ==============================
               Class_newInstance 1999.81 =======================
                  Method_invokeI 1439.02 =================
          Method_invokePreBoxedI 1415.82 ================
            Method_invokeStaticI 1456.24 =================
    Method_invokeStaticPreBoxedI 1427.32 =================
            Method_invokeStaticV  814.47 =========
                  Method_invokeV  816.56 =========
After:
                       benchmark      ns linear runtime
            Class_getConstructor 1302.04 ================
         Class_getDeclaredMethod 1459.01 ==================
                 Class_getMethod 1560.40 ===================
               Class_newInstance 2029.94 =========================
                  Method_invokeI 1312.89 ================
          Method_invokePreBoxedI 1255.01 ===============
            Method_invokeStaticI 1289.13 ===============
    Method_invokeStaticPreBoxedI 1196.52 ==============
            Method_invokeStaticV  790.82 =========
                  Method_invokeV  791.73 =========

Performance improvements are more than just fixing regressions introduced
in: http://android-review.googlesource.com/#/c/146069/

Bug: 19264997

Change-Id: Ife79c469fdb09f30e3aefcfc3e0ce5ed32303fce

9 years agoART: Add compiled-methods
Andreas Gampe [Wed, 15 Apr 2015 09:37:28 +0000 (02:37 -0700)]
ART: Add compiled-methods

Add a dex2oat option for compiled-methods, a more granular filter
than compiled-classes. Add compiler-driver support for it.

Refactor dex2oat to reuse file reading.

Add a test to oat_test.

Change-Id: I78d0d040bce7738b4bb7aabe7768b5788d2587ac

9 years agoMerge "ART: Extend run-test 068-classloader"
Andreas Gampe [Tue, 21 Apr 2015 21:28:57 +0000 (21:28 +0000)]
Merge "ART: Extend run-test 068-classloader"

9 years agoART: Extend run-test 068-classloader
Andreas Gampe [Thu, 16 Apr 2015 06:23:51 +0000 (23:23 -0700)]
ART: Extend run-test 068-classloader

Add code that tries to provoke dex-cache collisions.

Change-Id: I58c7905597a501f3731efe4c6e1e2f7772e3b312

9 years agoMerge "Improve performance of HashSet"
Mathieu Chartier [Tue, 21 Apr 2015 20:57:19 +0000 (20:57 +0000)]
Merge "Improve performance of HashSet"

9 years agoMerge "Generate .eh_frame_hdr section and PT_GNU_EH_FRAME segment."
David Srbecky [Tue, 21 Apr 2015 20:30:41 +0000 (20:30 +0000)]
Merge "Generate .eh_frame_hdr section and PT_GNU_EH_FRAME segment."

9 years ago[optimizing] Use more X86_64 addressing modes
Mark Mendell [Tue, 21 Apr 2015 02:10:34 +0000 (22:10 -0400)]
[optimizing] Use more X86_64 addressing modes

Allow constant and memory addresses to more X86_64 instructions.

Add memory formats to X86_64 instructions to match.

Fix a bug in cmpq(CpuRegister, const Address&).

Allow mov <addr>,immediate (instruction 0xC7) to be a valid faulting
instruction.

Change-Id: I5b8a409444426633920cd08e09f687a7afc88a39
Signed-off-by: Mark Mendell <mark.p.mendell@intel.com>
9 years agoGenerate .eh_frame_hdr section and PT_GNU_EH_FRAME segment.
David Srbecky [Fri, 17 Apr 2015 20:14:10 +0000 (21:14 +0100)]
Generate .eh_frame_hdr section and PT_GNU_EH_FRAME segment.

Fixes issue 20125400 - ART: Need .eh_frame_hdr and PT_GNU_EH_FRAME
for libunwind.

.eh_frame_hdr serves two purposes. Firstly, it can optionally contain
binary search table for fast eh_frame lookup. This is important for
C++ exception handling, but we do not need it so we omit it.
Secondly, it contains a relative .eh_frame pointer which makes it
easier for run-time code to locate the .eh_frame section.
libunwind seems to rely on this relative pointer.

Bug: 20125400
Change-Id: I7c1e3f68d914f70781404c508395831a3296a7da

9 years agoMerge "Do not look for prebuilts on architectures other than Arm."
David Srbecky [Tue, 21 Apr 2015 17:36:30 +0000 (17:36 +0000)]
Merge "Do not look for prebuilts on architectures other than Arm."

9 years agoDo not look for prebuilts on architectures other than Arm.
David Srbecky [Tue, 21 Apr 2015 17:31:50 +0000 (18:31 +0100)]
Do not look for prebuilts on architectures other than Arm.

The repo manifest on the build server includes prebuilts
only for Arm and host.

Change-Id: Ic9fc762f3e9a4421cc2293b6e95caf196551cbad

9 years agoMerge "Revert "fix optimizing gtests""
Nicolas Geoffray [Tue, 21 Apr 2015 17:06:34 +0000 (17:06 +0000)]
Merge "Revert "fix optimizing gtests""

9 years agoRevert "fix optimizing gtests"
Nicolas Geoffray [Tue, 21 Apr 2015 17:06:17 +0000 (17:06 +0000)]
Revert "fix optimizing gtests"

This reverts commit 69dcf64251d70f616ae6c435d4788545130d42f0.

Change-Id: I1e01c17a3aa8b001ad5659260802e5f5073bf14e

9 years agoMerge "ART: Update loop info of all nested loops when inlining"
David Brazdil [Tue, 21 Apr 2015 16:21:32 +0000 (16:21 +0000)]
Merge "ART: Update loop info of all nested loops when inlining"

9 years agoART: Update loop info of all nested loops when inlining
David Brazdil [Tue, 21 Apr 2015 15:36:35 +0000 (16:36 +0100)]
ART: Update loop info of all nested loops when inlining

When inlining into a nested loop, the inliner would only add the new
blocks into the innermost loop info object. This patch fixes that and
modifies SsaChecker to verify the property.

Change-Id: I21d343a6f7d972f5b7420701f816c65ab3f20566

9 years agoMerge "Revert "Revert "Optimizing: Fix long-to-fp conversion on x86."""
Roland Levillain [Tue, 21 Apr 2015 16:09:29 +0000 (16:09 +0000)]
Merge "Revert "Revert "Optimizing: Fix long-to-fp conversion on x86."""

9 years agoMerge "Revert "Run DCE again after all the other optimizations have run.""
Nicolas Geoffray [Tue, 21 Apr 2015 16:04:49 +0000 (16:04 +0000)]
Merge "Revert "Run DCE again after all the other optimizations have run.""

9 years agoRevert "Run DCE again after all the other optimizations have run."
Nicolas Geoffray [Tue, 21 Apr 2015 16:04:32 +0000 (16:04 +0000)]
Revert "Run DCE again after all the other optimizations have run."

Reverting because of libcore failures.

This reverts commit 7a9c885684c965fe84f91d8ad74f54f869e2a448.

Change-Id: Iafe59b02fe7617243d81533d66e609a3528e7a58

9 years agoMerge "Incorrect transformation of (sub,neg) to (sub) for fp"
Roland Levillain [Tue, 21 Apr 2015 15:26:12 +0000 (15:26 +0000)]
Merge "Incorrect transformation of (sub,neg) to (sub) for fp"

9 years agoMerge "Move GetAndroidToolsDir to common location."
David Srbecky [Tue, 21 Apr 2015 15:19:06 +0000 (15:19 +0000)]
Merge "Move GetAndroidToolsDir to common location."

9 years agoMerge "fix optimizing gtests"
Calin Juravle [Tue, 21 Apr 2015 15:13:29 +0000 (15:13 +0000)]
Merge "fix optimizing gtests"

9 years agofix optimizing gtests
Calin Juravle [Tue, 21 Apr 2015 15:12:55 +0000 (16:12 +0100)]
fix optimizing gtests

Change-Id: I207398d8a65482650fba87db12a3b51e8b114694

9 years agoMerge "Run DCE again after all the other optimizations have run."
Calin Juravle [Tue, 21 Apr 2015 14:46:58 +0000 (14:46 +0000)]
Merge "Run DCE again after all the other optimizations have run."

9 years agoRun DCE again after all the other optimizations have run.
Calin Juravle [Tue, 21 Apr 2015 13:07:50 +0000 (14:07 +0100)]
Run DCE again after all the other optimizations have run.

On docs this doubles the amount of instructions removed.

Change-Id: I1712a92c0c0b3b32b111d194b64d8ea81d652822

9 years agoMerge "Use --dump-stats to dump optimizing compiler stats."
Calin Juravle [Tue, 21 Apr 2015 13:11:22 +0000 (13:11 +0000)]
Merge "Use --dump-stats to dump optimizing compiler stats."

9 years agoUse --dump-stats to dump optimizing compiler stats.
Calin Juravle [Tue, 21 Apr 2015 12:56:34 +0000 (13:56 +0100)]
Use --dump-stats to dump optimizing compiler stats.

VLOG(compiler) produces too much output and it takes a long time if you
only need to see how an analysis performs.

Change-Id: Ic17c2b2b5fec431d356cecd37289fb96985d4d7f

9 years agoMerge "[optimzing] Fix codegen bug and improve type propagation"
Calin Juravle [Tue, 21 Apr 2015 13:00:25 +0000 (13:00 +0000)]
Merge "[optimzing] Fix codegen bug and improve type propagation"

9 years ago[optimzing] Fix codegen bug and improve type propagation
Calin Juravle [Mon, 20 Apr 2015 17:30:42 +0000 (18:30 +0100)]
[optimzing] Fix codegen bug and improve type propagation

- don't bound the type if there are no relevant uses
- insert the bound type in the bounded block (this allows for condition
materialization without changing the logic there).
- add more comments
- add tests for BoundType generation
- fix GenerateTestAndBranch

Change-Id: I5c1fdda104da4a46775d207270220d410234a472

9 years agoMove GetAndroidToolsDir to common location.
David Srbecky [Sun, 12 Apr 2015 06:45:18 +0000 (07:45 +0100)]
Move GetAndroidToolsDir to common location.

Move the code which looks for the prebuilts directory
to CommonRuntimeTest and add test for it.

Change-Id: Id804de31c466656957fdd4b6a470f80a00477aed

9 years agoMerge "Opt compiler: Minor object store optimizations for ARM64."
Roland Levillain [Tue, 21 Apr 2015 11:24:52 +0000 (11:24 +0000)]
Merge "Opt compiler: Minor object store optimizations for ARM64."

9 years agoMerge "Linear scan: Use FirstUse instead of FirstRegisterUse."
Nicolas Geoffray [Tue, 21 Apr 2015 10:19:21 +0000 (10:19 +0000)]
Merge "Linear scan: Use FirstUse instead of FirstRegisterUse."

9 years agoLinear scan: Use FirstUse instead of FirstRegisterUse.
Nicolas Geoffray [Tue, 21 Apr 2015 08:12:40 +0000 (09:12 +0100)]
Linear scan: Use FirstUse instead of FirstRegisterUse.

This is in preparation for introducing synthesized used at back edges.

Change-Id: Ie28d6725d2dde982cf2137f2110daabcbab9f789

9 years agoMerge "Fix another mistyped location."
Nicolas Geoffray [Tue, 21 Apr 2015 09:12:44 +0000 (09:12 +0000)]
Merge "Fix another mistyped location."

9 years agoFix another mistyped location.
Nicolas Geoffray [Tue, 21 Apr 2015 09:02:22 +0000 (10:02 +0100)]
Fix another mistyped location.

Change-Id: I52d5a8d34ddc882595da2b53bca0f7eb78d4b3a1

9 years agoImprove performance of HashSet
nikolay serdjuk [Fri, 17 Apr 2015 13:27:56 +0000 (19:27 +0600)]
Improve performance of HashSet

Don't pollute hash table with duplicates.
Check for existing value before storing a new one.

Change-Id: If43ea5e98a3f3ba187b8dea66f3712ec62bd3f60
Signed-off-by: nikolay serdjuk <nikolay.y.serdjuk@intel.com>
9 years agoMerge "ART: Change image_classes and compiled_classes to unordered set"
Andreas Gampe [Tue, 21 Apr 2015 03:59:32 +0000 (03:59 +0000)]
Merge "ART: Change image_classes and compiled_classes to unordered set"

9 years agoART: Change image_classes and compiled_classes to unordered set
Andreas Gampe [Tue, 21 Apr 2015 01:53:51 +0000 (18:53 -0700)]
ART: Change image_classes and compiled_classes to unordered set

These lists can be large, and the soon-to-follow compiled_methods
will be potentially even larger. Use a hash set instead of a tree
set.

Change-Id: I7d25c075540f47771354c6f49928b4fd0c76eb2e

9 years agoMerge "ART: Fix wrong parameter in JIT"
Andreas Gampe [Tue, 21 Apr 2015 00:06:08 +0000 (00:06 +0000)]
Merge "ART: Fix wrong parameter in JIT"

9 years agoART: Fix wrong parameter in JIT
Andreas Gampe [Mon, 20 Apr 2015 23:53:59 +0000 (16:53 -0700)]
ART: Fix wrong parameter in JIT

Do not use an empty set for compiled-classes.

Change-Id: I5062a7886c1a4f5dc8dc9630ce490c71bc607b72

9 years agoIncorrect transformation of (sub,neg) to (sub) for fp
Serguei Katkov [Mon, 20 Apr 2015 06:29:32 +0000 (12:29 +0600)]
Incorrect transformation of (sub,neg) to (sub) for fp

A pair (sub,neg) should not be transformed to (sub) for
floating point operations, otherwise we can lose the sign of
zero for instructions like this:
  - (A - B) != B - A if B == A

Change-Id: I4d612612d4dc0a067fac5721ad206f74168bcd36
Signed-off-by: Serguei Katkov <serguei.i.katkov@intel.com>
9 years agoMerge "Add sanity check for large object allocation"
Mathieu Chartier [Mon, 20 Apr 2015 17:16:57 +0000 (17:16 +0000)]
Merge "Add sanity check for large object allocation"

9 years agoMerge "ART: Simplify more bool operations"
David Brazdil [Mon, 20 Apr 2015 17:12:53 +0000 (17:12 +0000)]
Merge "ART: Simplify more bool operations"

9 years agoART: Simplify more bool operations
David Brazdil [Fri, 17 Apr 2015 13:52:19 +0000 (14:52 +0100)]
ART: Simplify more bool operations

Now that we have the HBooleanNot instruction, the instruction
simplifier can optimize out more conditions comparing a boolean
against a constant, as well as sequences of Boolean negations.

Change-Id: I7f634f6428a3984dd97b27b3d6362491346f1ff6

9 years agoMerge "RecordPcInfo() in GenerateStaticOrDirectCall() is misplaced on x86."
Mingyao Yang [Mon, 20 Apr 2015 17:11:32 +0000 (17:11 +0000)]
Merge "RecordPcInfo() in GenerateStaticOrDirectCall() is misplaced on x86."

9 years agoMerge "Disable tests for volantis."
Nicolas Geoffray [Mon, 20 Apr 2015 16:54:36 +0000 (16:54 +0000)]
Merge "Disable tests for volantis."

9 years agoDisable tests for volantis.
Nicolas Geoffray [Mon, 20 Apr 2015 16:52:58 +0000 (17:52 +0100)]
Disable tests for volantis.

They're triggering a segfault.

Change-Id: If99bd9b2faba5422320764ca52808720d533745a

9 years agoOpt compiler: Minor object store optimizations for ARM64.
Alexandre Rames [Thu, 16 Apr 2015 14:07:12 +0000 (15:07 +0100)]
Opt compiler: Minor object store optimizations for ARM64.

This is an adaptation of af07bc121121d7bd7e8329c55dfe24782207b561 for
ARM64.

Change-Id: I5f4984ac86ede89cdf7c915f4bbf8d091059a0eb

9 years agoMerge "Opt compiler: Implement parallel move resolver without using swap."
Nicolas Geoffray [Mon, 20 Apr 2015 15:20:15 +0000 (15:20 +0000)]
Merge "Opt compiler: Implement parallel move resolver without using swap."

9 years agoMerge changes Ib9648605,I34a3bd17
Roland Levillain [Mon, 20 Apr 2015 15:13:07 +0000 (15:13 +0000)]
Merge changes Ib9648605,I34a3bd17

* changes:
  Opt compiler: ARM64: Block VIXLpools when recording the pc.
  Opt compiler: ARM64: Follow other archs for a few codegen stubs.

9 years agoRevert "Revert "Optimizing: Fix long-to-fp conversion on x86.""
Roland Levillain [Mon, 20 Apr 2015 14:14:36 +0000 (15:14 +0100)]
Revert "Revert "Optimizing: Fix long-to-fp conversion on x86.""

This reverts commit 386ce406f150645158d6067c4e0a36565aefc44f.

Bug: 20413424
Change-Id: I6e93ff132907f2653f1ae12d6676ff2298f62ca1

9 years agoMerge "optimizing: fix gtests"
Calin Juravle [Mon, 20 Apr 2015 13:50:50 +0000 (13:50 +0000)]
Merge "optimizing: fix gtests"

9 years agooptimizing: fix gtests
Calin Juravle [Mon, 20 Apr 2015 13:49:09 +0000 (14:49 +0100)]
optimizing: fix gtests

by taking into account that the compilation unit is null during tests.

Change-Id: I01a28ce8f03c927ff679b84bcdf2464fa97e0924

9 years agoOpt compiler: ARM64: Block VIXLpools when recording the pc.
Alexandre Rames [Thu, 16 Apr 2015 14:07:16 +0000 (15:07 +0100)]
Opt compiler: ARM64: Block VIXLpools when recording the pc.

VIXL automatically handles and generate literal and veneer pools when
using the MacroAssembler. In general, the pools can be emitted
anywhere. Helpers are provided to forbid VIXL from emitting pools
locally.

So when writing the pseudo-code

    __ Fmov(d0, 1.2345);
    __ Ldr(dst, MemOperand(src, offset));
    FunctionRecordingCurrentPC();
    __ Add(x0, x1, x2);

VIXL might generate code looking like

    0x00: ldr s0, [pc, 0xc]
    0x04: ldr dst, [src, offset]
    0x08: b #0x10
    0x0c: <literal 1.2345>
    0x10: add x0, x1, x2

and the program counter recorded by the helper will point after the
literal pool.
So we explicitly stop VIXL from emitting pools when dealing with code
where we care about the program counter.

Change-Id: Ib964860539bdb10f5704c290bdf74e5db149e462

9 years agoOpt compiler: ARM64: Follow other archs for a few codegen stubs.
Alexandre Rames [Wed, 15 Apr 2015 10:47:56 +0000 (11:47 +0100)]
Opt compiler: ARM64: Follow other archs for a few codegen stubs.

Code generation for HInstanceFieldGet, HInstanceFieldSet,
HStaticFieldGet, and HStaticFieldSet are refactored to follow the
structure used for other backends.

Change-Id: I34a3bd17effa042238c6bf199848cbc2ec26ac5d

9 years agoMerge "[optimizing] Add memory barriers in constructors when needed"
Calin Juravle [Mon, 20 Apr 2015 13:03:14 +0000 (13:03 +0000)]
Merge "[optimizing] Add memory barriers in constructors when needed"

9 years ago[optimizing] Add memory barriers in constructors when needed
Calin Juravle [Fri, 17 Apr 2015 18:12:31 +0000 (19:12 +0100)]
[optimizing] Add memory barriers in constructors when needed

If a class has final fields we must add a memory barrier before
returning from constructor. This makes sure the fields are visible to
other threads.

Bug: 19851497
Change-Id: If8c485092fc512efb9636cd568cb0543fb27688e

9 years agoMerge "ART: Extend list of instructions accepted as boolean inputs"
David Brazdil [Mon, 20 Apr 2015 12:58:55 +0000 (12:58 +0000)]
Merge "ART: Extend list of instructions accepted as boolean inputs"

9 years agoART: Extend list of instructions accepted as boolean inputs
David Brazdil [Mon, 20 Apr 2015 09:14:42 +0000 (10:14 +0100)]
ART: Extend list of instructions accepted as boolean inputs

Previous change allowed integer Phis as inputs of instructions
expecting a boolean type. This list, however, was not exhaustive as
binary operations And, Or and Xor are also valid inputs. This patch
extends the list in SSAChecker.

Change-Id: I5b5c9e7a17992cc4987e3a078ee23ea80028ecfc

9 years agoMerge "Fix lint error."
Nicolas Geoffray [Mon, 20 Apr 2015 11:40:30 +0000 (11:40 +0000)]
Merge "Fix lint error."

9 years agoFix lint error.
Nicolas Geoffray [Mon, 20 Apr 2015 11:39:57 +0000 (12:39 +0100)]
Fix lint error.

Change-Id: Id956c0e8c864a14c05d291f6b890df4877652306

9 years agoMerge "Opt compiler: Correctly require register or FPU register."
Nicolas Geoffray [Mon, 20 Apr 2015 11:24:01 +0000 (11:24 +0000)]
Merge "Opt compiler: Correctly require register or FPU register."

9 years agoOpt compiler: Correctly require register or FPU register.
Alexandre Rames [Tue, 14 Apr 2015 16:35:39 +0000 (17:35 +0100)]
Opt compiler: Correctly require register or FPU register.

Also add a check that location summary are correctly typed
with the HInstruction.

Change-Id: I699762ff4e8f4e321c7db01ea005236ea1934af9

9 years agoMerge "Fix codegen_test for long multiplication."
Nicolas Geoffray [Mon, 20 Apr 2015 09:12:07 +0000 (09:12 +0000)]
Merge "Fix codegen_test for long multiplication."

9 years agoFix codegen_test for long multiplication.
Nicolas Geoffray [Mon, 20 Apr 2015 08:29:18 +0000 (09:29 +0100)]
Fix codegen_test for long multiplication.

It seems like clang (that we use on the host) was *very* forgiving
with this broken test: the code generated for for MulLong used ebx
but this is a callee-save register in C but not ART. Also, the test
was not properly written for handling longs, so it was taking
unitialized stack entries.

GCC on target is not as forgiving.

Change-Id: I5d7a962f8a72b3ce407dce50ca50b4ffc690c99e

9 years agoMerge "Run jdwp tests now that localhost issues have been solved."
Nicolas Geoffray [Mon, 20 Apr 2015 08:38:05 +0000 (08:38 +0000)]
Merge "Run jdwp tests now that localhost issues have been solved."

9 years agoRun jdwp tests now that localhost issues have been solved.
Nicolas Geoffray [Mon, 20 Apr 2015 08:29:48 +0000 (09:29 +0100)]
Run jdwp tests now that localhost issues have been solved.

Change-Id: I5ae67c2caf73695316ea9530274e97272114af1b
See: https://android-review.googlesource.com/#/c/147244/.

9 years agoAdd sanity check for large object allocation
Mathieu Chartier [Sun, 19 Apr 2015 20:36:11 +0000 (13:36 -0700)]
Add sanity check for large object allocation

If there is a large object which ends up being covered by a space
bitmap, it will not be marked correctly by the GC.

Change-Id: Icdd0aaa207f476dd08effcee6cfbbb5de7ca1d17

9 years agoMerge "ART: Re-add dlopen"
Andreas Gampe [Sat, 18 Apr 2015 00:52:30 +0000 (00:52 +0000)]
Merge "ART: Re-add dlopen"

9 years agoART: Re-add dlopen
Andreas Gampe [Wed, 8 Apr 2015 01:34:42 +0000 (18:34 -0700)]
ART: Re-add dlopen

Re-add an oat-file path that uses dlopen to load oat files. This
code-path will be necessary to support libunwind unwinding through
properly CFI-annotated oat files, as libunwind consults the linker
about loaded ELF files.

We avoid the original dlopen issue, namely that the semantics of
dlopen disallow loading the same soname twice, by using an extension
of bionic that supersedes the specified behavior.

Change-Id: I4a7e3cb00d1ea156dad84f76826def2a5967c9ca

9 years agoRecordPcInfo() in GenerateStaticOrDirectCall() is misplaced on x86.
Mingyao Yang [Fri, 17 Apr 2015 23:51:08 +0000 (16:51 -0700)]
RecordPcInfo() in GenerateStaticOrDirectCall() is misplaced on x86.

GenerateStaticOrDirectCall() is invoked in intrinsics_x86.cc and
RecordPcInfo() is already taken care of there. It should be moved
to VisitInvokeStaticOrDirect() as done in other archs.

Change-Id: Id08d84c9046e55dea9d8a8452c979294c4183150

9 years agoMerge "Fix access past end of args array."
Christopher Ferris [Fri, 17 Apr 2015 22:36:50 +0000 (22:36 +0000)]
Merge "Fix access past end of args array."

9 years agoFix access past end of args array.
Christopher Ferris [Fri, 17 Apr 2015 20:26:09 +0000 (13:26 -0700)]
Fix access past end of args array.

Bug: 20340831
Change-Id: Ibc0995e28e74c65d81f001e5b4d1e4780ff19686

9 years agoMerge "Fix undefined behavior in hash calculation."
Dan Albert [Fri, 17 Apr 2015 17:32:28 +0000 (17:32 +0000)]
Merge "Fix undefined behavior in hash calculation."

9 years agoFix undefined behavior in hash calculation.
Dan Albert [Thu, 16 Apr 2015 18:54:24 +0000 (11:54 -0700)]
Fix undefined behavior in hash calculation.

dex_register might be >= the width of the map hash. Shifting by that
value would be undefined behavior. Constrain the value to within the
valid range.

Change-Id: I9037c5c7ec554850ba3385585aca96fde1d50387

9 years agoMerge "ART: Fix a failing gtest"
David Brazdil [Fri, 17 Apr 2015 17:23:27 +0000 (17:23 +0000)]
Merge "ART: Fix a failing gtest"

9 years agoART: Fix a failing gtest
David Brazdil [Fri, 17 Apr 2015 17:19:30 +0000 (18:19 +0100)]
ART: Fix a failing gtest

Stricter assumptions about the state of linear scan caused a reg alloc
gtest to fail.

Change-Id: I0c568bf996ce6adefe4f000524b38acd3967421e

9 years agoMerge "ART: Improve range search caching in LiveInterval"
David Brazdil [Fri, 17 Apr 2015 16:25:16 +0000 (16:25 +0000)]
Merge "ART: Improve range search caching in LiveInterval"

9 years agoART: Improve range search caching in LiveInterval
David Brazdil [Thu, 16 Apr 2015 17:31:55 +0000 (18:31 +0100)]
ART: Improve range search caching in LiveInterval

Register allocator spends too long in LiveInterval queries. This patch
builds on previously introduced caching of range search results to
further speed up LiveInterval's Covers and FindIntersectionWith.
Only calls which are guaranteed to query the current->GetStart()
position are cached. Other calls are replaced with CoversSlow which
searches through the entire list of ranges.

Change-Id: I84d92b526e174caa70d6477497a06afd85016c4a

9 years agoMerge "ART: Fix incorrect last range when adding high interval"
David Brazdil [Fri, 17 Apr 2015 15:07:25 +0000 (15:07 +0000)]
Merge "ART: Fix incorrect last range when adding high interval"

9 years agoART: Fix incorrect last range when adding high interval
David Brazdil [Fri, 17 Apr 2015 14:49:51 +0000 (15:49 +0100)]
ART: Fix incorrect last range when adding high interval

Adding a high interval clones live ranges but assigns last_range from
the low interval. This should not cause any problems as last_range
is only used for constant-time GetEnd which will return the same
value for both low/high intervals.

Change-Id: Iaf242183436c8ac2f78c0aeea22cd07cd4beacc0

9 years agoOpt compiler: Implement parallel move resolver without using swap.
Zheng Xu [Fri, 17 Apr 2015 10:48:56 +0000 (18:48 +0800)]
Opt compiler: Implement parallel move resolver without using swap.

The algorithm of ParallelMoveResolverNoSwap() is almost the same with
ParallelMoveResolverWithSwap(), except the way we resolve the circular
dependency. NoSwap() uses additional scratch register to resolve the
circular dependency. For example, (0->1) (1->2) (2->0) will be performed
as (2->scratch) (1->2) (0->1) (scratch->0).

On architectures without swap register support, NoSwap() can reduce the
number of moves from 3x(N-1) to (N+1) when there is circular dependency
with N moves.

And also, NoSwap() algorithm does not depend on architecture register
layout information, which means it can support register pairs on arm32
and X/W, D/S registers on arm64 without additional modification.

Change-Id: Idf56bd5469bb78c0e339e43ab16387428a082318

9 years agoMerge "Cleanup unnecessary test conditions in ssa builder."
Calin Juravle [Fri, 17 Apr 2015 10:03:22 +0000 (10:03 +0000)]
Merge "Cleanup unnecessary test conditions in ssa builder."

9 years agoCleanup unnecessary test conditions in ssa builder.
Calin Juravle [Fri, 17 Apr 2015 09:36:57 +0000 (10:36 +0100)]
Cleanup unnecessary test conditions in ssa builder.

Change-Id: Ic36e535aec3f977ebe36bfe20bc54a1033de62c6

9 years agoMerge "Fix value used for shift in quick_cfi_test."
Dan Albert [Thu, 16 Apr 2015 23:24:24 +0000 (23:24 +0000)]
Merge "Fix value used for shift in quick_cfi_test."

9 years agoMerge "Fix build"
Mathieu Chartier [Thu, 16 Apr 2015 21:39:11 +0000 (21:39 +0000)]
Merge "Fix build"

9 years agoFix build
Mathieu Chartier [Thu, 16 Apr 2015 21:34:45 +0000 (14:34 -0700)]
Fix build

art/runtime/mirror/art_method-inl.h:142: error: undefined
reference to 'art::ClassLinker::ResolveType(unsigned short,
art::mirror::ArtMethod*)'

Change-Id: I3c5d26eed13e3f8d0a4d96756c09364707b6358e