summaryrefslogtreecommitdiff
path: root/compiler/optimizing/graph_visualizer.cc
Commit message (Collapse)AuthorAgeFilesLines
...
* Verifier: check an aput, even if we know it will fail.Nicolas Geoffray2015-06-191-2/+6
| | | | | bug:21867457 Change-Id: I01e333d858995d0e1e083a50cf8d460a86381f2c
* Fix bug in optimizing around instanceof.Nicolas Geoffray2015-06-171-0/+19
| | | | | | | | We were too aggressive when removing instanceof. We should not remove it when there is one of the two static types that is an interface. Change-Id: I1fd80915b99b094f7b4393e7adb2b160201b30d5
* Support for inlining methods that call/throw.Nicolas Geoffray2015-05-291-0/+7
| | | | | | Mostly fixes here and there to make it working. Change-Id: I1b535e895105d78b65634636d675b818551f783e
* Add tests for InstanceOf's and CheckCast's MustDoNullCheckGuillaume "Vermeille" Sanchez2015-05-201-0/+10
| | | | Change-Id: I6a2b9293d91d27193625f5c61b0b64733a0c0d82
* Remove unnecessary clinit checksCalin Juravle2015-05-201-0/+5
| | | | | Bug: 20852802 Change-Id: Ia6db8017ac22d45456845704a69ddffcc6917f4e
* Merge "Revert "Add test for Change-Id: ↵Calin Juravle2015-05-201-10/+0
|\ | | | | | | Ied0412a01922b40a3f5d89bed49707498582abc1""
| * Revert "Add test for Change-Id: Ied0412a01922b40a3f5d89bed49707498582abc1"Calin Juravle2015-05-201-10/+0
| | | | | | | | | | | | | | | | This reverts commit 0f675d8d70934762a5ed70f0734bd19eecfe9680. The test name is too long... Change-Id: I4496501e73dcf6424e9c58b331e3d3b241aa7917
* | Merge "Add test for Change-Id: Ied0412a01922b40a3f5d89bed49707498582abc1"Calin Juravle2015-05-201-0/+10
|\|
| * Add test for Change-Id: Ied0412a01922b40a3f5d89bed49707498582abc1Guillaume "Vermeille" Sanchez2015-05-201-0/+10
| | | | | | | | Change-Id: I3e9cbd0f5ba55f9044ddc7c7bec67b5193b90e75
* | ART: Mark constructor 'explicit'David Brazdil2015-05-181-1/+1
| | | | | | | | | | | | Fixes a cpp-lint error. Change-Id: Ibd2c84a6f171a5ddb9aa1a3b9e23c1e5a30537f0
* | ART: Revert change to LiveRange::DumpDavid Brazdil2015-05-181-4/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | Changes back the LiveRange printing format to "[start,end)" for better clarity. However, it removes the space after comma due to b/1189305 and prints the "ranges" attribute with curly brackets to improve readability. This is a resubmission of CL Ic83025fa78d6f1edb5e0e39d66160182b0198ab8 which fixes a compilation issue on target. Bug: 21189305 Change-Id: Ic232c02ba19a710ead67793a039f99c0345353c7
* | Revert "ART: Revert change to LiveRange::Dump"David Brazdil2015-05-181-16/+4
| | | | | | | | | | | | | | | | This reverts commit 294a0509cf811061b8009ade61e76a1f94e248b2. Need to investigate a compilation error. Change-Id: I62020f6e546c9faf5f4a2ed6cc1f7e1499c2fa30
* | ART: Revert change to LiveRange::DumpDavid Brazdil2015-05-181-4/+16
| | | | | | | | | | | | | | | | | | | | Changes back the LiveRange printing format to "[start,end)" for better clarity. However, it removes the space after comma due to b/1189305 and prints the "ranges" attribute with curly brackets to improve readability. Bug: 21189305 Change-Id: Ic83025fa78d6f1edb5e0e39d66160182b0198ab8
* | ART: Print C1vis lists as [v1,...,vN]David Brazdil2015-05-151-2/+2
|/ | | | | | | | | | | | | | | | | | | | | | Checker interprets whitespace as a don't-care placeholder, making it easier to write assertions which test only parts of the output (e.g. "//CHECK: Add liveness:44" does not test the inputs or any other attributes apart from "liveness"). However, since the GraphVisualizer prints lists with elements separated by spaces ("[ v1 ... vN ]"), this allows for false positives caused by an occurrence elsewhere in the output. For example, the assertion: "//CHECK: [ x y ]" will match "[ x y ]" but also "[ x a y b ]" or even "[ x ] abc [ y ]". Switching to comma-separated lists works around this issue. This patch updates all test files, fixes one false positive that this change revealed (test 442, line 337) and two occurrences of a wrong match (test 462, lines 121, 149). Bug: 21189305 Change-Id: I3b22503be3d92529dac0b13f66bccbcfabea6721
* ART: Fix a minor lint errorDavid Brazdil2015-05-151-2/+1
| | | | Change-Id: I956656fa4c36f20d80ef885c03487970f707be8e
* ART: Refactor GraphVisualizer attribute printingDavid Brazdil2015-05-151-60/+117
| | | | | | | This patch unifies the way GraphVisualizer prints instruction attributes in preparation of changes to the Checker syntax. Change-Id: I44e91e36c660985ddfe039a9f410fedc48b496ec
* ART: Rediscover loops after deleting blocks in DCEDavid Brazdil2015-05-121-1/+3
| | | | | | | | The way DCE currently updates loop information does not cover all cases. This patch removes the logic, resets loop information of live blocks to pre-SSA state and reanalyzes the affected loops. Change-Id: I0b996a70235b95a8db0de9a23a03f71db57a21b8
* Add a parent environment to HEnvironment.Nicolas Geoffray2015-05-111-9/+14
| | | | | | | This code has no functionality change. It adds a placeholder for chaining inlined frames. Change-Id: I5ec57335af76ee406052345b947aad98a6a4423a
* [optimizing] Add memory barriers in constructors when neededCalin Juravle2015-04-201-0/+4
| | | | | | | | | If a class has final fields we must add a memory barrier before returning from constructor. This makes sure the fields are visible to other threads. Bug: 19851497 Change-Id: If8c485092fc512efb9636cd568cb0543fb27688e
* ART: Print C1vis header only if visualizer enabledDavid Brazdil2015-04-071-6/+4
| | | | | | | Setting kStringFilter currently suppresses graph dumps of non-matching methods but their headers are still printed. This fixes the issue. Change-Id: Ib33fb20fcca2bf409534a824e7f76f1feb85724d
* [optimizing] Implement X86 intrinsic supportMark Mendell2015-03-261-0/+2
| | | | | | | | | | | Implement the supported intrinsics for X86. Enhance the graph visualizer to print <U> for unallocated locations, to allow calling the graph dumper from within register allocation for debugging purposes. Change-Id: I3b0319eb70a9a4ea228f67065b4c52d13a1ae775 Signed-off-by: Mark Mendell <mark.p.mendell@intel.com>
* ART: Add -WunusedAndreas Gampe2015-02-241-3/+9
| | | | | | | Until the global CFLAGS are fixed, add Wunused. Fix declarations in the optimizing compiler. Change-Id: Ic4553f08e809dc54f3d82af57ac592622c98e000
* Ensure the graph is correctly typed.Nicolas Geoffray2015-02-191-0/+4
| | | | | | | | | | We used to be forgiving because of HIntConstant(0) also being used for null. We now create a special HNullConstant for such uses. Also, we need to run the dead phi elimination twice during ssa building to ensure the correctness. Change-Id: If479efa3680d3358800aebb1cca692fa2d94f6e5
* ART: Dump environment to cfg file.Zheng Xu2015-02-041-0/+13
| | | | | | | Environment shows additional dependency and instructions with environment should usually be a safepoint as well. Change-Id: I04606624e6ea212ab1dc7502cdb87b5d5d0e3ac2
* Create HGraph outside Builder, print timingsDavid Brazdil2015-02-041-9/+7
| | | | | | | | | 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
* Implement LICM in optimizing compiler.Nicolas Geoffray2015-01-301-0/+9
| | | | Change-Id: I9c8afb0a58ef45e568576015473cbfd5f011c242
* ART: Further refactor use listsDavid Brazdil2015-01-271-3/+9
| | | | Change-Id: I9e3219575a508ca5141d851bfcaf848302480c32
* Optimizing: Speed up HEnvironment use removalDavid Brazdil2015-01-261-1/+1
| | | | | | | | | | Removal of use records from HEnvironment vregs involved iterating over potentially large linked lists which made compilation of huge methods very slow. This patch turns use lists into doubly-linked lists, stores pointers to the relevant nodes inside HEnvironment and subsequently turns the removals into constant-time operations. Change-Id: I0e1d4d782fd624e7b8075af75d4adf0a0634a1ee
* Merge "ART: Replace NULL to nullptr in the optimizing compiler"Roland Levillain2015-01-211-1/+1
|\
| * ART: Replace NULL to nullptr in the optimizing compilerJean Christophe Beyler2015-01-211-1/+1
| | | | | | | | | | | | | | Replace macro NULL to the nullptr variation for C++. Change-Id: Ib6e48dd4bb3c254343383011b67372622578ca76 Signed-off-by: Jean Christophe Beyler <jean.christophe.beyler@intel.com>
* | Revert "Revert "Fully support pairs in the register allocator.""Nicolas Geoffray2015-01-211-0/+4
| | | | | | | | | | | | This reverts commit c399fdc442db82dfda66e6c25518872ab0f1d24f. Change-Id: I19f8215c4b98f2f0827e04bf7806c3ca439794e5
* | Revert "Fully support pairs in the register allocator."Nicolas Geoffray2015-01-211-4/+0
| | | | | | | | | | | | | | | | Libcore tests fail. This reverts commit 41aedbb684ccef76ff8373f39aba606ce4cb3194. Change-Id: I2572f120d4bbaeb7a4d4cbfd47ab00c9ea39ac6c
* | Fully support pairs in the register allocator.Nicolas Geoffray2015-01-211-0/+4
| | | | | | | | | | | | Enabled on ARM for longs and doubles. Change-Id: Id8792d08bd7ca9fb049c5db8a40ae694bafc2d8b
* | Merge "ART: Fixed formatting in HGraphVisualizerPrinter"David Brazdil2015-01-081-4/+4
|\ \
| * | ART: Fixed formatting in HGraphVisualizerPrinterDavid Brazdil2015-01-081-4/+4
| | | | | | | | | | | | Change-Id: I06d9bb0fc03e13cfc49f2b4da07a0ee2d09a339a
* | | Implement double and float support for arm in register allocator.Nicolas Geoffray2015-01-081-4/+11
|/ / | | | | | | | | | | | | | | | | | | | | | | The basic approach is: - An instruction that needs two registers gets two intervals. - When allocating the low part, we also allocate the high part. - When splitting a low (or high) interval, we also split the high (or low) equivalent. - Allocation follows the (S/D register) requirement that low registers are always even and the high equivalent is low + 1. Change-Id: I06a5148e05a2ffc7e7555d08e871ed007b4c2797
* | ART: Refactored VisualizerPrinter visitor patternDavid Brazdil2014-12-291-14/+21
| | | | | | | | | | | | | | This patch refactors the visitor pattern in HGraphVisualizerPrinter to output instruction-specific details. Change-Id: Icfed9cd844b973025337a6bb584e1bc88f1ddd58
* | ART: Added Checker, a pattern matching test engineDavid Brazdil2014-12-171-7/+16
|/ | | | | | | | | | | | | | | | | | | | | | | This patch adds a Python script which implements a domain-specific mini-language similar to that of LLVM's FileCheck. It is primarily intended for writing tests for the optimizing compiler but could be configured for other use cases too. It is implemented from scratch in order to avoid dependency on LLVM. Checker tests are written in Java and dex2oat is invoked with a flag which dumps the CFG before and after each pass of the optimizing compiler. The output is then compared against assertions in the test's comments parsed by Checker. See comments in tools/checker.py for more details about the currently supported language features. This initial CL implements only one type of assertion - whether the output contains lines matching a desired pattern in the given order - but supports both plain text and regex matching and allows for equivalency testing by matching for the outcome of a previous match. See the tests in compiler/optimizing/test/ConstantFolding.java for examples. Change-Id: I1ad7431b399c38dc0391ccee74d2c643ba0b0675
* Inlining support in optimizing.Nicolas Geoffray2014-12-151-24/+4
| | | | | | | | | | Currently only inlines simple things that don't require an environment, such as: - Returning a constant. - Returning a parameter. - Returning an arithmetic operation. Change-Id: Ie844950cb44f69e104774a3cf7a8dea66bc85661
* Implement register allocator for floating point registers.Nicolas Geoffray2014-10-211-10/+8
| | | | | | | | Also: - Fix misuses of emitting the rex prefix in the x86_64 assembler. - Fix movaps code generation in the x86_64 assembler. Change-Id: Ib6dcf6e7c4a9c43368cfc46b02ba50f69ae69cbe
* Revert "Revert "Introduce a class to implement optimization passes.""Roland Levillain2014-10-171-1/+1
| | | | | | This reverts commit 1ddbf6d4b37979a9f11a203c12befd5ae8b65df4. Change-Id: I110a14668d1564ee0604dc958b91394b40da89fc
* Stop converting from Location to ManagedRegister.Nicolas Geoffray2014-10-091-2/+2
| | | | | | | Now the source of truth is the Location object that knows which register (core, pair, fpu) it needs to refer to. Change-Id: I62401343d7479ecfb24b5ed161ec7829cda5a0b1
* Add a prepare for register allocation pass.Nicolas Geoffray2014-10-061-0/+2
| | | | | | | | | | - Currently the pass just changes the uses of checks to the actual values. - Also optimize array access, now that inputs can be constants. - And fix another bug in the register allocator reveiled by this change. Change-Id: I43be0dbde9330ee5c8f9d678de11361292d8bd98
* Revert "Introduce a class to implement optimization passes."Nicolas Geoffray2014-10-011-1/+1
| | | | | | This reverts commit bf9cd7ba2118a75f5aa9b56241c4d5fa00dedeb8. Change-Id: I0a483446666c9c24c45925a5fc199debdefd8b3e
* Introduce a class to implement optimization passes.Roland Levillain2014-10-011-1/+1
| | | | | | | | | | | | | | | | - Add art::HOptimization. - Rename art::ConstantPropagation to art::HConstantFolding in compiler/optimizing/constant_folding.h to avoid name clashes with a class of the same name in compiler/dex/post_opt_passes.h. - Rename art::DeadCodeElimination to art::HDeadCodeElimination for consistency reasons. - Have art::HDeadCodeElimination and art::HConstantFolding derive from art::HOptimization. - Start to use these optimizations in art:OptimizingCompiler::TryCompile. Change-Id: Iaab350c122d87b2333b3760312b15c0592d7e010
* Fix code generation with materialized conditions.Nicolas Geoffray2014-09-231-0/+8
| | | | Change-Id: I8630af3c13fc1950d3fa718d7488407b00898796
* Small fixes to get the boot image compiled in debug mode.Nicolas Geoffray2014-09-181-3/+22
| | | | Change-Id: Id697737a1bcfb87f407d707e2ddd4f50a77caf26
* Add assembly operations with constants in optimizing compiler.Nicolas Geoffray2014-07-211-0/+4
| | | | Change-Id: I5bcc35ab50d4457186effef5592a75d7f4e5b65f
* Support longs in the register allocator for x86_64.Nicolas Geoffray2014-07-021-2/+4
| | | | Change-Id: I7fb6dfb761bc5cf9e5705682032855a0a70ca867
* Final CL to enable register allocation on x86.Nicolas Geoffray2014-06-121-18/+57
| | | | | | | | | | | | 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