summaryrefslogtreecommitdiff
path: root/compiler/optimizing/optimizing_compiler.cc
Commit message (Collapse)AuthorAgeFilesLines
...
* First optimization in new compiler: simple GVN.Nicolas Geoffray2014-09-191-0/+6
| | | | Change-Id: Ibe0efa4e84fd020a53ded310a92e0b4363f91b12
* It can be that no method has been compiled.Nicolas Geoffray2014-09-181-5/+9
| | | | | | Therefore do not divide by 0, but log it. Change-Id: Iee7760ab7f31c73e90d62387e5fb6fb7aa2c56e2
* Add the "time" compilation filter and output compilation stats.Nicolas Geoffray2014-09-171-4/+31
| | | | | | | A "time" compiler filter means the compiler optimizes for compile time. Change-Id: Id1a207ceb2d95f3548aae5e45d51b80695da2029
* Runtime support for the new stack maps for the opt compiler.Nicolas Geoffray2014-09-081-22/+41
| | | | | | | Now most of the methods supported by the compiler can be optimized, instead of using the baseline. Change-Id: I80ab36a34913fa4e7dd576c7bf55af63594dc1fa
* ART: Clean up compilerAndreas Gampe2014-08-221-2/+118
| | | | | | | Clean up the compiler: less extern functions, dis-entangle compilers, hide some compiler specifics, lower global includes. Change-Id: Ibaf88d02505d86994d7845cf0075be5041cc8438
* ART source line debug info in OAT filesYevgeny Rouban2014-08-151-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Use the thumb2 assembler for the optimizing compiler.Nicolas Geoffray2014-07-161-4/+5
| | | | Change-Id: I2b058f4433504dc3299c06f5cb0b5ab12f34aa82
* Add two phi pruning phases.Nicolas Geoffray2014-07-141-1/+5
| | | | Change-Id: Ic4f05e3df96970d78a6938b27cdf9b58ef3849b9
* Support fields in optimizing compiler.Nicolas Geoffray2014-07-141-1/+1
| | | | | | | | - 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
* Do not attempt to compile on architectures we do not support.Nicolas Geoffray2014-07-041-5/+11
| | | | Change-Id: I431edff0a753a7fa37c79bdf7ab918d6747667a4
* Re-enable tests with the optimizing compiler.Nicolas Geoffray2014-06-261-0/+4
| | | | | | | | | | | 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
* Revert "Re-enable tests with the optimizing compiler."Nicolas Geoffray2014-06-251-4/+0
| | | | | | This reverts commit 20550910e608ed7d86db97927d2ce9d2191061a4. Change-Id: Ic28b719946c795378838a18162a2a2b2cf41a0e8
* Re-enable tests with the optimizing compiler.Nicolas Geoffray2014-06-251-0/+4
| | | | | | | | 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
* Add some more instruction support to optimizing compiler.Dave Allison2014-06-241-4/+0
| | | | | | | | | | | | | | | 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
* Final CL to enable register allocation on x86.Nicolas Geoffray2014-06-121-14/+32
| | | | | | | | | | | | 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
* Plug code generator into liveness analysis.Nicolas Geoffray2014-06-101-1/+1
| | | | | | Also implement spill slot support. Change-Id: If5e28811e9fbbf3842a258772c633318a2f4fafc
* Add a linear scan register allocator to the optimizing compiler.Nicolas Geoffray2014-05-261-3/+10
| | | | | | | | | | | | 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
* Build live ranges in preparation for register allocation.Nicolas Geoffray2014-05-191-0/+1
| | | | Change-Id: I7ae24afaa4e49276136bf34f4ba7d62db7f28c01
* Add a compilation tracing mechanism to the new compiler.Nicolas Geoffray2014-05-141-0/+23
| | | | | | Code mostly imported from: https://android-review.googlesource.com/#/c/81653/. Change-Id: I150fe942be0fb270e03fabb19032180f7a065d13
* Add loop recognition and CFG simplifications in new compiler.Nicolas Geoffray2014-05-131-0/+1
| | | | | | | | | 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
* Merge "Build live-in, live-out and kill sets for each block."Nicolas Geoffray2014-05-071-0/+2
|\
| * Build live-in, live-out and kill sets for each block.Nicolas Geoffray2014-05-071-0/+2
| | | | | | | | | | | | | | This information will be used when computing live ranges of instructions. Change-Id: I345ee833c1ccb4a8e725c7976453f6d58d350d74
* | Give Compiler a back reference to the driver.Ian Rogers2014-05-061-5/+5
|/ | | | | | | | | | 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
* Add a Transform to SSA phase to the optimizing compiler.Nicolas Geoffray2014-04-281-0/+4
| | | | Change-Id: Ia9700756a0396d797a00b529896487d52c989329
* Revert "Revert "Revert "Use trampolines for calls to helpers"""Dave Allison2014-04-091-1/+0
| | | | | | This reverts commit f9487c039efb4112616d438593a2ab02792e0304. Change-Id: Id48a4aae4ecce73db468587967968a3f7618b700
* Revert "Revert "Use trampolines for calls to helpers""Dave Allison2014-04-091-0/+1
| | | | | | | | | This reverts commit 081f73e888b3c246cf7635db37b7f1105cf1a2ff. Change-Id: Ibd777f8ce73cf8ed6c4cb81d50bf6437ac28cb61 Conflicts: compiler/dex/quick/mir_to_lir.h
* Revert "Use trampolines for calls to helpers"Dave Allison2014-04-071-1/+0
| | | | | | This reverts commit 754ddad084ccb610d0cf486f6131bdc69bae5bc6. Change-Id: Icd979adee1d8d781b40a5e75daf3719444cb72e8
* Use trampolines for calls to helpersDave Allison2014-04-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | 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
* Add support for invoke-static in optimizing compiler.Nicolas Geoffray2014-03-311-2/+16
| | | | | | | Support is limited to calls without parameters and returning void. For simplicity, we currently follow the Quick ABI. Change-Id: I54805161141b7eac5959f1cae0dc138dd0b2e8a5
* Run Java tests with the optimizing compiler.Nicolas Geoffray2014-03-191-4/+9
| | | | | | | Also fix a vector.reserve -> vector.resize braino, and build a GC map that dex2oat expects. Change-Id: I6acf2f90a4c32f90b79bf7709bf2e43931b98757
* Plug new optimizing compiler in compilation pipeline.Nicolas Geoffray2014-03-181-1/+65
| | | | | | Also rename accessors to ART's conventions. Change-Id: I344807055b98aa4b27215704ec362191464acecc
* Add command line support for enabling the optimizing compiler.Nicolas Geoffray2014-03-131-0/+32
Also run tests with the optimizing compiler enabled when the file art/USE_OPTIMIZING_COMPILER is present. Change-Id: Ibc33eed62a43547bc3b9fe786d014c0d81b5add8