summaryrefslogtreecommitdiff
path: root/compiler/optimizing/codegen_test.cc
Commit message (Collapse)AuthorAgeFilesLines
...
* Optimizing: Tag basic block allocations with their source.Vladimir Marko2015-09-031-3/+3
| | | | | | | | | | Replace GrowableArray with ArenaVector in HBasicBlock and, to track the source of allocations, assign one new and two Quick's arena allocation types to these vectors. Rename kArenaAllocSuccessor to kArenaAllocSuccessors. Bug: 23736311 Change-Id: I984aef6e615ae2380a532f5c6726af21015f43f5
* Revert "Introduce support for hardware simulators, starting with ARM64"Alex Light2015-08-181-184/+89
| | | | | | | | | | | This reverts commit c2e1a5edc438274159c6ef8e65455ac73723a8f1. This breaks the build for x86_64 targets. This is because on target the libvixl is not included as a library for the libart.so target build. The build of non-x86_64 targets only works because the compilers removes the dead-code that contains the libvixl symbols. Bug: 23321940 Change-Id: I39e93ff05b887665c47fb0986867f1d13ca65b9b
* Fix codegen_test.Roland Levillain2015-08-181-3/+10
| | | | | | Allow the execution of Thumb-2 code on ARM32 hardware. Change-Id: I2fec71e39d538249569ffa88435f3198e8c28c01
* Introduce support for hardware simulators, starting with ARM64Phil Wang2015-08-181-89/+177
| | | | | | | Simulator support for ARM64 is implemented with VIXL. Now codegen_test will also run on all supported hardware simulators. Change-Id: Idc740f566175d1a23c373ea9292b8fc5ba526d00
* Fix codegen_test after DCE fix.Nicolas Geoffray2015-06-241-1/+4
| | | | Change-Id: I16c64abc26c64815da4cb4034276d60e9bfb6996
* MIPS: Initial version of optimizing compiler for MIPS64R6.Alexey Frunze2015-06-191-0/+17
| | | | | | | Bug: 21555893 Change-Id: I874dc356eee6ab061a32f8f3df5f8ac3a4ab7dcf Signed-off-by: Alexey Frunze <Alexey.Frunze@imgtec.com> Signed-off-by: Douglas Leung <douglas.leung@imgtec.com>
* Add a parent environment to HEnvironment.Nicolas Geoffray2015-05-111-5/+5
| | | | | | | This code has no functionality change. It adds a placeholder for chaining inlined frames. Change-Id: I5ec57335af76ee406052345b947aad98a6a4423a
* Fix codegen_test for long multiplication.Nicolas Geoffray2015-04-201-30/+79
| | | | | | | | | | | | It seems like clang (that we use on the host) was *very* forgiving with this broken test: the code generated for for MulLong used ebx but this is a callee-save register in C but not ART. Also, the test was not properly written for handling longs, so it was taking unitialized stack entries. GCC on target is not as forgiving. Change-Id: I5d7a962f8a72b3ce407dce50ca50b4ffc690c99e
* Move the linear order to the HGraph.Nicolas Geoffray2015-04-151-1/+1
| | | | | | | | | Bug found by Zheng Xu: SsaLivenessAnalysis being a stack allocated object, we should not refer to it in later phases of the compiler. Specifically, the code generator was using the linear order, which was stored in the liveness analysis object. Change-Id: I574641f522b7b86fc43f3914166108efc72edb3b
* [optimizing] Implement x86/x86_64 math intrinsicsMark Mendell2015-04-011-4/+14
| | | | | | | | | | | | | | | | | | | Implement floor/ceil/round/RoundFloat on x86 and x86_64. Implement RoundDouble on x86_64. Add support for roundss and roundsd on both architectures. Support them in the disassembler as well. Add the instruction set features for x86, as the 'round' instruction is only supported if SSE4.1 is supported. Fix the tests to handle the addition of passing the instruction set features to x86 and x86_64. Add assembler tests for roundsd and roundss to x86_64 assembler tests. Change-Id: I9742d5930befb0bbc23f3d6c83ce0183ed9fe04f Signed-off-by: Mark Mendell <mark.p.mendell@intel.com>
* ART: Force constants into the entry blockDavid Brazdil2015-03-261-20/+12
| | | | | | | | | | | | | | | | | | Optimizations such as GVN and BCE make the assumption that all constants are located in the entry block of the CFG, but not all passes adhere to this rule. This patch makes constructors of constants private and only accessible to friend classes - HGraph for int/long constants and SsaBuilder for float/double - which ensure that they are placed correctly and not duplicated. Note that the ArenaAllocatorAdapter was modified to not increment the ArenaAllocator's internal reference counter in order to allow for use of ArenaSafeMap inside an arena-allocated objects. Because their destructor is not called, the counter does not get decremented. Change-Id: I36a4fa29ae34fb905cdefd482ccbf386cff14166
* ART: Fix crash in gtestsDavid Brazdil2015-03-241-0/+1
| | | | | | | SsaLivenessAnalysis was crashing after change of iteration order in 142377 because gtests do not always build reverse post order. Change-Id: If5ad5b7c52040b119c4415f0b942988049fa3c16
* Opt Compiler: ARM64: Enable explicit memory barriers over acquire/releaseSerban Constantinescu2015-03-021-4/+9
| | | | | | | | | | | | | | | | Implement remaining explicit memory barrier code paths and temporarily enable the use of explicit memory barriers for testing. This CL also enables the use of instruction set features in the ARM64 backend. kUseAcquireRelease has been replaced with PreferAcquireRelease(), which for now is statically set to false (prefer explicit memory barriers). Please note that we still prefer acquire-release for the ARM64 Optimizing Compiler, but we would like to exercise the explicit memory barrier code path too. Change-Id: I84e047ecd43b6fbefc5b82cf532e3f5c59076458 Signed-off-by: Serban Constantinescu <serban.constantinescu@arm.com>
* Create HGraph outside Builder, print timingsDavid Brazdil2015-02-041-6/+8
| | | | | | | | | This patch refactors the way HGraph objects are created, moving the instantiation out of the Builder class and creating the CodeGenerator earlier. The patch uses this to build a single interface for printing timings info and dumping the CFG. Change-Id: I2eb63eabf28e2d0f5cdc7affaa690c3a4b1bdd21
* Fix lint error and typo.Nicolas Geoffray2015-01-261-2/+2
| | | | Change-Id: Ie2787a4da5b2d76975664e64f443c081127b7cd9
* Fix codegen_test.Nicolas Geoffray2015-01-261-5/+30
| | | | | | | Native and ART do not have the same calling convention for ART, so we need to adjust blocked and allocated registers. Change-Id: I606b2620c0e5a54bd60d6100a137c06616ad40b4
* Add implicit null checks for the optimizing compilerCalin Juravle2015-01-161-8/+13
| | | | | | | | | - for backends: arm, arm64, x86, x86_64 - fixed parameter passing for CodeGenerator - 003-omnibus-opcodes test verifies that NullPointerExceptions work as expected Change-Id: I1b302acd353342504716c9169a80706cf3aba2c8
* ART: Fix leak in codegen_testAndreas Gampe2015-01-061-1/+3
| | | | | | Make sure the InstructionSetFeatures isn't leaked. Change-Id: Ide25773500c1513ecb204a380bb0a95513ff7276
* Look at instruction set features when generating volatiles codeCalin Juravle2015-01-051-2/+3
| | | | Change-Id: Ia882405719fdd60b63e4102af7e085f7cbe0bb2a
* Opt compiler: Add arm64 support for register allocation.Alexandre Rames2014-12-101-18/+7
| | | Change-Id: Idc6e84eee66170de4a9c0a5844c3da038c083aa7
* Instruction set features for ARM64, MIPS and X86.Ian Rogers2014-11-131-2/+2
| | | | | | | | | | | | | Also, refactor how feature strings are handled so they are additive or subtractive. Make MIPS have features for FPU 32-bit and MIPS v2. Use in the quick compiler rather than #ifdefs that wouldn't have worked in cross-compilation. Add SIMD features for x86/x86-64 proposed in: https://android-review.googlesource.com/#/c/112370/ Bug: 18056890 Change-Id: Ic88ff84a714926bd277beb74a430c5c7d5ed7666
* Revert "Revert "Add support for long-to-int in the optimizing compiler.""Roland Levillain2014-11-111-0/+21
| | | | | | This reverts commit 3adfd1b4fb20ac2b0217b5d2737bfe30ad90257a. Change-Id: Iacf0c6492d49267e24f1b727dbf6379b21fd02db
* Revert "Add support for long-to-int in the optimizing compiler."Roland Levillain2014-11-111-17/+0
| | | | | | This reverts commit 647b96f29cb81832e698f863884fdba06674c9de. Change-Id: I552f23585463c676acbd547521b4d3ee5c0342eb
* Fix lint error.Calin Juravle2014-11-111-4/+4
| | | | Change-Id: Ief9b9fe6982e7e76aae74d6c909bd9f4b3f82673
* Add support for long-to-int in the optimizing compiler.Roland Levillain2014-11-111-0/+17
| | | | | | | | | | | | - Add support for the long-to-int Dex instruction in the optimizing compiler. - Generate x86, x86-64 and ARM (but not ARM64) code for long-to-int HTypeConversion nodes. - Add related tests to test/422-type-conversion. - Also fix comments in test/415-optimizing-arith-neg and in test/416-optimizing-arith-not. Change-Id: I3084af30f2a495d178362ae1154dc7ceb7bf3a58
* Merge "[optimizing compiler] Add DIV_INT_2ADDR"Calin Juravle2014-11-061-0/+14
|\
| * [optimizing compiler] Add DIV_INT_2ADDRCalin Juravle2014-11-061-0/+14
| | | | | | | | Change-Id: I38fc7e216f820d8ccc8bbf8b8e7a67b75fb9de87
* | Add support for not-long on ARM64 in the optimizing compiler.Roland Levillain2014-11-061-12/+81
| | | | | | | | Change-Id: I3e98ff411ba358d92774def18a12daccdc4f558f
* | Fix failures after div support.Nicolas Geoffray2014-11-061-0/+4
|/ | | | | | | - We need to special case divide by -1 because of x86. - Disable div test on arm64, which does not support div yet. Change-Id: I07e137cb555a958b02a6c4070f296503b7e30bae
* [optimizing compiler] Add div-int and exception handling.Calin Juravle2014-11-061-0/+9
| | | | | | | | | | | | - 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
* ART: More warningsAndreas Gampe2014-11-041-9/+9
| | | | | | | Enable -Wno-conversion-null, -Wredundant-decls and -Wshadow in general, and -Wunused-but-set-parameter for GCC builds. Change-Id: I81bbdd762213444673c65d85edae594a523836e5
* Opt compiler: Add ARM64 support for the Mul IR.Alexandre Rames2014-10-291-8/+0
| | | | | | | | | | | Also disable compilation and use of the boot image with the optimizing compiler: this won't work with the way we're bringing up arm64 and we need to find a better solution. Bug: 18147756 Change-Id: I6ec0de73681f9226d095bc3db92338dbd46499aa
* ART: Add basic tests for materialized conditions.Alexandre Rames2014-10-231-0/+117
| | | | Change-Id: I4acef30cc6a48b5fe07d55db6b9cf0d093b326ee
* ART: optimizing compiler: initial support for ARM64.Alexandre Rames2014-10-231-0/+17
| | | | | | | | | | The ARM64 port uses VIXL for code generation, to which it defers work like label binding and branch resolving, register type coherency checking, and immediate values handling. Change-Id: I0a44508c0c991f472a63e67b3469cdd878fe1a68 Signed-off-by: Serban Constantinescu <serban.constantinescu@arm.com> Signed-off-by: Alexandre Rames <alexandre.rames@arm.com>
* Remove obsolete TODOs from codegen testsCalin Juravle2014-10-231-3/+1
| | | | | | The features are already exercised by the art test 411-optimizing-arith. Change-Id: Id008931e0ed8206ced11ecc85a80a7e4aef3e68e
* Implement int bit-wise not operation in the optimizing compiler.Roland Levillain2014-10-231-0/+25
| | | | | | | | | | | | | | | | | | - Add support for the not-int (integer one's complement negate) instruction in the optimizing compiler. - Extend the HNot control-flow graph node type and make it inherit from HUnaryOperation. - Generate ARM, x86 and x86-64 code for integer HNeg nodes. - Exercise these additions in the codegen_test gtest, as there is not direct way to assess the support of not-int from a Java source. Indeed, compiling a Java expression such as `~a' using javac and then dx generates an xor-int/lit8 Dex instruction instead of the expected not-int Dex instruction. This is probably because the Java bytecode has an `ixor' instruction, but there's not instruction directly corresponding to a bit-wise not operation. Change-Id: I223aed75c4dac5785e04d99da0d22e8d699aee2b
* Minor fix in codegen tests.Calin Juravle2014-10-221-1/+1
| | | | Change-Id: I9b843536353d4f820b969895d5f75ee9b679aff0
* Add multiplication for integral typesCalin Juravle2014-10-171-0/+45
| | | | | | | This also fixes an issue where we could allocate a pair register even if one of its parts was already blocked. Change-Id: I4869175933409add2a56f1ccfb369c3d3dd3cb01
* Fix code generation of materialized conditions.Nicolas Geoffray2014-10-091-10/+103
| | | | | | | | | | | | | Move the logic for knowing if a condition needs to be materialized in an optimization pass (so that the information does not change as a side effect of another optimization). Also clean-up arm and x86_64 codegen: - arm: ldr and str are for power-users when a constant is in play. We should use LoadFromOffset and StoreToOffset. - x86_64: fix misuses of movq instead of movl. Change-Id: I01a03b91803624be2281a344a13ad5efbf4f3ef3
* Revert "Revert "Implement suspend checks in new compiler.""Nicolas Geoffray2014-09-161-0/+2
| | | | | | This reverts commit 7e3652c45c30c1f2f840e6088e24e2db716eaea7. Change-Id: Ib489440c34e41cba9e9e297054f9274f6e81a2d8
* Fix builds on archs the compiler does not support.Nicolas Geoffray2014-09-111-2/+0
| | | | Change-Id: Ibfc47026596c868fb6d48465a6e564a0b1e07fd0
* Fix valgrind errors.Nicolas Geoffray2014-09-111-16/+18
| | | | | | | | For now just stack allocate the code generator. Will think about cleaning up the root problem later (CodeGenerator being an arena object). Change-Id: I161a6f61c5f27ea88851b446f3c1e12ee9c594d7
* Make unit test tell if a method is a leaf.Nicolas Geoffray2014-07-221-3/+5
| | | | | | | | The runtime is not initialized completely in gtests, so we cannot run code (such as explicit stack overflow checks) that look at tls values. Change-Id: I74a4449b01eb203f1b411dda700e9459878d0d55
* Use the thumb2 assembler for the optimizing compiler.Nicolas Geoffray2014-07-161-4/+11
| | | | Change-Id: I2b058f4433504dc3299c06f5cb0b5ab12f34aa82
* Re-enable tests with the optimizing compiler.Nicolas Geoffray2014-06-261-4/+0
| | | | | | | | | | | 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-0/+4
| | | | | | This reverts commit 20550910e608ed7d86db97927d2ce9d2191061a4. Change-Id: Ic28b719946c795378838a18162a2a2b2cf41a0e8
* Re-enable tests with the optimizing compiler.Nicolas Geoffray2014-06-251-4/+0
| | | | | | | | 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-1/+6
| | | | | | | | | | | | | | | 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
* Guard `Run` for platforms we're not compiling to, yet.Nicolas Geoffray2014-06-131-0/+2
| | | | Change-Id: I0dc210d2734e95714bed6c481a31fa4daabb9332
* Add x86_64 support to the optimizing compiler.Nicolas Geoffray2014-06-131-11/+19
| | | | Change-Id: I4462d9ae15be56c4a3dc1bd4d1c0c6548c1b94be