OSDN Git Service
David Brazdil [Fri, 3 Apr 2015 15:02:44 +0000 (16:02 +0100)]
ART: Implement HBooleanNot instruction
Optimizations simplifying operations on boolean values (boolean
simplifier, instruction simplifier) can benefit from having a special
HInstruction for negating booleans in order to perform more transforms
and produce faster machine code.
This patch implements HBooleanNot as 'x xor 1', assuming that booleans
are 1-bit integers and allowing for a single-instruction negation on
all supported platforms.
Change-Id: I33a2649c1821255b18a86ca68ed16416063c739f
Nicolas Geoffray [Wed, 15 Apr 2015 09:17:19 +0000 (09:17 +0000)]
Merge "Add a check in the location summary."
Nicolas Geoffray [Wed, 15 Apr 2015 09:17:03 +0000 (09:17 +0000)]
Merge "Refactor safepoints in register allocator."
Nicolas Geoffray [Tue, 14 Apr 2015 13:10:59 +0000 (14:10 +0100)]
Refactor safepoints in register allocator.
This is in preparation for adding logic around callee/caller
saved in the register allocator.
Change-Id: I4204169f0a6a01074880538833144be7b0810882
Nicolas Geoffray [Tue, 14 Apr 2015 16:05:16 +0000 (17:05 +0100)]
Add a check in the location summary.
Having SameAsFirstInput for out, and first input Any does not
make sense currently. If it's stack, we are going to overwrite
it, potentially clobbering another local. And constant does not
make sense.
Change-Id: I0ce357137487ed3dcecf4efd9922a039a2a1a29d
Vladimir Marko [Wed, 15 Apr 2015 08:28:59 +0000 (08:28 +0000)]
Merge "ARM64: Remove suspend register."
Andreas Gampe [Wed, 15 Apr 2015 05:44:30 +0000 (05:44 +0000)]
Merge "ART: More nullptr checks in unstarted runtime"
Andreas Gampe [Wed, 15 Apr 2015 05:16:14 +0000 (22:16 -0700)]
ART: More nullptr checks in unstarted runtime
More checks necessary for the compiler-driver test.
Change-Id: I29bc20d1f571df5407f9b5fca212e3e79ef9cdc7
David Srbecky [Wed, 15 Apr 2015 01:10:13 +0000 (01:10 +0000)]
Merge "Split .debug_info section to compilation units."
David Srbecky [Tue, 14 Apr 2015 00:57:43 +0000 (01:57 +0100)]
Split .debug_info section to compilation units.
This resolves old TODO in the code. It is also very important
for performance and memory usage of any tools which might be
consuming the debug data. Without this split, the tools
would be forced to decode (and probably store in memory) all of
debug data even for a simple query. With this change it should
be easy to find only the relevant compilation unit.
Change-Id: I9f285eaa01632b6adea39cae866df6f76e9d0062
Mathieu Chartier [Tue, 14 Apr 2015 22:54:07 +0000 (22:54 +0000)]
Merge "Remove suspend point from field loading"
Mathieu Chartier [Tue, 14 Apr 2015 22:43:10 +0000 (15:43 -0700)]
Remove suspend point from field loading
The error was that we had a partially constructed field array when we
got suspended by moving GC. This caused the already allocated fields
to not get updated, and be stale roots the next GC. Fixes test 125
with GSS collector.
Change-Id: I7278def915f540b6a9d12677a6ba61637f5949a2
Andreas Gampe [Tue, 14 Apr 2015 21:17:04 +0000 (21:17 +0000)]
Merge "ART: Store classpath information into oat file"
Andreas Gampe [Thu, 9 Apr 2015 18:15:04 +0000 (11:15 -0700)]
ART: Store classpath information into oat file
Store a "dependency list" of class-path dex-files into the key-value
store of an oat file. The list is made up of dex locations and
corresponding checksums.
Add tests for encoding, decoding and checking the list.
Bug:
19781184
Change-Id: Ie700dd37e6e086db599c95d329ac1f1d2ff0b758
Andreas Gampe [Tue, 14 Apr 2015 21:07:05 +0000 (21:07 +0000)]
Merge "ART: Add Security cutout to unstarted runtime"
Andreas Gampe [Tue, 14 Apr 2015 21:06:16 +0000 (21:06 +0000)]
Merge "ART: Make the PathClassLoader fast-path recursive"
Andreas Gampe [Tue, 14 Apr 2015 05:14:19 +0000 (22:14 -0700)]
ART: Make the PathClassLoader fast-path recursive
Allow an arbitrary nesting of path class-loaders. This will also
handle the fake java.lang.BootClassLoader as a class-loader object
correctly (which is of some importance to compile-time initialization).
Bug:
19781184
Bug:
19542228
Change-Id: I61f0249cf4ec8df08a83ccbd29bcf067619c28c0
Mathieu Chartier [Tue, 14 Apr 2015 18:54:15 +0000 (18:54 +0000)]
Merge "Fix test 104 for --relocate --no-patchoat"
Mathieu Chartier [Tue, 14 Apr 2015 18:33:53 +0000 (11:33 -0700)]
Fix test 104 for --relocate --no-patchoat
Failure caused by keeping an array live in a vreg, this caused
getDeclaredMethod to throw OOME.
Change-Id: Id2aa976af0978cdd7354fb94b3becfcc85e19ca2
Mathieu Chartier [Tue, 14 Apr 2015 18:12:13 +0000 (18:12 +0000)]
Merge "Fix valgrind tests"
Mathieu Chartier [Tue, 14 Apr 2015 16:35:18 +0000 (09:35 -0700)]
Fix valgrind tests
Delete large objects in space destructor. Also some cleanup.
Change-Id: I4c4e90149841a156b7a3236201b37683e14890fb
Andreas Gampe [Tue, 14 Apr 2015 17:33:50 +0000 (17:33 +0000)]
Merge "ART: Add a null-check to unstarted-runtime"
Hiroshi Yamauchi [Tue, 14 Apr 2015 17:31:12 +0000 (17:31 +0000)]
Merge "getRuntimeStat() support (ART)."
Andreas Gampe [Tue, 14 Apr 2015 17:10:33 +0000 (10:10 -0700)]
ART: Add a null-check to unstarted-runtime
Check the string parameter to Class.forName before using it.
Bug:
19542228
Change-Id: I0d5c44122055c46e251451b1c0f687bbaf64d13e
Andreas Gampe [Mon, 13 Apr 2015 21:17:09 +0000 (14:17 -0700)]
ART: Add Security cutout to unstarted runtime
This allows limited I/O in the compiler to read security.properties,
which in turn allows to compile-time initialize Security, and thus
Services and most of the providers.
Bug:
19498458
Bug:
19542228
Change-Id: I853952b83ca99006907c070734f767259c975517
Roland Levillain [Tue, 14 Apr 2015 16:34:44 +0000 (16:34 +0000)]
Merge "Opt Compiler: ARM64 goodness"
Zheng Xu [Tue, 14 Apr 2015 12:04:41 +0000 (20:04 +0800)]
ARM64: Remove suspend register.
It also clean up build/remove frame used by JNI compiler and generates
stp/ldp instead of str/ldr. Also x19 has been unblocked in both quick and
optimizing compiler.
Change-Id: Idbeac0942265f493266b2ef9b7a65bb4054f0e2d
Nicolas Geoffray [Tue, 14 Apr 2015 15:35:23 +0000 (15:35 +0000)]
Merge "Fix a bug in type propagation."
Nicolas Geoffray [Tue, 14 Apr 2015 14:11:57 +0000 (15:11 +0100)]
Fix a bug in type propagation.
If a phi requests its inputs to be of a certain type, the inputs need
to propagate that type to their users, as those users might be
phis.
Bug report and test courtesy of Serguei I Katkov.
Change-Id: I79baac271566ec4fa684c1edf11a1b3383d896a9
Christopher Ferris [Tue, 14 Apr 2015 00:18:12 +0000 (00:18 +0000)]
Merge "Revert "ART: Turn of native stack dump on x86 on-device""
Mathieu Chartier [Mon, 13 Apr 2015 23:54:09 +0000 (23:54 +0000)]
Merge "Fix DCHECK failures from Class::VisitFieldRoots"
Christopher Ferris [Mon, 13 Apr 2015 23:18:02 +0000 (23:18 +0000)]
Revert "ART: Turn of native stack dump on x86 on-device"
This reverts commit
2f0751ea75e5f093d9ce7b8587e65a2ca3de0855.
Bug:
20040863
Change-Id: Ibd40916c0f84512b0ba13af09d4fd345be39e227
Mathieu Chartier [Fri, 10 Apr 2015 21:23:35 +0000 (14:23 -0700)]
Fix DCHECK failures from Class::VisitFieldRoots
We now use GetDeclaringClassUnchecked when marking roots to fix
flaky test failures. Fixed a race condition in root marking where
we could have non zero field array length with a null pointer.
Fixed a race condition where we could be marking roots before
FixupTemporaryDeclaringClass had finished. The solution is to
only do the declaring class CHECK if we are at least resolved.
Fixed JDWP tests by changing FieldId / MethodId to be 64 bits.
Also some cleanup.
Change-Id: Ibac09519860d93c3f68a5cc964bbc91dc10a279a
David Srbecky [Mon, 13 Apr 2015 22:42:56 +0000 (22:42 +0000)]
Merge "Append [DEDUPED] suffix to all deduped methods in the symbol table."
Hiroshi Yamauchi [Thu, 2 Apr 2015 17:18:12 +0000 (10:18 -0700)]
getRuntimeStat() support (ART).
Export some runtime stats (currently GC stats) via
VMDebug.getRuntimeStat().
Added several new GC stats such as blocking GC counts and GC count
histograms.
Bug:
19825248
Change-Id: I8ece9ed241dc3982dfd983d7159090ba82940dce
David Srbecky [Sun, 12 Apr 2015 12:12:26 +0000 (13:12 +0100)]
Append [DEDUPED] suffix to all deduped methods in the symbol table.
This resolves old TODO in the code. The first method was never
marked as deduped and only the subsequent copies were recognised.
Therefore the suffix might have been missing in backtraces.
Change-Id: I4882d90f3049f7e196cd38c8987ba02960dab338
David Srbecky [Mon, 13 Apr 2015 22:25:38 +0000 (22:25 +0000)]
Merge "Move the file which defines DWARF enums."
David Srbecky [Sun, 12 Apr 2015 07:47:47 +0000 (08:47 +0100)]
Move the file which defines DWARF enums.
It was previously part of the runtime since it was needed
by the linker. This is no longer the case so we can move
it to the DWARF utility library.
Change-Id: I1874fad45d27fd9ebbae17dd82d43322190f91ef
David Srbecky [Mon, 13 Apr 2015 20:44:26 +0000 (20:44 +0000)]
Merge "Add test for x86-64 DWARF register mapping."
David Srbecky [Sun, 12 Apr 2015 13:58:39 +0000 (14:58 +0100)]
Add test for x86-64 DWARF register mapping.
This is the only mapping which is non-trivial.
Change-Id: I59be4b6ffb0ffbbf00ddb72e77e80cfb9e89d9f2
David Srbecky [Mon, 13 Apr 2015 20:34:10 +0000 (20:34 +0000)]
Merge "Add --include-cfi compiler option."
David Srbecky [Sun, 12 Apr 2015 10:40:39 +0000 (11:40 +0100)]
Add --include-cfi compiler option.
Decouple generation of CFI from the rest of debug symbols.
This makes it possible to generate oat with CFI but without
the rest of debug symbols.
This is in line with intention of the .eh_frame section.
The section does not have the .debug_ prefix because it
is considered somewhat different to the rest of debug symbols.
Change-Id: I32816ecd4f30ac4e0dc69d69a4993e349c737f96
David Srbecky [Mon, 13 Apr 2015 20:00:53 +0000 (20:00 +0000)]
Merge "Remove the --gen-gdb-info compiler option."
David Srbecky [Mon, 13 Apr 2015 20:00:39 +0000 (20:00 +0000)]
Merge "Whitespace cleanup in DWARFReg helper functions."
David Srbecky [Mon, 13 Apr 2015 20:00:25 +0000 (20:00 +0000)]
Merge "Move 'ret' instruction generation inside GenerateFrameExit."
David Srbecky [Mon, 13 Apr 2015 19:52:39 +0000 (19:52 +0000)]
Merge "Relocate DWARF using .oat_patches."
Roland Levillain [Mon, 13 Apr 2015 17:50:33 +0000 (17:50 +0000)]
Merge "Exercise the x86 and x86-64 FILD and FISTP instructions."
Vladimir Marko [Mon, 13 Apr 2015 17:10:48 +0000 (17:10 +0000)]
Merge "ART: Clean up includes."
Sebastien Hertz [Mon, 13 Apr 2015 17:04:58 +0000 (17:04 +0000)]
Merge "JDWP: fix thread_list deadlock"
Roland Levillain [Mon, 13 Apr 2015 16:00:20 +0000 (17:00 +0100)]
Exercise the x86 and x86-64 FILD and FISTP instructions.
- Ensure the double- and quadword x87 (FPU) instructions for
integer loading (resp. fildl and fildll) are properly
generated by the x86 and x86-64 generators (resp.
X86Assembler::filds/X86_64Assembler::filds and
X86Assembler::fildl/X86_64Assembler::fildl).
- Ensure the double- and quadword x87 (FPU) instructions for
integer storing & popping (resp. filstpl and fistpll) are
properly generated by the x86 and x86-64 generators (resp.
X86Assembler::fistps/X86_64Assembler::fistps and
X86Assembler::fistpl/X86_64Assembler::fistpl).
These instructions can be used in the implementation of the
long-to-float and long-to-double Dex type conversions.
Change-Id: Iade52a9aee326d189d77d3dbd352a2b5dab52e46
Vladimir Marko [Mon, 13 Apr 2015 11:22:36 +0000 (12:22 +0100)]
ART: Clean up includes.
Reduce dependencies to improve incremental build times.
Break up circular dependency involving class_linker-inl.h.
Change-Id: I4be742c5c2b5cd9855beea86630fd68aab76b0db
Nicolas Geoffray [Mon, 13 Apr 2015 14:26:25 +0000 (14:26 +0000)]
Merge "Remove duplicated dex2oat usage message"
Calin Juravle [Mon, 13 Apr 2015 14:26:18 +0000 (14:26 +0000)]
Merge "Revert "Fallback to quick in case of soft verification errors""
Calin Juravle [Mon, 13 Apr 2015 14:25:53 +0000 (14:25 +0000)]
Revert "Fallback to quick in case of soft verification errors"
This reverts commit
c751d37e692d89b360f3c09421401f581b5c6d06.
Change-Id: I2183df8e856410989bc019f6a1f58af37d5d7eab
Snowcat8436 [Mon, 13 Apr 2015 13:48:57 +0000 (22:48 +0900)]
Remove duplicated dex2oat usage message
Because '--huge-method-max' usage message is duplicated,
Remove duplicated dex2oat usage message.
Change-Id: I91cef8319d7292e4977eba49dfcb8cc2cd9ac1bf
Calin Juravle [Mon, 13 Apr 2015 13:10:37 +0000 (13:10 +0000)]
Merge "Fallback to quick in case of soft verification errors"
Nicolas Geoffray [Mon, 13 Apr 2015 12:53:56 +0000 (12:53 +0000)]
Merge "Revert "Optimizing: Fix long-to-fp conversion on x86.""
Nicolas Geoffray [Mon, 13 Apr 2015 12:53:37 +0000 (12:53 +0000)]
Revert "Optimizing: Fix long-to-fp conversion on x86."
Test fails on arm.
This reverts commit
2d45b4df3838d9c0e5a213305ccd1d7009e01437.
Change-Id: Id2864917b52f7ffba459680303a2d15b34f16a4e
Roland Levillain [Mon, 13 Apr 2015 11:33:08 +0000 (11:33 +0000)]
Merge "Optimizing: Fix long-to-fp conversion on x86."
Serguei Katkov [Tue, 7 Apr 2015 11:04:50 +0000 (17:04 +0600)]
Optimizing: Fix long-to-fp conversion on x86.
long-to-fp conversion implemented using SSE loses the precision.
The test is included. CL uses FPU to provide the correct result.
Change-Id: I8eaf3c46819a8cb52642a7e7d7c4e3e0edbc88db
Signed-off-by: Serguei Katkov <serguei.i.katkov@intel.com>
Nicolas Geoffray [Mon, 13 Apr 2015 09:19:04 +0000 (09:19 +0000)]
Merge "ART: Adds a help message for parallel compilation"
Andreas Gampe [Sun, 12 Apr 2015 20:23:38 +0000 (20:23 +0000)]
Merge "ART: Ignore result for exception-case JNIEndWithReference"
David Srbecky [Sun, 12 Apr 2015 08:52:31 +0000 (09:52 +0100)]
Remove the --gen-gdb-info compiler option.
It is never used. We generally use --include-debug-symbols instead.
Change-Id: I933495cd85ab4f7dfcf3ef3cd2d943d4b870ffeb
David Srbecky [Sun, 12 Apr 2015 08:35:32 +0000 (09:35 +0100)]
Whitespace cleanup in DWARFReg helper functions.
Change-Id: Iedc05969b05be6d93e40467ff23287faaae08fb3
David Srbecky [Sun, 12 Apr 2015 08:27:43 +0000 (09:27 +0100)]
Move 'ret' instruction generation inside GenerateFrameExit.
Change-Id: I0c594d9a2356a006a5ce8dfd41d307cf7c3704ba
David Srbecky [Fri, 10 Apr 2015 23:17:53 +0000 (00:17 +0100)]
Relocate DWARF using .oat_patches.
The current solution is to hard-code knowledge of DWARF in the linker.
This works for simple use of DWARF, but breaks as soon as I try to do
anything more complex. Making the linker fully support DWARF would be
non-trivial task and would be essentially rewrite. Using .oat_patches
is much easier solution.
Relocating .debug_* sections required extending .oat_patches to support
more sections than just .text. I have encoded each section as
null-terminated section name followed by ULEB128 deltas.
The ULEB128 encoding shrinks .oat_patches for .text by factor of
about 6 with 64-bit compiler, and factor of 3 with 32-bit compiler.
On the other hand, it grows by the extra .oat_patches for DWARF which
were not present before (if debug symbols are included).
Overall, it is still a clear improvement even with the DWARF patches.
Change-Id: I78ffeda0f8a3da03341995a3b5ef15c954e16e9f
Andreas Gampe [Sat, 11 Apr 2015 02:57:29 +0000 (19:57 -0700)]
ART: Ignore result for exception-case JNIEndWithReference
The value may not contain a valid jobject, so ignore and use null
directly.
Refactor a bit to have one common function for both synchronized
and non-synchronized case.
Add a test to the JNI compiler tests.
Bug:
18135031
Change-Id: If2f004a112f36f4ff68172a946dec67ce561ae4d
Andreas Gampe [Fri, 10 Apr 2015 22:35:34 +0000 (22:35 +0000)]
Merge "ART: Add Array.createObjectArray to unstarted runtime"
Andreas Gampe [Fri, 10 Apr 2015 21:57:10 +0000 (14:57 -0700)]
ART: Add Array.createObjectArray to unstarted runtime
Necessary for compile-time initialization of android.text.Layout.
Bug:
19542228
Change-Id: I4220c65fcc3a8aaa2765b6f07f1f81c330484244
Nicolas Geoffray [Fri, 10 Apr 2015 21:40:59 +0000 (21:40 +0000)]
Merge "Revert "[optimizing] Improve x86 shifts""
Mathieu Chartier [Fri, 10 Apr 2015 21:22:55 +0000 (21:22 +0000)]
Merge "Move ArtField to native"
Andreas Gampe [Fri, 10 Apr 2015 20:14:01 +0000 (20:14 +0000)]
Merge "ART: Fix failure-log script"
Andreas Gampe [Fri, 10 Apr 2015 20:06:22 +0000 (13:06 -0700)]
ART: Fix failure-log script
The transaction error class has been changed, update the script.
Change-Id: Ibc4dfb8cdca01eb9dc9e868c18d36bf6badb0521
Mathieu Chartier [Fri, 27 Mar 2015 21:35:38 +0000 (14:35 -0700)]
Move ArtField to native
Add linear alloc. Moved ArtField to be native object. Changed image
writer to put ArtFields after the mirror section.
Savings:
2MB on low ram devices
4MB on normal devices
Total PSS measurements before (normal N5, 95s after shell start):
Image size:
7729152 bytes
23112 kB: .NonMoving
23212 kB: .NonMoving
22868 kB: .NonMoving
23072 kB: .NonMoving
22836 kB: .NonMoving
19618 kB: .Zygote
19850 kB: .Zygote
19623 kB: .Zygote
19924 kB: .Zygote
19612 kB: .Zygote
Avg: 42745.4 kB
After:
Image size:
7462912 bytes
17440 kB: .NonMoving
16776 kB: .NonMoving
16804 kB: .NonMoving
17812 kB: .NonMoving
16820 kB: .NonMoving
18788 kB: .Zygote
18856 kB: .Zygote
19064 kB: .Zygote
18841 kB: .Zygote
18629 kB: .Zygote
3499 kB: .LinearAlloc
3408 kB: .LinearAlloc
3424 kB: .LinearAlloc
3600 kB: .LinearAlloc
3436 kB: .LinearAlloc
Avg: 39439.4 kB
No reflection performance changes.
Bug:
19264997
Bug:
17643507
Change-Id: I10c73a37913332080aeb978c7c94713bdfe4fe1c
Andreas Gampe [Fri, 10 Apr 2015 19:14:24 +0000 (19:14 +0000)]
Merge "ART: Refactor CompileOptimized"
Vladimir Marko [Fri, 10 Apr 2015 18:22:10 +0000 (18:22 +0000)]
Merge "Avoid using dex cache array pointers in libart."
Roland Levillain [Fri, 10 Apr 2015 18:12:48 +0000 (18:12 +0000)]
Revert "[optimizing] Improve x86 shifts"
This reverts commit
222fcf96c9b73bbb739012575e7e413caf9348ec.
Reverting this CL as it is breaking a few tests (see http://build.chromium.org/p/client.art/builders/host-x86/builds/3251/steps/test%20optimizing/logs/stdio). Will investigate ASAP.
Change-Id: Iddd8363e83a24aa49fbdf0f0c9dc12e63b4848de
Andreas Gampe [Fri, 10 Apr 2015 17:49:32 +0000 (10:49 -0700)]
ART: Refactor CompileOptimized
Factor out register allocation. Both Clang and GCC inline the
function, but it changes how Clang stack-allocates enough so
that the resulting frame size is below our limit.
Bug:
20139216
Change-Id: I2cf393aed70f2ce0556252b61ae639aacab6f3a7
Vladimir Marko [Thu, 9 Apr 2015 13:13:13 +0000 (14:13 +0100)]
Avoid using dex cache array pointers in libart.
In preparation for making dex cache arrays native, avoid
using them in Java code.
This causes a performance regression for our reflection
benchmarks. Class_getDeclaredMethod and Class_getMethod
take an up to 30% hit, measured using the Quick compiler.
We accept this hit at this stage and we will tune the
performance after we're done with the larger effort.
Companion libcore/ change:
https://android-review.googlesource.com/146069
Bug:
20134538
Change-Id: Ibbef3b50043a1311cd40723ed42e1f1c609b8fc1
Calin Juravle [Wed, 1 Apr 2015 19:27:28 +0000 (20:27 +0100)]
Fallback to quick in case of soft verification errors
Add a regression test: using uninitialized values triggers a soft
verification error and optimizing should not crash.
Thanks to Stephen Kyle (stephenckyle@googlemail.com) for the bug report.
Bug:
19988704
Change-Id: I2493f737efd3fad72f6b41fb60eff1d3731613fb
Andreas Gampe [Fri, 10 Apr 2015 16:47:48 +0000 (16:47 +0000)]
Merge "ART: Remove WriteElf from Compiler"
Andreas Gampe [Fri, 10 Apr 2015 16:28:22 +0000 (09:28 -0700)]
ART: Remove WriteElf from Compiler
As Portable is gone, we only have one elf_writer left. It also
allows to put the decision for 32b vs 64b ELF into a central
point.
Change-Id: Iae67d06df85268b3f0ee5725abc65edd23eb2499
Roland Levillain [Fri, 10 Apr 2015 16:20:23 +0000 (16:20 +0000)]
Merge "Opt compiler: Instruction simplification for HAdd, HNeg, HNot, HSub."
Alexandre Rames [Thu, 9 Apr 2015 17:30:21 +0000 (18:30 +0100)]
Opt compiler: Instruction simplification for HAdd, HNeg, HNot, HSub.
Under assumptions for the 'cost' of each IR (eg. neither HAdd nor HSub
are faster than the other), transformations are only applied if they
(locally) cannot degrade the quality of the graph. The code could be
extended to look at uses of the IRs and detect more opportunities for
optimisations. The optimisations in this patch do not look at other
uses for their inputs.
Change-Id: Ib60dab007af30f43421ef5bb55db2ec32fb8fc0c
Calin Juravle [Fri, 10 Apr 2015 16:15:07 +0000 (16:15 +0000)]
Merge "Follow up of "div/rem on x86 and x86_64", to tidy up the code a little."
Calin Juravle [Fri, 10 Apr 2015 16:12:12 +0000 (16:12 +0000)]
Merge "[optimizing] Improve x86 parallel moves/swaps"
Mark Mendell [Wed, 1 Apr 2015 16:51:05 +0000 (12:51 -0400)]
[optimizing] Improve x86 parallel moves/swaps
Add a new constructor to ScratchRegisterScope that will supply a
register if there is a free one, but not spill to force one. Use this
to generated alternate code that doesn't use a temporary, as the
spill/restore of a register generates extra instructions that aren't
necessary on x86.
Here is the benefit for a 32 bit memory-to-memory exchange with no
free registers:
< 50 push eax
< 53 push ebx
<
8B44244C mov eax, [esp + 76]
<
8B5C246C mov ebx, [esp + 108]
<
8944246C mov [esp + 108], eax
<
895C244C mov [esp + 76], ebx
< 5B pop ebx
< 58 pop eax
---
>
FF742444 push [esp + 68]
>
FF742468 push [esp + 104]
>
8F44244C pop [esp + 72]
>
8F442468 pop [esp + 100]
Avoid using xchg instruction, as it is slow on smaller processors.
Change-Id: Id29ee3abd998577baaee552d55d23e60ae0c7871
Signed-off-by: Mark Mendell <mark.p.mendell@intel.com>
Roland Levillain [Fri, 10 Apr 2015 15:39:15 +0000 (15:39 +0000)]
Merge "[optimizing] Improve x86 shifts"
Roland Levillain [Fri, 10 Apr 2015 14:15:37 +0000 (14:15 +0000)]
Merge "Optimizing x86: Fix VisitArraySet for FP value"
Roland Levillain [Fri, 10 Apr 2015 13:46:09 +0000 (13:46 +0000)]
Merge "[optimizing] Address x86_64 RIP patch comments"
Mark Mendell [Mon, 30 Mar 2015 18:13:30 +0000 (14:13 -0400)]
[optimizing] Improve x86 shifts
Support memory operands for integer shifts. Generate better code for
long shifts by constants.
Change-Id: Icc92fa1b59cc280d4894af6f054e19b01977d5ce
Signed-off-by: Mark Mendell <mark.p.mendell@intel.com>
Mark Mendell [Fri, 10 Apr 2015 00:42:42 +0000 (20:42 -0400)]
[optimizing] Address x86_64 RIP patch comments
Nicolas had some comments after the patch
https://android-review.googlesource.com/#/c/144100 had merged. Fix the
problems that he found.
Change-Id: I40e8a4273997860db7511dc8f1986281b72bead2
Signed-off-by: Mark Mendell <mark.p.mendell@intel.com>
Roland Levillain [Fri, 10 Apr 2015 11:07:18 +0000 (11:07 +0000)]
Merge "Fix checker tests in 458-checker-instruction-simplification."
Alexandre Rames [Thu, 9 Apr 2015 14:21:41 +0000 (15:21 +0100)]
Fix checker tests in 458-checker-instruction-simplification.
Change-Id: I9931e1692117360b8396c0dd8d171c822f0aba3b
Guillaume Sanchez [Thu, 9 Apr 2015 20:12:15 +0000 (21:12 +0100)]
Follow up of "div/rem on x86 and x86_64", to tidy up the code a little.
Change-Id: Ibf39cbc8ac1d773599d70be2cb1e941674b60f1d
Serguei Katkov [Wed, 8 Apr 2015 07:26:09 +0000 (13:26 +0600)]
Optimizing x86: Fix VisitArraySet for FP value
Instruction generator expects to see FP value in XMM register,
so update location builder to follow this.
Change-Id: Idca4bb5cdb59249c77fcc6f76cdfcaba47222b3d
Signed-off-by: Serguei Katkov <serguei.i.katkov@intel.com>
Vladimir Marko [Fri, 10 Apr 2015 08:46:20 +0000 (08:46 +0000)]
Merge "Refine erratum 843419 check for linker workaround."
David Srbecky [Fri, 10 Apr 2015 08:38:25 +0000 (08:38 +0000)]
Merge "Move DWARF related code in ElfWriter to its own file."
David Srbecky [Fri, 10 Apr 2015 08:37:00 +0000 (08:37 +0000)]
Merge "Extend the DWARF library to support .debug_info section."
David Srbecky [Thu, 9 Apr 2015 23:22:14 +0000 (00:22 +0100)]
Move DWARF related code in ElfWriter to its own file.
This is purely for organisation. The DWARF related code
is becoming more complex and I do not want to keep mixing
it with the ElfWriter. The ElfWriter probably should not
be dealing with the fine details of DWARF generation.
I intend to do much more work on DWARF in the future so
this situatuion would only get worse as the code grows.
The code could also use some refactoring and splitting.
However, I have mostly just moved it in this CL.
Change-Id: I6e3401a2b745ddf991b440ad7899ad7d4b921be6