summaryrefslogtreecommitdiffstats
path: root/compiler/optimizing/nodes.h
Commit message (Collapse)AuthorAgeFilesLines
* Fix some bugs in graph construction/simplification methods.Nicolas Geoffray2014-06-091-13/+31
| | | | | | | | Also fix a brano during SSA construction. The code should not have been commented out. Added a test to cover what the code intends. Change-Id: Ia00ae79dcf75eb0d412f07649d73e7f94dbfb6f0
* Add a linear scan register allocator to the optimizing compiler.Nicolas Geoffray2014-05-261-17/+19
| | | | | | | | | | | | 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
* Import Dart's parallel move resolver.Nicolas Geoffray2014-05-231-0/+85
| | | | | | | | | | And write a few tests while at it. A parallel move resolver will be needed for performing multiple moves that are conceptually parallel, for example moves at a block exit that branches to a block with phi nodes. Change-Id: Ib95b247b4fc3f2c2fcab3b8c8d032abbd6104cd7
* Build live ranges in preparation for register allocation.Nicolas Geoffray2014-05-191-2/+43
| | | | Change-Id: I7ae24afaa4e49276136bf34f4ba7d62db7f28c01
* Linearize the graph before creating live ranges.Nicolas Geoffray2014-05-161-1/+1
| | | | Change-Id: I02eb5671e3304ab062286131745c1366448aff58
* Add a compilation tracing mechanism to the new compiler.Nicolas Geoffray2014-05-141-3/+14
| | | | | | 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-30/+110
| | | | | | | | | 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
* Build live-in, live-out and kill sets for each block.Nicolas Geoffray2014-05-071-9/+85
| | | | | | | This information will be used when computing live ranges of instructions. Change-Id: I345ee833c1ccb4a8e725c7976453f6d58d350d74
* Add a Transform to SSA phase to the optimizing compiler.Nicolas Geoffray2014-04-281-31/+192
| | | | Change-Id: Ia9700756a0396d797a00b529896487d52c989329
* Simplify HInvokeStatic code generation.Nicolas Geoffray2014-04-171-19/+0
| | | | | | | | | | | HPushArgument is not needed for now (but might be when we start optimizing). Also, calling convention for 64bits backend will require to know more about the argument than the argument's index. Therefore currently let HInvokeStatic setup the arguments, which is possible because arguments of a calls are virtual registers and not instructions. Change-Id: I8753ed6083aa083c5180ab53b436dc8de4f1fe31
* Long support in optimizing compiler.Nicolas Geoffray2014-04-161-4/+49
| | | | | | | | | - 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
* Test control flow instruction with optimizing compiler.Nicolas Geoffray2014-04-081-0/+13
| | | | | | Add support for basic instructions to implement these tests. Change-Id: I3870bf9301599043b3511522bb49dc6364c9b4c0
* Add support for taking parameters in optimizing compiler.Nicolas Geoffray2014-04-071-1/+59
| | | | | | | - Fix stack layout to mimic Quick's. - Implement some sub operations. Change-Id: I8cf75a4d29b662381a64f02c0bc61d859482fc4e
* Add support for new-instance and invoke-direct.Nicolas Geoffray2014-04-041-5/+22
| | | | Change-Id: I2daed646904f7711972a7da15d88be7573426932
* Support passing arguments to invoke-static* instructions.Nicolas Geoffray2014-04-031-3/+41
| | | | | | | | | - Stop using the frame pointer for accessing locals. - Stop emulating a stack when doing code generation. Instead, rely on dex register model, where instructions only reference registers. Change-Id: Id51bd7d33ac430cb87a53c9f4b0c864eeb1006f9
* Add support for adding two integers in optimizing compiler.Nicolas Geoffray2014-03-311-5/+41
| | | | Change-Id: I5524e193cd07f2692a57c6b4f8069904471b2928
* Add support for invoke-static in optimizing compiler.Nicolas Geoffray2014-03-311-0/+37
| | | | | | | Support is limited to calls without parameters and returning void. For simplicity, we currently follow the Quick ABI. Change-Id: I54805161141b7eac5959f1cae0dc138dd0b2e8a5
* Plug new optimizing compiler in compilation pipeline.Nicolas Geoffray2014-03-181-46/+46
| | | | | | Also rename accessors to ART's conventions. Change-Id: I344807055b98aa4b27215704ec362191464acecc
* More code generation for the optimizing compiler.Nicolas Geoffray2014-03-131-3/+59
| | | | | | | | | - Add HReturn instruction - Generate code for locals/if/return - Setup infrastructure for register allocation. Currently emulate a stack. Change-Id: Ib28c2dba80f6c526177ed9a7b09c0689ac8122fb
* Add register support to the optimizing compiler.Nicolas Geoffray2014-03-101-11/+170
| | | | | | Also make if take an input and build the use list for instructions. Change-Id: I1938cee7dce5bd4c66b259fa2b431d2c79b3cf82
* Add codegen support to the optimizing compiler.Nicolas Geoffray2014-03-041-3/+21
| | | | Change-Id: I9aae76908ff1d6e64fb71a6718fc1426b67a5c28
* Move arena_bit_vector.h/cc to compiler/utils.Nicolas Geoffray2014-02-261-1/+1
| | | | | | | Also move MIR's BasicBlock related code from arena_bit_vector.h to bit_vector_block_iterator.cc. Change-Id: I85c224b387d31cf57a1ef1f1a36eaadf22f1c85d
* Add conditional branches, and build dominator tree.Nicolas Geoffray2014-02-261-10/+86
| | | | Change-Id: I4b151a07b72692961235a1419b54b6b45cf54e63
* Re-apply: Initial check-in of an optimizing compiler.Nicolas Geoffray2014-02-191-0/+276
| | | | | | | | | 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
* Revert "Initial check-in of an optimizing compiler."Nicolas Geoffray2014-02-191-274/+0
| | | | | | | | g++ warnings turned into errors. This reverts commit 68a5fefa90f03fdf5a238ac85c9439c6b03eae96. Change-Id: I09bb95d9cc13764ca8a266c41af04801a34b9fd0
* Initial check-in of an optimizing compiler.Nicolas Geoffray2014-02-191-0/+274
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