summaryrefslogtreecommitdiff
path: root/compiler/optimizing/graph_visualizer.cc
Commit message (Collapse)AuthorAgeFilesLines
...
* | Run intrinsics on inlined code.Scott Wakeling2015-07-291-0/+1
|/ | | | | | | Fixes any prior intrinsics recognition being lost if the containing code block is inlined. Change-Id: I6c89973545af97a4fe2444a9bd6efcc12d0d1b10
* Merge "Revert "Fixes and improvements in ReferenceTypePropagation""Calin Juravle2015-07-221-8/+4
|\
| * Revert "Fixes and improvements in ReferenceTypePropagation"Calin Juravle2015-07-221-8/+4
| | | | | | | | | | | | This reverts commit b0d5fc0ac139da4aaa1440263416b9bde05630b0. Change-Id: Iea8adfc0bd4cb7ee2b292278b8bac80a259acbd1
* | Merge "Revert "Use the object class as top in reference type propagation""Calin Juravle2015-07-221-6/+11
|\ \
| * | Revert "Use the object class as top in reference type propagation"Calin Juravle2015-07-221-6/+11
| | | | | | | | | | | | | | | | | | This reverts commit 3fabec7a25d151b26ba7de13615bbead0dd615a6. Change-Id: Id8614f6b6e3e0e4c9caeb9f771e4c145d9fec64f
* | | Merge "Use the object class as top in reference type propagation"Calin Juravle2015-07-221-11/+6
|\| |
| * | Use the object class as top in reference type propagationCalin Juravle2015-07-211-11/+6
| |/ | | | | | | | | | | | | | | | | | | This properly types all instructions, making it safe to query the type at any time. This also moves a few functions from class.h to class-inl.h to please gcc linker when compiling for target. Change-Id: I6b7ce965c10834c994b95529ab65a548515b4406
* | Merge "Fixes and improvements in ReferenceTypePropagation"Calin Juravle2015-07-221-4/+8
|\|
| * Fixes and improvements in ReferenceTypePropagationCalin Juravle2015-07-211-4/+8
| | | | | | | | | | | | | | | | | | | | - Bound object types after a CheckCast. This increases the precision of (inlining) generic operations. - Make sure that the BoundType is exact when the class is final. - Make sure that we don't duplicate BoundTypes when we run the analysis more than once. Change-Id: Ic22b610766fae101f942c0d753ddcac32ac1844a
* | ART: Build SSA form when try/catch is presentDavid Brazdil2015-07-151-16/+32
|/ | | | | | | | | This patch implements support for try/catch in the SsaBuilder. Values of locals are propagated from throwing sites inside try blocks to their respective catch blocks and phis ("catch phis") are created when necessary. Change-Id: I0736565c2c4ff3f9f0924b6e3a785a50023f875a
* Revert "Revert "ART: Ignore try blocks with no throwing instructions""David Brazdil2015-07-081-0/+4
| | | | | | | | | | The original CL broke libcore tests because monitor-exit instructions did not have any side-effects and got removed by DCE once not labelled throwing any more. This reverts commit efe374d7c25c1d48945a9198d96469de99e0c1bd. Change-Id: I624c0f91676d9baaada6f33be9d7091f68d57535
* Revert "ART: Ignore try blocks with no throwing instructions"David Brazdil2015-07-081-4/+0
| | | | | | | | Turns out monitor-exit *can* throw... Need to investigate This reverts commit 8f8ee680bec71a28d9d7b7538e8c7ca100a18184. Change-Id: I8b42690918833c917b6a7fc3ceea932b7c1a6f15
* ART: Ignore try blocks with no throwing instructionsDavid Brazdil2015-07-081-0/+4
| | | | | | | | | | | | In order to avoid complex removal of redundant exceptional edges in the SSA builder, this patch modified the graph builder to consider blocks without throwing instructions as not in a try block, even if covered by a TryItem. In some corner cases, this may generate more TryBoundaries than necessary, but those can be removed once the SSA form is built. Change-Id: I158c4542b2c1964a8dd532f82e921b9cb1997e1e
* Don't print signatures to avoid spaces.Nicolas Geoffray2015-07-011-2/+2
| | | | Change-Id: I64340fbd08282acb0eb4142d17d37e69bba507cf
* Merge "ART: Changes to try-catch in GraphBuilder"David Brazdil2015-07-011-6/+1
|\
| * ART: Changes to try-catch in GraphBuilderDavid Brazdil2015-07-011-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | This patch adds an additional case into the insertion algorithm for HTryBoundary inside HGraphBuilder in order to better handle catch blocks covered by a TryItem. Building SSA form also required to stop combining HTryBoundaries for neighbouring TryItems because it was not clear which exception handlers belong to which try block. Change-Id: Ic68bd6ef98fee784609fa593cb08dca1f00a15e0
* | Emit method name at invokes in the graph visualizer.Nicolas Geoffray2015-07-011-3/+9
|/ | | | Change-Id: I832f823463569724fca9c38cd70d9dd552f15b3a
* Revert "Revert "Do not update the type of something we already know.""Nicolas Geoffray2015-06-291-1/+1
| | | | | | | This reverts commit 63107a804ce17db9789051e1fe310d99d1dae1cb. bug:22116987 Change-Id: I49a376a5bd2073a69babe122ec0d26e5d2f82461
* Revert "Do not update the type of something we already know."Calin Juravle2015-06-291-1/+1
| | | | | | This reverts commit 30eb58c548bee08468f68eb140a74a51dd7d9b43. Change-Id: Icd959e868160fc3ee7031dd2927554ac5b21d40f
* Do not update the type of something we already know.Nicolas Geoffray2015-06-291-1/+1
| | | | | | | | | | | This is both an optimization to avoid unneeded nodes, and correctness to avoid replacing the second input of `HInstanceOf` and `HCheckCast` to something that is not `HLoadClass`. bug:22116987 Change-Id: I4907197a9002883d7cae8265a9642512b6201396
* Revert "Revert "ART: Implement try/catch blocks in Builder""David Brazdil2015-06-261-4/+33
| | | | | | | | | | | | | | | | | | | | | | | This patch enables the GraphBuilder to generate blocks and edges which represent the exceptional control flow when try/catch blocks are present in the code. Actual compilation is still delegated to Quick and Baseline ignores the additional code. To represent the relationship between try and catch blocks, Builder splits the edges which enter/exit a try block and links the newly created blocks to the corresponding exception handlers. This layout will later enable the SsaBuilder to correctly infer the dominators of the catch blocks and to produce the appropriate reverse post ordering. It will not, however, allow for building the complete SSA form of the catch blocks and consequently optimizing such blocks. To this end, a new TryBoundary control-flow instruction is introduced. Codegen treats it the same as a Goto but it allows for additional successors (the handlers). This reverts commit 3e18738bd338e9f8363b26bc895f38c0ec682824. Change-Id: I4f5ea961848a0b83d8db3673763861633e9bfcfb
* Revert "ART: Implement try/catch blocks in Builder"David Brazdil2015-06-261-33/+4
| | | | | | | | Causes OutOfMemory issues, need to investigate. This reverts commit 0b5c7d1994b76090afcc825e737f2b8c546da2f8. Change-Id: I263e6cc4df5f9a56ad2ce44e18932ca51d7e349f
* ART: Implement try/catch blocks in BuilderDavid Brazdil2015-06-251-4/+33
| | | | | | | | | | | | | | | | | | | | | This patch enables the GraphBuilder to generate blocks and edges which represent the exceptional control flow when try/catch blocks are present in the code. Actual compilation is still delegated to Quick and Baseline ignores the additional code. To represent the relationship between try and catch blocks, Builder splits the edges which enter/exit a try block and links the newly created blocks to the corresponding exception handlers. This layout will later enable the SsaBuilder to correctly infer the dominators of the catch blocks and to produce the appropriate reverse post ordering. It will not, however, allow for building the complete SSA form of the catch blocks and consequently optimizing such blocks. To this end, a new TryBoundary control-flow instruction is introduced. Codegen treats it the same as a Goto but it allows for additional successors (the handlers). Change-Id: I415b985596d5bebb7b1bb358a46e08b7b04bb53a
* ART: Fix GraphVisualizer dlopen crashDavid Brazdil2015-06-231-1/+5
| | | | | | | | The HGraphVisualizer used to crash if it failed to dlopen the libart(d)-disassembler.so. This patch fixes that. Bug: 22001285 Change-Id: Ibe9b9af17a77e22e3571c886f77918e9491b7827
* Opt compiler: Add disassembly to the '.cfg' output.Alexandre Rames2015-06-221-7/+177
| | | | | | | This is automatically added to the '.cfg' output when using the usual `--dump-cfg` option. Change-Id: I864bfc3a8299c042e72e451cc7730ad8271e4deb
* 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