38e9e8046ea2196284bdb4638771c31108a30a4a |
|
18-Feb-2016 |
Jean-Philippe Halimi <jean-philippe.halimi@intel.com> |
Add statistics support for some optimizations This patch adds support for the --dump-stats facility with some optimizations and fixes all build issues introduced by the patch: I68751b119a030952a11057cb651a3c63e87e73ea (which got reverted) Change-Id: I5af1f2a8cced0a1a55c2bb4d8c88e6f0a24ec879 Signed-off-by: Jean-Philippe Halimi <jean-philippe.halimi@intel.com>
|
badd826664896d4a9628a5a89b78016894aa414b |
|
02-Feb-2016 |
David Brazdil <dbrazdil@google.com> |
ART: Run SsaBuilder from HGraphBuilder First step towards merging the two passes, which will later result in HGraphBuilder directly producing SSA form. This CL mostly just updates tests broken by not being able to inspect the pre-SSA form. Using HLocals outside the HGraphBuilder is now deprecated. Bug: 27150508 Change-Id: I00fb6050580f409dcc5aa5b5aa3a536d6e8d759e
|
15693bfdf9fa3ec79327a77b7e10315614d716cc |
|
16-Dec-2015 |
David Brazdil <dbrazdil@google.com> |
ART: Resolve ambiguous ArraySets Just like aget(-wide), the value operand of aput(-wide) bytecode instructions can be both int/long and float/double. This patch builds on the previous mechanism for resolving type of ArrayGets to type the values of ArraySets based on the reference type of the array. Bug: 22538329 Change-Id: Ic86abbb58de146692de04476b555010b6fcdd8b6
|
4833f5a1990c76bc2be89504225fb13cca22bedf |
|
16-Dec-2015 |
David Brazdil <dbrazdil@google.com> |
ART: Refactor SsaBuilder for more precise typing info This reverts commit 68289a531484d26214e09f1eadd9833531a3bc3c. Now uses Primitive::Is64BitType instead of Primitive::ComponentSize because it was incorrectly optimized by GCC. Bug: 26208284 Bug: 24252151 Bug: 24252100 Bug: 22538329 Bug: 25786318 Change-Id: Ib39f3da2b92bc5be5d76f4240a77567d82c6bebe
|
9865bde5d822f56c4732214c2005dfcaa41f94cf |
|
21-Dec-2015 |
Mathieu Chartier <mathieuc@google.com> |
Rename NullHandle to ScopedNullHandle This makes it clearer that is invalid to do things like: Handle<T> h = ScopedNullHandle<T>(); Bug: 26233305 Change-Id: I6d8f54eae01ec2e901cb7043afa853ea77db79fe
|
68289a531484d26214e09f1eadd9833531a3bc3c |
|
16-Dec-2015 |
Alex Light <allight@google.com> |
Revert "ART: Refactor SsaBuilder for more precise typing info" This reverts commit d9510dfc32349eeb4f2145c801f7ba1d5bccfb12. Bug: 26208284 Bug: 24252151 Bug: 24252100 Bug: 22538329 Bug: 25786318 Change-Id: I5f491becdf076ff51d437d490405ec4e1586c010
|
d9510dfc32349eeb4f2145c801f7ba1d5bccfb12 |
|
05-Nov-2015 |
David Brazdil <dbrazdil@google.com> |
ART: Refactor SsaBuilder for more precise typing info This patch refactors the SsaBuilder to do the following: 1) All phis are constructed live and marked dead if not used or proved to be conflicting. 2) Primitive type propagation, now not a separate pass, identifies conflicting types and marks corresponding phis dead. 3) When compiling --debuggable, DeadPhiHandling used to revive phis which had only environmental uses but did not attempt to resolve conflicts. This pass was removed as obsolete and is now superseded by primitive type propagation (identifying conflicting phis) and SsaDeadPhiEliminiation (keeping phis live if debuggable + env use). 4) Resolving conflicts requires correct primitive type information on all instructions. This was not the case for ArrayGet instructions which can have ambiguous types in the bytecode. To this end, SsaBuilder now runs reference type propagation and types ArrayGets from the type of the input array. 5) With RTP being run inside the SsaBuilder, it is not necessary to run it as a separate optimization pass. Optimizations can now assume that all instructions of type kPrimNot have reference type info after SsaBuilder (with the exception of NullConstant). 6) Graph now contains a reference type to be assigned to NullConstant. All reference type instructions therefore have RTI, as now enforced by the SsaChecker. Bug: 24252151 Bug: 24252100 Bug: 22538329 Bug: 25786318 Change-Id: I7a3aee1ff66c82d64b4846611c547af17e91d260
|
db51efb3617d15f1cd9e5ff0cc2d934777014e9a |
|
06-Nov-2015 |
David Brazdil <dbrazdil@google.com> |
ART: Fix critical edge splitting under try/catch A critical edge would not be split if the predecessor ends with TryBoundary. This would eventually trip liveness analysis because a back edge block would have smaller liveness position than a nested loop. Another implication of this change is that an edge between a loop's pre-header ending with TryBoundary and the header will be split, guaranteeing that a pre-header always has just one successor. Bug: 25493695 Bug: 25454012 Change-Id: I5a13b8bb74509b48f5d628906f7158af007f99ae
|
8df69d42a9e3ccd9456ff72fac8dbd1999f98755 |
|
23-Oct-2015 |
Mingyao Yang <mingyao@google.com> |
Revert "Revert "load store elimination."" This reverts commit 8030c4100d2586fac39ed4007c61ee91d4ea4f25. Change-Id: I79558d85484be5f5d04e4a44bea7201fece440f0
|
8030c4100d2586fac39ed4007c61ee91d4ea4f25 |
|
15-Oct-2015 |
Nicolas Geoffray <ngeoffray@google.com> |
Revert "load store elimination." Breaks libcore tests: libcore.java.lang.ref.FinalizeTest#testWatchdogDoesNotFailForObjectsThatAreNearTheDeadline libcore.java.util.ResourceLeakageDetectorTest#testDetectsUnclosedCloseGuard org.apache.harmony.tests.java.lang.ref.ReferenceTest#test_finalizeReferenceInteraction This reverts commit 589dac7f0ce078d19aad7e35bb0195c47ddf01d2. Change-Id: I55115765c10762d5bc152d3425e4622560d8b9f4
|
589dac7f0ce078d19aad7e35bb0195c47ddf01d2 |
|
24-Aug-2015 |
Mingyao Yang <mingyao@google.com> |
load store elimination. This adds a pass to eliminate some unnecessary heap loads/stores. It first collects heap locations and then tracks values stored to those heap locations. Alias analysis is done based on offset, type, singleton, pre-existence, etc. Change-Id: I11a9d8ef20d1b2f245607eb25118e9aff9be472a
|
e6e3beaf2d35d18a79f5e7b60a21e75fac9fd15d |
|
14-Oct-2015 |
Calin Juravle <calin@google.com> |
Revert "Revert "optimizing: propagate type information of arguments"" This reverts commit 89c0d32437011bbe492fe14c766cd707046ce043. Change-Id: I603a49794e155cc97410b8836c8ea425bfdc98eb
|
c05aca78fad20901ae17902a3671ccfca9071758 |
|
13-Oct-2015 |
Calin Juravle <calin@google.com> |
Revert "optimizing: propagate type information of arguments" This reverts commit 2c1ffc3a06e9ed0411e29e7dc2558b5d657ede7a. Change-Id: I3291070c373e661fa578f5a38becbb5a502baf94
|
2c1ffc3a06e9ed0411e29e7dc2558b5d657ede7a |
|
12-Oct-2015 |
Calin Juravle <calin@google.com> |
optimizing: propagate type information of arguments This helps inlining and type check elimination. e.g: void foo(ArrayList a) { int size = a.size(); // this can be inlined now. } Change-Id: I3ffeaa79d9df444aa19511c83c544cb5f9d9ab20
|
154746b84b407cfd166b45e039b62e6a06dc3f39 |
|
06-Oct-2015 |
Calin Juravle <calin@google.com> |
Remove dex_pc's default value from top level HInstruction This clearly hints that the dex_pc is stored in the super class and doesn't need to be reimplemented in subclasses. Change-Id: Ifd4aa95190c4c89367b4dd2cc8ab0ffd263659ac
|
77a48ae01bbc5b05ca009cf09e2fcb53e4c8ff23 |
|
15-Sep-2015 |
David Brazdil <dbrazdil@google.com> |
Revert "Revert "ART: Register allocation and runtime support for try/catch"" The original CL triggered b/24084144 which has been fixed by Ib72e12a018437c404e82f7ad414554c66a4c6f8c. This reverts commit 659562aaf133c41b8d90ec9216c07646f0f14362. Change-Id: Id8980436172457d0fcb276349c4405f7c4110a55
|
659562aaf133c41b8d90ec9216c07646f0f14362 |
|
14-Sep-2015 |
David Brazdil <dbrazdil@google.com> |
Revert "ART: Register allocation and runtime support for try/catch" Breaks libcore test org.apache.harmony.security.tests.java.security.KeyStorePrivateKeyEntryTest#testGetCertificateChain. Need to investigate. This reverts commit b022fa1300e6d78639b3b910af0cf85c43df44bb. Change-Id: Ib24d3a80064d963d273e557a93469c95f37b1f6f
|
b022fa1300e6d78639b3b910af0cf85c43df44bb |
|
20-Aug-2015 |
David Brazdil <dbrazdil@google.com> |
ART: Register allocation and runtime support for try/catch This patch completes a series of CLs that add support for try/catch in the Optimizing compiler. With it, Optimizing can compile all methods containing try/catch, provided they don't contain catch loops. Future work will focus on improving performance of the generated code. SsaLivenessAnalysis was updated to propagate liveness information of instructions live at catch blocks, and to keep location information on instructions which may be caught by catch phis. RegisterAllocator was extended to spill values used after catch, and to allocate spill slots for catch phis. Catch phis generated for the same vreg share a spill slot as the raw value must be the same. Location builders and slow paths were updated to reflect the fact that throwing an exception may not lead to escaping the method. Instruction code generators are forbidden from using of implicit null checks in try blocks as live registers need to be saved before handing over to the runtime. CodeGenerator emits a stack map for each catch block, storing locations of catch phis. CodeInfo and StackMapStream recognize this new type of stack map and store them separate from other stack maps to avoid dex_pc conflicts. After having found the target catch block to deliver an exception to, QuickExceptionHandler looks up the dex register maps at the throwing instruction and the catch block and copies the values over to their respective locations. The runtime-support approach was selected because it allows for the best performance in the normal control-flow path, since no propagation of catch phi values is necessary until the exception is thrown. In addition, it also greatly simplifies the register allocation phase. ConstantHoisting was removed from LICMTest because it instantiated (now abstract) HConstant and was bogus anyway (constants are always in the entry block). Change-Id: Ie31038ad8e3ee0c13a5bbbbaf5f0b3e532310e4e
|
736b560f2d2c89b63dc895888c671b5519afa4c8 |
|
02-Sep-2015 |
Mathieu Chartier <mathieuc@google.com> |
Reduce how often we call FindDexCache Before host boot.oat -j4 optimizing compile: real 1m17.792s user 3m26.140s sys 0m8.340s After: real 1m12.324s user 3m22.718s sys 0m8.320s Change-Id: If18e9e79e06cdf1676692e5efacb682bf93889c3
|
8f08f9e84b0b784fff8a636989bdb24bfaf93bbf |
|
22-Jul-2015 |
Aart Bik <ajcbik@google.com> |
Replaced CHECK with EXPECT in tests. Doh! Change-Id: Ibef45031146215034647c7eaab4065c766d6fb86
|
3f307f3e88140b792c20b9c3366afe059c77909f |
|
22-Jul-2015 |
Aart Bik <ajcbik@google.com> |
Added unit tests to LICM. Rationale: LICM did not have its own unit test yet, and it was a good time to ensure that the improved side effect analysis does what it is supposed to. Also, a nice way for me to get familiar with the testing infrastructure. Change-Id: I16471e5fd99615c04a59b09c4a69126d7a94684f
|