summaryrefslogtreecommitdiff
path: root/compiler/optimizing/optimizing_compiler.cc
AgeCommit message (Collapse)Author
2014-09-19First optimization in new compiler: simple GVN.Nicolas Geoffray
Change-Id: Ibe0efa4e84fd020a53ded310a92e0b4363f91b12
2014-09-18It can be that no method has been compiled.Nicolas Geoffray
Therefore do not divide by 0, but log it. Change-Id: Iee7760ab7f31c73e90d62387e5fb6fb7aa2c56e2
2014-09-17Add the "time" compilation filter and output compilation stats.Nicolas Geoffray
A "time" compiler filter means the compiler optimizes for compile time. Change-Id: Id1a207ceb2d95f3548aae5e45d51b80695da2029
2014-09-08Runtime support for the new stack maps for the opt compiler.Nicolas Geoffray
Now most of the methods supported by the compiler can be optimized, instead of using the baseline. Change-Id: I80ab36a34913fa4e7dd576c7bf55af63594dc1fa
2014-08-22ART: Clean up compilerAndreas Gampe
Clean up the compiler: less extern functions, dis-entangle compilers, hide some compiler specifics, lower global includes. Change-Id: Ibaf88d02505d86994d7845cf0075be5041cc8438
2014-08-15ART source line debug info in OAT filesYevgeny Rouban
OAT files have source line information enough for ART runtime needs like jump to/from interpreter and thread suspension. But this information is not enough for finer grained source level debugging and low-level profiling (VTune or perf). This patch adds to OAT files two additional sections: .debug_line - DWARF formatted Elf32 section with detailed source line information (mapping from native PC to Java source lines). In addition to the debugging symbols added using the dex2oat option --include-debug-symbols, the source line information is added to the section .debug_line. The source line info can be read by many Elf reading tools like objdump, readelf, dwarfdump, gdb, perf, VTune, ... gdb can use this debug line information in x86. In 64-bit mode the information can be used if the oat file is mapped in the lower address space (address has higher 32 bits zeroed). Relocation works. Testing: 1. art/test/run-test --host --gdb [--64] 001-HelloWorld 2. in gdb: break Main.java:19 3. in gdb: break Runtime.java:111 4. in gdb: run - stops at void java.lang.Runtime.<init>() 5. in gdb: backtrace - shows call stack down to main() 6. in gdb: continue - stops at void Main.main() (only in 32-bit mode) 7. in gdb: backtrace - shows call stack down to main() 8. objdump -W <oat-file> - addresses are from VMA range of .text section reported by objdump -h <file> 9. dwarfdump -ka <oat-file> - no errors expected Size of aosp-x86-eng boot.oat increased by 11% from 80.5Mb to 89.2Mb with two sections added .debug_line (7.2Mb) and .rel.debug (1.5Mb). Change-Id: Ib8828832686e49782a63d5529008ff4814ed9cda Signed-off-by: Yevgeny Rouban <yevgeny.y.rouban@intel.com>
2014-07-16Use the thumb2 assembler for the optimizing compiler.Nicolas Geoffray
Change-Id: I2b058f4433504dc3299c06f5cb0b5ab12f34aa82
2014-07-14Add two phi pruning phases.Nicolas Geoffray
Change-Id: Ic4f05e3df96970d78a6938b27cdf9b58ef3849b9
2014-07-14Support fields in optimizing compiler.Nicolas Geoffray
- Required support for temporaries, to be only used by baseline compiler. - Also fixed a few invalid assumptions around locations and instructions that don't need materialization. These instructions should not have an Out. Change-Id: Idc4a30dd95dd18015137300d36bec55fc024cf62
2014-07-04Do not attempt to compile on architectures we do not support.Nicolas Geoffray
Change-Id: I431edff0a753a7fa37c79bdf7ab918d6747667a4
2014-06-26Re-enable tests with the optimizing compiler.Nicolas Geoffray
Tests run ok on my host/target. I reverted the move to using thumb2, because tests were crashing. But I could not reproduce file limits issues. Make SignalTest as crashing for optimizing. We need to implement stack overflow checks. Change-Id: Ieda575501eaf30af7aaa2c44e71544c9c467c24f
2014-06-25Revert "Re-enable tests with the optimizing compiler."Nicolas Geoffray
This reverts commit 20550910e608ed7d86db97927d2ce9d2191061a4. Change-Id: Ic28b719946c795378838a18162a2a2b2cf41a0e8
2014-06-25Re-enable tests with the optimizing compiler.Nicolas Geoffray
Tests run ok on my host/target. I reverted the move to using thumb2, because tests were crashing. But I could not reproduce file limits issues. Change-Id: I26bc4ec1eb6c227750d11210e012d9d3b1d824af
2014-06-24Add some more instruction support to optimizing compiler.Dave Allison
This adds a few more DEX instructions to the optimizing compiler's builder (constants, moves, if_xx, etc). Also: * Changes the codegen for IF_XX instructions to use a condition rather than comparing a value against 0. * Fixes some instructions in the ARM disassembler. * Fixes PushList and PopList in the thumb2 assembler. * Switches the assembler for the optimizing compiler to thumb2 rather than ARM. Change-Id: Iaafcd02243ccc5b03a054ef7a15285b84c06740f
2014-06-12Final CL to enable register allocation on x86.Nicolas Geoffray
This CL implements: 1) Resolution after allocation: connecting the locations allocated to an interval within a block and between blocks. 2) Handling of fixed registers: some instructions require inputs/output to be at a specific location, and the allocator needs to deal with them in a special way. 3) ParallelMoveResolver::EmitNativeCode for x86. Change-Id: I0da6bd7eb66877987148b87c3be6a983b4e3f858
2014-06-10Plug code generator into liveness analysis.Nicolas Geoffray
Also implement spill slot support. Change-Id: If5e28811e9fbbf3842a258772c633318a2f4fafc
2014-05-26Add a linear scan register allocator to the optimizing compiler.Nicolas Geoffray
This is a "by-the-book" implementation. It currently only deals with allocating registers, with no hint optimizations. The changes remaining to make it functional are: - Allocate spill slots. - Resolution and placements of Move instructions. - Connect it to the code generator. Change-Id: Ie0b2f6ba1b98da85425be721ce4afecd6b4012a4
2014-05-19Build live ranges in preparation for register allocation.Nicolas Geoffray
Change-Id: I7ae24afaa4e49276136bf34f4ba7d62db7f28c01
2014-05-14Add a compilation tracing mechanism to the new compiler.Nicolas Geoffray
Code mostly imported from: https://android-review.googlesource.com/#/c/81653/. Change-Id: I150fe942be0fb270e03fabb19032180f7a065d13
2014-05-13Add loop recognition and CFG simplifications in new compiler.Nicolas Geoffray
We do three simplifications: - Split critical edges, for code generation from SSA (new). - Ensure one back edge per loop, to simplify loop recognition (new). - Ensure only one pre header for a loop, to simplify SSA creation (existing). Change-Id: I9bfccd4b236a00486a261078627b091c8a68be33
2014-05-07Merge "Build live-in, live-out and kill sets for each block."Nicolas Geoffray
2014-05-07Build live-in, live-out and kill sets for each block.Nicolas Geoffray
This information will be used when computing live ranges of instructions. Change-Id: I345ee833c1ccb4a8e725c7976453f6d58d350d74
2014-05-06Give Compiler a back reference to the driver.Ian Rogers
The compiler driver is a single object delegating work to the compiler, rather than passing it through to every Compiler call make it a member of Compiler so that it maybe queried. This simplifies the Compiler API and makes the relationship to CompilerDriver more explicit. Remove reference arguments that contravene code style. Change-Id: Iba47f2e3cbda679a7ec7588f26188d77643aa2c6
2014-04-28Add a Transform to SSA phase to the optimizing compiler.Nicolas Geoffray
Change-Id: Ia9700756a0396d797a00b529896487d52c989329
2014-04-09Revert "Revert "Revert "Use trampolines for calls to helpers"""Dave Allison
This reverts commit f9487c039efb4112616d438593a2ab02792e0304. Change-Id: Id48a4aae4ecce73db468587967968a3f7618b700
2014-04-09Revert "Revert "Use trampolines for calls to helpers""Dave Allison
This reverts commit 081f73e888b3c246cf7635db37b7f1105cf1a2ff. Change-Id: Ibd777f8ce73cf8ed6c4cb81d50bf6437ac28cb61 Conflicts: compiler/dex/quick/mir_to_lir.h
2014-04-07Revert "Use trampolines for calls to helpers"Dave Allison
This reverts commit 754ddad084ccb610d0cf486f6131bdc69bae5bc6. Change-Id: Icd979adee1d8d781b40a5e75daf3719444cb72e8
2014-04-04Use trampolines for calls to helpersDave Allison
This is an ARM specific optimization to the compiler that uses trampoline islands to make calls to runtime helper functions. The intention is to reduce the size of the generated code (by 2 bytes per call) without affecting performance. By default this is on when generating an OAT file. It is off when compiling to memory. To switch this off in dex2oat, use the command line option: --no-helper-trampolines Enhances disassembler to print the trampoline entry on the BL instruction like this: 0xb6a850c0: f7ffff9e bl -196 (0xb6a85000) ; pTestSuspend Bug: 12607709 Change-Id: I9202bdb7cf21252ad807bd48701f1f6ce8e3d0fe
2014-03-31Add support for invoke-static in optimizing compiler.Nicolas Geoffray
Support is limited to calls without parameters and returning void. For simplicity, we currently follow the Quick ABI. Change-Id: I54805161141b7eac5959f1cae0dc138dd0b2e8a5
2014-03-19Run Java tests with the optimizing compiler.Nicolas Geoffray
Also fix a vector.reserve -> vector.resize braino, and build a GC map that dex2oat expects. Change-Id: I6acf2f90a4c32f90b79bf7709bf2e43931b98757
2014-03-18Plug new optimizing compiler in compilation pipeline.Nicolas Geoffray
Also rename accessors to ART's conventions. Change-Id: I344807055b98aa4b27215704ec362191464acecc
2014-03-13Add command line support for enabling the optimizing compiler.Nicolas Geoffray
Also run tests with the optimizing compiler enabled when the file art/USE_OPTIMIZING_COMPILER is present. Change-Id: Ibc33eed62a43547bc3b9fe786d014c0d81b5add8