summaryrefslogtreecommitdiff
path: root/compiler/optimizing/builder.h
AgeCommit message (Collapse)Author
2014-12-04Merge "ART: Add PackedSwitch support to the optimizing compiler" Andreas Gampe
2014-12-04ART: Add PackedSwitch support to the optimizing compiler Andreas Gampe
Add simple packed-switch support through chained IFs. Now enables compiled versions of 015-switch and 095-switch-MAX_INT. Change-Id: I17cc8d659d1dd2d64227851c23998c04367e8cf5
2014-12-04Add support for float-to-long in the optimizing compiler. Roland Levillain
- Add support for the float-to-long Dex instruction in the optimizing compiler. - Add a Dex PC field to art::HTypeConversion to allow the x86 and ARM code generators to produce runtime calls. - Instruct art::CodeGenerator::RecordPcInfo not to record PC information for HTypeConversion instructions. - Add S0 to the list of ARM FPU parameter registers. - Have art::x86_64::X86_64Assembler::cvttss2si work with 64-bit operands. - Generate x86, x86-64 and ARM (but not ARM64) code for float to long HTypeConversion nodes. - Add related tests to test/422-type-conversion. Change-Id: I954214f0d537187883f83f7a83a1bb2dd8a21fd4
2014-12-02Add some heursitics for compiling, close to Quick's. Nicolas Geoffray
Quick has more machinery to give up/not give up, but we can backport them later. Change-Id: I5eb62c664246f4ce46f0400cf24ec34a72afb51e
2014-11-27[optimizing compiler] Add CMP{L,G}_{FLOAT,DOUBLE} Calin Juravle
Adds: - float comparison for arm, x86, x86_64 backends. - ucomis{s,d} assembly to x86 and x86_64. - vmstat assebmly for thumb2 - new assembly tests Change-Id: Ie3e19d0c08b3b875cd0a4be4ee4e9c8a4a076290
2014-11-26Revert "[optimizing compiler] Add CMP{L,G}_{FLOAT,DOUBLE}" Calin Juravle
Fails on arm due to missing vmrs op after vcmp. I revert this instead of pushing the fix because I don't understand yet why it compiles with run-test but not with dex2oat. This reverts commit fd861249f31ab360c12dd1ffb131d50f02b0bfc6. Change-Id: Idc2d30f6a0f39ddd3596aa18a532ae90f8aaf62f
2014-11-26[optimizing compiler] Add CMP{L,G}_{FLOAT,DOUBLE} Calin Juravle
- adds float comparison for arm, x86, x86_64 backends. - adds ucomis{s,d} assembly to x86 and x86_64. Change-Id: I232d2b6e9ecf373beb5cc63698dd97a658ff9c83
2014-11-26Revert "[optimizing compiler] Add CMP{L,G}_{FLOAT,DOUBLE}" Nicolas Geoffray
Fails on x86_64 and target. This reverts commit cea28ec4b9e94ec942899acf1dbf20f8999b36b4. Change-Id: I30c1d188c7ecfe765f137a307022ede84f15482c
2014-11-26[optimizing compiler] Add CMP{L,G}_{FLOAT,DOUBLE} Calin Juravle
- adds float comparison for arm, x86, x86_64 backends. - adds ucomis{s,d} assembly to x86 and x86_64. Change-Id: Ie91e04bfb402025073054f3803a3a569e4705caa
2014-11-24[optimizing compiler] Add shifts Calin Juravle
Added SHL, SHR, USHR for arm, x86, x86_64. Change-Id: I971f594e270179457e6958acf1401ff7630df07e
2014-11-17[optimizing compiler] Add REM_INT, REM_LONG Calin Juravle
- for arm, x86, x86_64 - minor cleanup/fix in div tests Change-Id: I240874010206a5a9b3aaffbc81a885b94c248f93
2014-11-13[optimizing compiler] Rename dex_offset to dex_pc in the builder Calin Juravle
The term dex offset comes from Dalvik where these were addresses in memory. Currently these should be dex PCs, namely offsets from the start of code items. Quick lacks this clean up but there's no need to bring over the convention to optimizing. (thanks to irogers for the commit message text) Change-Id: If86c0cf021a06f04a21462053e9d5f31bba7f65d
2014-11-12[optimizing compiler] Add DIV_LONG Calin Juravle
- for backends: arm, x86, x86_64 - added cqo, idivq, testq assembly for x64_64 - small cleanups Change-Id: I762ef37880749038ed25d6014370be9a61795200
2014-11-12Implement checkcast for optimizing. Nicolas Geoffray
- Ended up not using HTypeCheck because of how instanceof and checkcast end up having different logic for code generation. - Fix a x86_64 assembler bug triggered by now enabling more methods to be compiled. Difficult to test today without b/18117217. Change-Id: I3022e7ae03befb1d10bea9637ad21fadc430abe0
2014-11-07Support floats and doubles in fields. Nicolas Geoffray
Change-Id: I19832106633405403f0461b3fe13b268abe39db3
2014-11-06Fixed BuildCheckedDiv signature Calin Juravle
The second_reg might actually be a constant. Change-Id: I08cecc41e3d65ab73b41eba2aca702dea8e1ed95
2014-11-06[optimizing compiler] Add DIV_INT_2ADDR Calin Juravle
Change-Id: I38fc7e216f820d8ccc8bbf8b8e7a67b75fb9de87
2014-11-06[optimizing compiler] Add div-int and exception handling. Calin Juravle
- for backends: arm, x86, x86_64 - fixed a register allocator bug: the request for a fixed register for the first input was ignored if the output was kSameAsFirstInput - added divide by zero exception - more tests - shuffle around some code in the builder to reduce the number of lines of code for a single function. Change-Id: Id3a515e02bfbc66cd9d16cb9746f7551bdab3d42
2014-11-05Support int-to-long conversions in the optimizing compiler. Roland Levillain
- Add support for the int-to-float Dex instruction in the optimizing compiler. - Add a HTypeConversion node type for control-flow graphs. - Generate x86, x86-64 and ARM (but not ARM64) code for int-to-float HTypeConversion nodes. - Add a 64-bit "Move doubleword to quadword with sign-extension" (MOVSXD) instruction to the x86-64 assembler. - Add related tests to test/422-type-conversion. Change-Id: Ieb8ec5380f9c411857119c79aa8d0728fd10f780
2014-10-29Add support for static fields in optimizing compiler. Nicolas Geoffray
Change-Id: Id2f010589e2bd6faf42c05bb33abf6816ebe9fa9
2014-10-23Fix wrong unsigned to signed conversions. Nicolas Geoffray
The HIntConstant node takes an int32_t, so we have to keep things signed. Change-Id: Ib3fa50e87f99118d320cbb381f619d5be9287530
2014-10-22Implement array creation related DEX instructions. Nicolas Geoffray
Implement new-array, filled-new-array, and fill-array-data. Change-Id: I405560d66777a57d881e384265322617ac5d3ce3
2014-10-21Implement int negate instruction in the optimizing compiler. Roland Levillain
- Add support for the neg-int (integer two's complement negate) instruction in the optimizing compiler. - Add a HNeg node type for control-flow graphs and an intermediate HUnaryOperation base class. - Generate ARM, x86 and x86-64 code for integer HNeg nodes. Change-Id: I72fd3e1e5311a75c38a8cb665a9211a20325a42e
2014-10-09Tidy ELF builder. Ian Rogers
Don't do "if (ptr)". Use const. Use DISALLOW_COPY_AND_ASSIGN. Avoid public member variables. Move ValueObject to base and use in ELF builder. Tidy VectorOutputStream to not use non-const reference arguments. Change-Id: I2c727c3fc61769c3726de7cfb68b2d6eb4477e53
2014-10-07Add support for floats and doubles. Nicolas Geoffray
- Follows Quick conventions. - Currently only works with baseline register allocator. Change-Id: Ie4b8e298f4f5e1cd82364da83e4344d4fc3621a3
2014-09-16Revert "Revert "Implement suspend checks in new compiler."" Nicolas Geoffray
This reverts commit 7e3652c45c30c1f2f840e6088e24e2db716eaea7. Change-Id: Ib489440c34e41cba9e9e297054f9274f6e81a2d8
2014-09-15Revert "Implement suspend checks in new compiler." Nicolas Geoffray
This reverts commit 6fbce029fba3ed5da6c36017754ed408e6bcb632. Change-Id: Ia915c27873b021e658a10212e559095dfc91284e
2014-09-15Implement suspend checks in new compiler. Nicolas Geoffray
For simplicity, they are currently placed on all (dex-level) back edges, and at method entry. Change-Id: I6e833e244d559dd788c69727e22fe40aff5b3435
2014-07-28Implement array get and array put in optimizing. Nicolas Geoffray
Also fix a couple of assembler/disassembler issues. Change-Id: I705c8572988c1a9c4df3172b304678529636d5f6
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-02Support longs in the register allocator for x86_64. Nicolas Geoffray
Change-Id: I7fb6dfb761bc5cf9e5705682032855a0a70ca867
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-04-16Long support in optimizing compiler. Nicolas Geoffray
- Add stack locations to the Location class. - Change logic of parameter passing/setup by setting the location of such instructions the ones for the calling convention. Change-Id: I4730ad58732813dcb9c238f44f55dfc0baa18799
2014-04-08Test control flow instruction with optimizing compiler. Nicolas Geoffray
Add support for basic instructions to implement these tests. Change-Id: I3870bf9301599043b3511522bb49dc6364c9b4c0
2014-04-07Add support for taking parameters in optimizing compiler. Nicolas Geoffray
- Fix stack layout to mimic Quick's. - Implement some sub operations. Change-Id: I8cf75a4d29b662381a64f02c0bc61d859482fc4e
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-13More code generation for the optimizing compiler. Nicolas Geoffray
- Add HReturn instruction - Generate code for locals/if/return - Setup infrastructure for register allocation. Currently emulate a stack. Change-Id: Ib28c2dba80f6c526177ed9a7b09c0689ac8122fb
2014-03-10Add register support to the optimizing compiler. Nicolas Geoffray
Also make if take an input and build the use list for instructions. Change-Id: I1938cee7dce5bd4c66b259fa2b431d2c79b3cf82
2014-02-26Add conditional branches, and build dominator tree. Nicolas Geoffray
Change-Id: I4b151a07b72692961235a1419b54b6b45cf54e63
2014-02-19Re-apply: Initial check-in of an optimizing compiler. Nicolas Geoffray
The classes and the names are very much inspired by V8/Dart. It currently only supports the RETURN_VOID dex instruction, and there is a pretty printer to check if the building of the graph is correct. Change-Id: I28e125dfee86ae6ec9b3fec6aa1859523b92a893
2014-02-19Revert "Initial check-in of an optimizing compiler." Nicolas Geoffray
g++ warnings turned into errors. This reverts commit 68a5fefa90f03fdf5a238ac85c9439c6b03eae96. Change-Id: I09bb95d9cc13764ca8a266c41af04801a34b9fd0
2014-02-19Initial check-in of an optimizing compiler. Nicolas Geoffray
The classes and the names are very much inspired by V8/Dart. It currently only supports the RETURN_VOID dex instruction, and there is a pretty printer to check if the building of the graph is correct. Change-Id: Id5ef1b317ab997010d4e3888e456c26bef1ab9c0