OSDN Git Service
Mingyao Yang [Sat, 7 Mar 2015 14:37:59 +0000 (06:37 -0800)]
Deoptimization-based bce.
A mechanism is introduced that a runtime method can be called
from code compiled with optimizing compiler to deoptimize into
interpreter. This can be used to establish invariants in the managed code
If the invariant does not hold at runtime, we will deoptimize and continue
execution in the interpreter. This allows to optimize the managed code as
if the invariant was proven during compile time. However, the exception
will be thrown according to the semantics demanded by the spec.
The invariant and optimization included in this patch are based on the
length of an array. Given a set of array accesses with constant indices
{c1, ..., cn}, we can optimize away all bounds checks iff all 0 <= min(ci) and
max(ci) < array-length. The first can be proven statically. The second can be
established with a deoptimization-based invariant. This replaces n bounds
checks with one invariant check (plus slow-path code).
Change-Id: I8c6e34b56c85d25b91074832d13dba1db0a81569
Nicolas Geoffray [Mon, 23 Mar 2015 17:52:58 +0000 (17:52 +0000)]
Merge "Inline across dex files."
Nicolas Geoffray [Wed, 18 Mar 2015 11:00:52 +0000 (11:00 +0000)]
Inline across dex files.
Change-Id: I5c2c44f5130b50f0bad21a6877a3935dc60b4a85
Nicolas Geoffray [Mon, 23 Mar 2015 17:05:48 +0000 (17:05 +0000)]
Merge "Implement a space filter for optimizing."
Mathieu Chartier [Mon, 23 Mar 2015 16:54:17 +0000 (16:54 +0000)]
Merge "Fix a bug in AddToCodeCache"
Mathieu Chartier [Sun, 22 Mar 2015 20:52:48 +0000 (13:52 -0700)]
Fix a bug in AddToCodeCache
Was comparing wrong variable to null.
Bug:
17950037
Change-Id: I32eb209d378c4818c977c4d1cf63603f7269bd9b
Nicolas Geoffray [Mon, 23 Mar 2015 16:44:35 +0000 (16:44 +0000)]
Merge "Opt Compiler: Materialise constants that cannot be encoded"
Nicolas Geoffray [Mon, 23 Mar 2015 15:23:23 +0000 (15:23 +0000)]
Merge "[optimizing] Improve x86, x86_64 code"
Richard Uhler [Mon, 23 Mar 2015 15:21:20 +0000 (15:21 +0000)]
Merge "Improve dex2oat --dex-file and --dex-location usage info."
Nicolas Geoffray [Mon, 23 Mar 2015 14:45:53 +0000 (14:45 +0000)]
Implement a space filter for optimizing.
Heuristic-based. Currently only for enabling fugu user build.
Change-Id: I76e652bd3f00ed84a2a8ad69c7c2c0e24d74cd68
Nicolas Geoffray [Mon, 23 Mar 2015 14:08:21 +0000 (14:08 +0000)]
Merge "Update script now that optimizing is default."
Nicolas Geoffray [Sat, 21 Mar 2015 13:43:15 +0000 (13:43 +0000)]
Update script now that optimizing is default.
bug:
19872972
Change-Id: I648078483af5a0db3a13b0f94c36d083cbc4d2df
Mathieu Chartier [Sun, 22 Mar 2015 20:22:24 +0000 (20:22 +0000)]
Merge "Change "no-","no" test prefix to n"
Jeff Hao [Sat, 21 Mar 2015 02:45:59 +0000 (02:45 +0000)]
Merge "Fix interpreter to allow 0 size sparse switches."
Jeff Hao [Sat, 21 Mar 2015 02:44:35 +0000 (19:44 -0700)]
Fix interpreter to allow 0 size sparse switches.
Bug:
19827056
Change-Id: I12eaf717f1a4b9bd5e0c8e2a508df9da4e61c4ec
Andreas Gampe [Sat, 21 Mar 2015 02:20:49 +0000 (02:20 +0000)]
Merge "ART: Add Mips32r6 backend support"
Jeff Hao [Sat, 21 Mar 2015 01:47:16 +0000 (01:47 +0000)]
Merge "Fix verifier handling of empty switch as last instruction."
Jeff Hao [Sat, 21 Mar 2015 01:11:45 +0000 (18:11 -0700)]
Fix verifier handling of empty switch as last instruction.
Also fixes optimizing compiler's assumption that switch is non-empty and
adds test case.
Bug:
19827056
Change-Id: I5ac891d5062f528ef3be787b1094cba7b4c0fbd0
Mathieu Chartier [Sat, 21 Mar 2015 01:11:12 +0000 (01:11 +0000)]
Merge "Remove some spammy logging"
Mathieu Chartier [Sat, 21 Mar 2015 01:04:02 +0000 (18:04 -0700)]
Remove some spammy logging
Did not provide useful info and or was redundant.
Change-Id: I42da705debc43460cdd3fdf16e9e9ceb2c137001
Hiroshi Yamauchi [Sat, 21 Mar 2015 01:03:19 +0000 (01:03 +0000)]
Merge "Fix the mac build."
Hiroshi Yamauchi [Sat, 21 Mar 2015 00:56:45 +0000 (17:56 -0700)]
Fix the mac build.
Use SYMBOL around a function name in the assembly code.
Change-Id: I624361ff15a00288c834bd90d1b7783138802ea7
Mathieu Chartier [Sat, 21 Mar 2015 00:11:37 +0000 (00:11 +0000)]
Merge "Enable more direct code for JIT"
Douglas Leung [Sat, 28 Feb 2015 03:05:03 +0000 (19:05 -0800)]
ART: Add Mips32r6 backend support
Add Mips32r6 compiler support.
Don't use deprecated Mips32r2 instructions if running in Mips32r6
mode.
Change-Id: I54e689aa8c026ccb75c4af515aa2794f471c9f67
Mathieu Chartier [Sat, 28 Feb 2015 00:10:48 +0000 (16:10 -0800)]
Enable more direct code for JIT
Hard to measure the performance impact, but it should be faster.
Bug:
17950037
Change-Id: Ib8d216bb3b305dc390b5df7ee92427fd6bd8aab3
Mathieu Chartier [Fri, 20 Mar 2015 21:29:51 +0000 (14:29 -0700)]
Change "no-","no" test prefix to n
Reduces file names to under 255 characters, for now.
Change-Id: I095da02c1a3fc14fa9022d1a39307845bd870abc
Vladimir Marko [Fri, 20 Mar 2015 21:31:13 +0000 (21:31 +0000)]
Merge "Quick: Clean up slow paths."
Vladimir Marko [Fri, 20 Mar 2015 12:08:03 +0000 (12:08 +0000)]
Quick: Clean up slow paths.
Change-Id: I278d42be77b02778c4a419ae9024b37929915b64
Hiroshi Yamauchi [Fri, 20 Mar 2015 20:49:09 +0000 (20:49 +0000)]
Merge "Assembly TLAB allocation fast path for x86_64."
Andreas Gampe [Fri, 20 Mar 2015 20:16:07 +0000 (20:16 +0000)]
Merge "ART: Fix expectations for instruction-set-features string"
Goran Jakovljevic [Thu, 12 Mar 2015 14:32:55 +0000 (15:32 +0100)]
ART: Fix expectations for instruction-set-features string
Only check for an empty features vector if we found "default." The
vector can be empty if this is already handled, e.g., for "smp."
Change-Id: I0d07faf38d0b50f151b5d29e6993d8224034254e
Andreas Gampe [Fri, 20 Mar 2015 19:56:21 +0000 (19:56 +0000)]
Merge "ART: Change the isa defaults for Mips"
Douglas Leung [Wed, 18 Mar 2015 18:29:14 +0000 (11:29 -0700)]
ART: Change the isa defaults for Mips
Select the correct cpu variant for ART and select the default
features based on compile flags for when the variant is not
defined.
Change-Id: I13622db85446ed6fbb467a699d8d3e27833f6f88
Hiroshi Yamauchi [Thu, 19 Mar 2015 19:35:04 +0000 (12:35 -0700)]
Assembly TLAB allocation fast path for x86_64.
TODO: resolved/initialized cases, other architectures.
Bug:
9986565
Change-Id: If6df3449a3b2f5074d11babdda0fd2791fd54946
Hiroshi Yamauchi [Fri, 20 Mar 2015 18:31:33 +0000 (18:31 +0000)]
Merge "Make it possible to enable tlab with a build parameter."
Mathieu Chartier [Fri, 20 Mar 2015 18:14:44 +0000 (18:14 +0000)]
Merge "Add verify-at-runtime compiler filter"
Hiroshi Yamauchi [Fri, 20 Mar 2015 17:28:34 +0000 (10:28 -0700)]
Make it possible to enable tlab with a build parameter.
For testing.
Change-Id: I4d06a4db733b7fa09105f068028483cf88db7925
Mathieu Chartier [Thu, 19 Mar 2015 20:43:37 +0000 (13:43 -0700)]
Add verify-at-runtime compiler filter
Verifies at runtime only, instead of at compilation time.
AOSP HH boot time after clean-oat: ~30s instead of ~35s if enabled.
Also helps install time if enabled there.
TODO: See if there is any possible deadlocks that can result from
this.
Bug:
19762303
Change-Id: Ibfba77148da9039e8d7d7497c05486bc044eefe7
Nicolas Geoffray [Fri, 20 Mar 2015 14:58:45 +0000 (14:58 +0000)]
Merge "Revert "Revert "Use optimizing for apps."""
Nicolas Geoffray [Fri, 20 Mar 2015 14:56:12 +0000 (14:56 +0000)]
Merge "Compress the StackMaps."
Nicolas Geoffray [Fri, 20 Mar 2015 10:06:38 +0000 (10:06 +0000)]
Compress the StackMaps.
First step towards the compression of the StackMap (not
the DexRegisterMap). Next step will be to just use what is
needed (instead of byte -> word).
Change-Id: I4f81b2d05bf5cc508585e16fbbed1bafbc850e2e
Nicolas Geoffray [Fri, 20 Mar 2015 14:48:13 +0000 (14:48 +0000)]
Revert "Revert "Use optimizing for apps.""
This reverts commit
706cae36209932f258b2fe2e396f31d2dd7d585e.
Change-Id: I75cc6206ec17ade52a6db0737b62aa37ea2fa300
Nicolas Geoffray [Fri, 20 Mar 2015 13:51:03 +0000 (13:51 +0000)]
Merge "Remember whether a method was worth inlining."
Nicolas Geoffray [Wed, 18 Mar 2015 18:31:52 +0000 (18:31 +0000)]
Remember whether a method was worth inlining.
Change-Id: I9d8efe312b264739ac6307f966e43c1d7650a3ca
Mathieu Chartier [Fri, 20 Mar 2015 03:08:27 +0000 (03:08 +0000)]
Merge "Change RETURN_VOID_BARRIER to RETURN_VOID_NO_BARRIER"
Mathieu Chartier [Thu, 19 Mar 2015 19:43:20 +0000 (12:43 -0700)]
Change RETURN_VOID_BARRIER to RETURN_VOID_NO_BARRIER
We want to default to having a barrier for the case where we don't
dex to dex.
Bug:
19762303
Change-Id: I60348d89eaf0b9e1e480298afcecbb5f52e8661b
Nicolas Geoffray [Thu, 19 Mar 2015 18:51:07 +0000 (18:51 +0000)]
Merge "Revert "Use optimizing for apps.""
Hiroshi Yamauchi [Thu, 19 Mar 2015 18:49:47 +0000 (18:49 +0000)]
Merge "Fix 003-omnibus-opcodes flaky failures with GSS GC."
Nicolas Geoffray [Thu, 19 Mar 2015 18:49:46 +0000 (18:49 +0000)]
Revert "Use optimizing for apps."
This reverts commit
f3251d12dfa387493dbde4c4148a633802f5f7e3.
Change-Id: I32514e10ece55ee7bd7382ce2e956d57c9b621e5
Hiroshi Yamauchi [Thu, 19 Mar 2015 00:20:11 +0000 (17:20 -0700)]
Fix 003-omnibus-opcodes flaky failures with GSS GC.
Fix a moving GC bug in Class::SetStatus().
Bug:
19828874
Change-Id: I6bef49a7ce964e8a7e316f282aaf1b8544efe76d
Mathieu Chartier [Thu, 19 Mar 2015 01:50:43 +0000 (01:50 +0000)]
Merge "Fix JIT options with late init"
Mathieu Chartier [Tue, 17 Mar 2015 20:48:29 +0000 (13:48 -0700)]
Fix JIT options with late init
Previously we couldn't create the JIT since we didn't have any
JITOptions.
Bug:
19735273
Change-Id: I24b8ed131ed8b18f75ec94291e135d8a1c089ebd
Colin Cross [Wed, 18 Mar 2015 21:37:12 +0000 (21:37 +0000)]
Merge "Remove the Android.mk GCC-only source files hackery"
Colin Cross [Wed, 18 Mar 2015 21:01:19 +0000 (14:01 -0700)]
Remove the Android.mk GCC-only source files hackery
The complexity in Android.mk to deal with GCC-only source files is
unnecessary, use #if !defined(__clang__) around the contents of
interpreter/interpreter_goto_table_impl.cc, the same way
interpreter/interpreter.cc does around references to it.
Bug:
17716550
Change-Id: I775c23b6790d38b0d73a92529c696a31e6a4ae83
Mathieu Chartier [Wed, 18 Mar 2015 20:48:29 +0000 (20:48 +0000)]
Merge "Clean up hash set"
Mathieu Chartier [Wed, 18 Mar 2015 17:39:00 +0000 (10:39 -0700)]
Clean up hash set
Added vertical whitespace, const iterators, made some functions
const.
Change-Id: I188dc0384a98d6dae2822f0ac38b740f2356c23d
Vladimir Marko [Wed, 18 Mar 2015 16:01:24 +0000 (16:01 +0000)]
Merge "Quick: Eliminate check-cast guaranteed by instance-of."
Richard Uhler [Tue, 17 Mar 2015 18:26:16 +0000 (11:26 -0700)]
Improve dex2oat --dex-file and --dex-location usage info.
Change-Id: I8cb2070149ad9fdcf01d773abb1547811999772f
Vladimir Marko [Wed, 18 Mar 2015 11:33:58 +0000 (11:33 +0000)]
Quick: Eliminate check-cast guaranteed by instance-of.
Eliminate check-cast if the result of an instance-of with
the very same type on the same value is used to branch to
the check-cast's block or a dominator of it.
Note that there already exists a verifier-based elimination
of check-cast but it excludes check-cast on interfaces. This
new optimization works for interface types and, since it's
GVN-based, it can better recognize when the same reference
is used for instance-of and check-cast.
Change-Id: Ib315199805099d1cb0534bb4a90dc51baa409685
Nicolas Geoffray [Wed, 18 Mar 2015 11:50:05 +0000 (11:50 +0000)]
Merge "Add a script to be run by test device on buildbot."
Nicolas Geoffray [Wed, 18 Mar 2015 11:23:56 +0000 (11:23 +0000)]
Add a script to be run by test device on buildbot.
Change-Id: Ifb0f739dfa56bb32b07a47ff48282b2a786009ac
Nicolas Geoffray [Wed, 18 Mar 2015 10:48:19 +0000 (10:48 +0000)]
Merge "StackMap: Always load and store unalign."
Nicolas Geoffray [Wed, 18 Mar 2015 10:42:22 +0000 (10:42 +0000)]
StackMap: Always load and store unalign.
Now that we can have a mix of Quick and Optimized code in an .oat
file, a CodeInfo object is not necessarily word aligned.
Change-Id: Ic6c5d1a2c6e20363436726a0708b0764b5a76caf
David Brazdil [Wed, 18 Mar 2015 09:15:21 +0000 (09:15 +0000)]
Merge "ART: Fix condition for StoreNeedsWriteBarrier"
Nicolas Geoffray [Wed, 18 Mar 2015 08:27:15 +0000 (08:27 +0000)]
Merge "Use optimizing for apps."
Hiroshi Yamauchi [Wed, 18 Mar 2015 00:06:16 +0000 (00:06 +0000)]
Merge "Fix oat_file_assistant_test32 flaky failures with GSS collector."
Hiroshi Yamauchi [Tue, 17 Mar 2015 23:01:11 +0000 (16:01 -0700)]
Fix oat_file_assistant_test32 flaky failures with GSS collector.
Bug:
19800031
Change-Id: I5146fa4e6a79bad94762102a50956c31251dcd2a
Mathieu Chartier [Tue, 17 Mar 2015 21:51:43 +0000 (21:51 +0000)]
Merge "Add JIT zygote hook"
Calin Juravle [Tue, 17 Mar 2015 21:19:02 +0000 (21:19 +0000)]
Merge "Revert "Forbid the use of shifts in ShifterOperand in Thumb2""
Calin Juravle [Tue, 17 Mar 2015 21:18:33 +0000 (21:18 +0000)]
Merge "Revert "Make subs alter flags when rn is an immediate""
Calin Juravle [Tue, 17 Mar 2015 21:18:07 +0000 (21:18 +0000)]
Merge "Revert "Inline long shift code""
Calin Juravle [Tue, 17 Mar 2015 21:16:38 +0000 (21:16 +0000)]
Revert "Inline long shift code"
This reverts commit
09895ebf2d98783e65930a820e9288703bb1a50b.
Change-Id: I7544022d896ef4353bc2cdf4b036403ed20c956d
Calin Juravle [Tue, 17 Mar 2015 21:16:24 +0000 (21:16 +0000)]
Revert "Make subs alter flags when rn is an immediate"
This reverts commit
8de00e3f5fcb99bfd7e4dc679ab7333549bec2c1.
Change-Id: Ie9da31279f565f165d51d8c0036928377280e3b8
Calin Juravle [Tue, 17 Mar 2015 21:16:10 +0000 (21:16 +0000)]
Revert "Forbid the use of shifts in ShifterOperand in Thumb2"
This reverts commit
bada8b0f0a10bd32d6cb87ed4e57f2aa3d7c03c2.
Change-Id: Ic89c76367c8ab91cfb5d1510789ac2e352922da8
David Brazdil [Tue, 17 Mar 2015 18:48:28 +0000 (18:48 +0000)]
ART: Fix condition for StoreNeedsWriteBarrier
Codegen's StoreNeedsWriteBarrier assumed nulls are represented as
integer constants and generated a barrier when not needed. This patch
fixes the bug.
Change-Id: I79247f1009b1fe6f24dba0d57e846ecc55806d4d
Calin Juravle [Tue, 17 Mar 2015 18:50:54 +0000 (18:50 +0000)]
Merge "Inline long shift code"
Guillaume "Vermeille" Sanchez [Wed, 11 Mar 2015 14:57:40 +0000 (14:57 +0000)]
Inline long shift code
Change-Id: I96887c295eb9a23dad4c9cc05d0a0e3ba17f674d
Calin Juravle [Tue, 17 Mar 2015 18:42:26 +0000 (18:42 +0000)]
Merge "Make subs alter flags when rn is an immediate"
Calin Juravle [Tue, 17 Mar 2015 18:41:43 +0000 (18:41 +0000)]
Merge "Forbid the use of shifts in ShifterOperand in Thumb2"
Mathieu Chartier [Tue, 17 Mar 2015 16:52:22 +0000 (09:52 -0700)]
Add JIT zygote hook
Bug:
19735273
Change-Id: I1983852e80010c344b45e0bb459de47c56adfce8
Nicolas Geoffray [Tue, 17 Mar 2015 18:15:46 +0000 (18:15 +0000)]
Merge "Unbreak checker."
Nicolas Geoffray [Tue, 17 Mar 2015 18:12:06 +0000 (18:12 +0000)]
Unbreak checker.
Change-Id: Idabb8c04c29d265330ef9ae28c1df01129abe9dd
Nicolas Geoffray [Tue, 17 Mar 2015 18:11:36 +0000 (18:11 +0000)]
Merge "Fall back to Quick when Optimizing cannot compile."
Nicolas Geoffray [Tue, 17 Mar 2015 17:09:30 +0000 (17:09 +0000)]
Fall back to Quick when Optimizing cannot compile.
Currently applies when seeing unresolved types/methods/fields,
and methods with try/catch.
Change-Id: I93b12d440b39f0b9faf98f08f2bfddedfeff7182
Guillaume "Vermeille" Sanchez [Wed, 11 Mar 2015 14:30:31 +0000 (14:30 +0000)]
Make subs alter flags when rn is an immediate
Change-Id: I7ea84fca5f97713871744b8ac4265a84fd6a5248
Nicolas Geoffray [Tue, 17 Mar 2015 16:31:28 +0000 (16:31 +0000)]
Merge "PREOPT compiles using dex2oatd so don't emit debug instructions."
Nicolas Geoffray [Tue, 17 Mar 2015 16:16:49 +0000 (16:16 +0000)]
PREOPT compiles using dex2oatd so don't emit debug instructions.
Change-Id: I8d2ab8d956ad0ce313928918c658d49f490ad081
Nicolas Geoffray [Wed, 11 Mar 2015 18:41:06 +0000 (18:41 +0000)]
Use optimizing for apps.
Doing it in dex2oat, to avoid messing up with our current testing.
Change-Id: I76c58f11f0d4756b894e797fc52712453e35adb1
Vladimir Marko [Tue, 17 Mar 2015 11:11:54 +0000 (11:11 +0000)]
Merge "ART: Fix build for counting arena allocations."
Vladimir Marko [Tue, 17 Mar 2015 11:05:20 +0000 (11:05 +0000)]
ART: Fix build for counting arena allocations.
Change-Id: I1fbb8cc9c4934cc81cb80c5c2107c63fd16a0a05
Serban Constantinescu [Sun, 22 Feb 2015 22:08:01 +0000 (22:08 +0000)]
Opt Compiler: Materialise constants that cannot be encoded
The VIXL MacroAssembler deals gracefully with any immediate. However
when the constant has multiple uses and cannot be encoded in the
instruction's immediate field we are better off using a register for
the constant and thus sharing the constant generation between multiple
uses.
Eg:
var += #Const; // #Const cannot be encoded.
var += #Const;
Before: After:
mov wip0, #Const mov w4, #Const
add w0, w0, wip0 add w0, w0, w4
mov wip0, #Const add w0, w0, w4
add w0, w0, wip0
Change-Id: Ied8577c879845777e52867aced16b2b45e06ac6c
Signed-off-by: Serban Constantinescu <serban.constantinescu@arm.com>
David Brazdil [Tue, 17 Mar 2015 10:08:50 +0000 (10:08 +0000)]
Merge "ART: Faster implementation of GVN's hash table"
David Brazdil [Tue, 3 Mar 2015 11:54:54 +0000 (11:54 +0000)]
ART: Faster implementation of GVN's hash table
The basic hash table in Optimizing's GVN pass does not scale for
larger methods and quickly becomes a bottleneck. This patch provides
a different implementation, focusing on the following:
(1) Proper buckets with chaining for near constant-time lookup.
(2) Bucket inheritance for faster cloning. A clone does not actually
copy the entries until a first change is made.
(3) Table resizing for better load management. Done during cloning.
(4) Kill() and IntersectWith() applied only on impure instructions.
This is achieved by splitting (im)pure entries between even- and
odd-indexed buckets.
Benchmarks show that this optimization speeds up GVN by ~10%, which
translates to a rougly 2% change in the overall compilation time.
Change-Id: Ib4058359701d990194cfd49c6ee46ac2372f090c
Andrew Hsieh [Mon, 16 Mar 2015 23:48:36 +0000 (23:48 +0000)]
Merge "Fixed maybe used uninitialized"
Nicolas Geoffray [Mon, 16 Mar 2015 17:20:06 +0000 (17:20 +0000)]
Merge "[optimizing] Use baseline when debuggable is set."
Nicolas Geoffray [Mon, 16 Mar 2015 13:55:40 +0000 (13:55 +0000)]
[optimizing] Use baseline when debuggable is set.
SSA form conflicts with JDWP's SetValue functionality. Because
we do not deopt all the call stack, we may call SetValue on a
compiled frame, which doesn't work with optimizing. Simplest
solution for now is to just use baseline.
Change-Id: I91738b363eec8fef145486bd96681aea73a1baa8
Andreas Gampe [Mon, 16 Mar 2015 15:10:02 +0000 (15:10 +0000)]
Merge "ART: Change logging strategy in run-tests"
Nicolas Geoffray [Mon, 16 Mar 2015 13:59:02 +0000 (13:59 +0000)]
Merge "Update test expections after network changes in kernel/libcore."
Nicolas Geoffray [Mon, 16 Mar 2015 13:51:43 +0000 (13:51 +0000)]
Update test expections after network changes in kernel/libcore.
Change-Id: I1cdb55b2320a451d82b24a1f497930c12dd506cb
Nicolas Geoffray [Mon, 16 Mar 2015 10:49:25 +0000 (10:49 +0000)]
Merge "Update locations of registers after slow paths spilling."