History log of /art/compiler/optimizing/reference_type_propagation.h
Revision Date Author Comments
009d166842195711eca4d5768c59a8f7404e6875 10-Oct-2017 Vladimir Marko <vmarko@google.com> Use ScopedArenaAllocator in BCE, DCE, LSE, ...

... ReferenceTypePropagation and GraphChecker.

Define and use a new allocation kind for LoadStoreAnalysis.

Memory needed to compile the two most expensive methods for
aosp_angler-userdebug boot image:
BatteryStats.dumpCheckinLocked() : 19.7MiB -> 19.6MiB (-79KiB)
BatteryStats.dumpLocked(): 39.4MiB -> 39.3MiB (-120KiB)

Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Bug: 64312607
Change-Id: Ib0cf074ac21ab67d8f8f2efabbdfb84cce9cae8e
16e528957869c7debb1f6758c9a364819e15ee1a 14-Jul-2017 Mads Ager <ager@google.com> RFC: Generate select instruction for conditional returns.

The select generator currently only inserts select instructions
if there is a diamond shape with a phi.

This change extends the select generator to also deal with the
pattern:

if (condition) {
movable instruction 0
return value0
} else {
movable instruction 1
return value1
}

which it turns into:

moveable instruction 0
moveable instruction 1
return select (value0, value1, condition)

Test: 592-checker-regression-bool-input
Change-Id: Iac50fb181dc2c9b7619f28977298662bc09fc0e1
b45528c1f1b83ca8c970f439b54fbfcfda6908ea 27-Jul-2017 Vladimir Marko <vmarko@google.com> ART: Refactor retrieval of types through ArtMethod.

Split Get*() functions that take a "bool resolve"
argument into Lookup*() and Resolve*() functions.

Test: m test-art-host-gtest
Test: testrunner.py --host
Change-Id: I0b7eaa1fadc2ffa8c0168203790467f91a126963
8d6768d47b66a688d35399d524ad5a5450e9d9d4 14-Mar-2017 Vladimir Marko <vmarko@google.com> Revert^6 "Hash-based dex cache type array."

Fixed ImageWriter to write class table also if it contains
only boot class loader classes. Added a regression test and
added extra checks for debug-build to verify that dex cache
types from app image are also in the class table. Removed
some unnecessary debug output.

Test: 158-app-image-class-table
Bug: 34839984
Bug: 30627598
Bug: 34659969

This reverts commit 0b66d6174bf1f6023f9d36dda8538490b79c2e9f.

Change-Id: I6a747904940c6ebc297f4946feef99dc0adf930c
0b66d6174bf1f6023f9d36dda8538490b79c2e9f 13-Mar-2017 Vladimir Marko <vmarko@google.com> Revert^5 "Hash-based dex cache type array."

For app images, ImageWriter does not add boot image
classes to the app image class table even though it
keeps them in the dex caches. The reason for that is
unknown, the code looks OK.

Bug: 34839984
Bug: 30627598
Bug: 34659969

Also reverts "Improve debugging output for a crash."

This reverts commits
bfb80d25eaeb7a604d5dd25a370e3869e96a33ab,
8dd56fcb3196f466ecaffd445397cb11ef85f89f.

Test: testrunner.py --host
Change-Id: Ic8db128207c07588c7f11563208ae1e85c8b0e84
bfb80d25eaeb7a604d5dd25a370e3869e96a33ab 14-Feb-2017 Vladimir Marko <vmarko@google.com> Revert^4 "Hash-based dex cache type array."

Added extra output to the abort message to collect more data
when we hit the crash. Added extra check when loading an app
image to verify that the class table isn't already broken.

Test: testrunner.py --host
Bug: 34839984
Bug: 30627598
Bug: 34659969

This reverts commit 5812e20ff7cbc8efa0b8d7486ada2f58840a6ad5.

Change-Id: I9bb442a184c236dcb75b3e42a095f39cd6bee59d
5812e20ff7cbc8efa0b8d7486ada2f58840a6ad5 14-Feb-2017 Mathieu Chartier <mathieuc@google.com> Revert^3 "Hash-based dex cache type array."

Assert failing for "earchbox:search":
F zygote64: class_linker.cc:4612] Check failed: handle_scope_iface.Get() != nullptr

Test: m test-art-host
Bug: 34839984
Bug: 30627598
Bug: 34659969

This reverts commit 85c0f2ac03417f5125bc2ff1dab8109859c67d5c.

Change-Id: I39846c20295af5875b0f945be7035c73ded23135
85c0f2ac03417f5125bc2ff1dab8109859c67d5c 02-Feb-2017 Vladimir Marko <vmarko@google.com> Revert^2 "Hash-based dex cache type array."

The reason for the revert was fixed by
https://android-review.googlesource.com/332666 .
We now enable clearing dex cache types in test 155 from that
CL. Also avoid an unnecessary store in LookupResolvedTypes()
and prevent verifier from messing up the dex cache types.

Test: m test-art-host
Bug: 34839984
Bug: 30627598
Bug: 34659969

This reverts commit d16363a93053de0f32252c7897d839a46aff14ae.

Change-Id: Ie8603cfa772e78e648d005b0b6eae59062ae729d
d16363a93053de0f32252c7897d839a46aff14ae 01-Feb-2017 Vladimir Marko <vmarko@google.com> Revert "Hash-based dex cache type array."

Reverting to work around some programs crashing with
Check failed: handle_scope_iface.Get() != nullptr.
though the reason for the failure not yet understood.

Test: m test-art-host
Bug: 34839984
Bug: 30627598
Bug: 34659969
Bug: 30419309

This reverts commit ec7862283dd49f5a58d0ac45960ce27c2f7671b8.

Change-Id: Ifded663633082f1e59e5b6ff2e026dc559bd6b82
ec7862283dd49f5a58d0ac45960ce27c2f7671b8 20-Dec-2016 Vladimir Marko <vmarko@google.com> Hash-based dex cache type array.

Test: m test-art-host (Interpreter, Optimizing, JIT)
Test: m test-art-target on Nexus 6P (Interpreter, Optimizing, JIT)
Test: Nexus 6P boots
Test: m valgrind-test-art-host
Bug: 30627598
Bug: 34659969
Bug: 30419309
Change-Id: Ic00eda89e58088a3573fc9ec0ad04c0e69e161d1
e8a3c576301fd531d5f73a65fc8b84a63619d580 12-Oct-2016 Mathieu Chartier <mathieuc@google.com> Replace StackHandleScopeCollection with VariableSizedHandleScope

VariableSizedHandleScope's internal handle scopes are not pushed
directly on the thread. This means that it is safe to intermix with
other types of handle scopes.

Added test.

Test: clean-oat-host && test-art-host

Change-Id: Id2fd1155788428f394d49615d337d9134824c8f0
3398c7874e002beaa6c2b2fadf183e7d1ddad23a 30-Sep-2016 Mathieu Chartier <mathieuc@google.com> Move ArtField to ObjPtr

Added EXPECT_OBJ_PTR_EQ and variants to gtests.

Fixed moving GC bugs in:
ClassLinker::CreatePathClassLoader
ClassLinkerTest: StaticFields

ObjPtr Decode call sites: 186 -> 181.

Some tests fail due to ResolvedFieldAccessTest, will fix in follow
up CL.

Bug: 31113334

Test: test-art-host CC baker

Change-Id: I8b266ad00f3c20c8cbe7cfdf280d175083df0b88
bdf7f1c3ab65ccb70f62db5ab31dba060632d458 31-Aug-2016 Andreas Gampe <agampe@google.com> ART: SHARED_REQUIRES to REQUIRES_SHARED

This coincides with the actual attribute name and upstream usage.
Preparation for deferring to libbase.

Test: m
Test: m test-art-host
Change-Id: Ia8986b5dfd926ba772bf00b0a35eaf83596d8518
94ab38f01dc2cf3ed0c6e73e2a6b594c14758d67 21-Jun-2016 David Brazdil <dbrazdil@google.com> ART: Run RTP if invoke inputs have more specific type

Moving RTP inside the graph builder introduced a regression where
replacing the inner parameters with the actual arguments of the
HInvoke would not build the inner graph with types more specific
than the method's signature.

This patch runs RTP on the inner graph again when it is detected
that RTP may improve typing precision.

Bug: 29595335
Change-Id: I351babc8497c83c2fba589aa51f46eaa0b7ab33c
a4336d253b88f95c49891a8084579a4599785e90 19-Apr-2016 Vladimir Marko <vmarko@google.com> Use dex cache from compilation unit in RTP.

Avoid calling the costly ClassLinker::FindDexCache() from
reference type propagation when the dex cache from the
compilation unit will do, i.e. almost always. Compiling
the Nexus 5 boot image on host under perf(1) shows that
the FindDexCache() hits drop from about 0.2% to almost
nothing, though enabling inlining for the boot image will
increase it a bit to 0.03% due to unavoidable calls from
the inliner.

Also clean up the ScopedObjectAccess usage a bit.

Bug: 28173563

Cherry-picked the "revert-revert"
(cherry picked from commit 456307a47336e3d6576ed6d8563b67573a4238d3)
and squashed two subsequent fixes
Fix RTP to hold mutator lock while using raw mirror pointers.
(cherry picked from commit 62977ff198deb673a6990202a2fb8b993217c57c)
Fix reference_type_propagation_test.
(cherry picked from commit 5eed0c5d27f091c952704f652cd77c4e3833ad88)

Change-Id: Ia944452d7ab26aed963832a9346df363743a419f
7de2439d357710aaf8bfe02b8cf9c196d3c77705 06-Apr-2016 Aart Bik <ajcbik@google.com> Avoid constructing types with errors.

BUG=27626735

Rationale:
Do not construct classes with a link error. Without this,
the error type thought it was Object (mirror's method
IsObjectClass() returns true if there is no superclass).

(cherry picked from commit 8b3f9b246d5bdbf67faeb2b872b75b8d72777bc0)
(also contains follow-up commit 31244b4cde9156632a08103a8bf1cbff4cbae3cc)

Change-Id: I4443779dda47c320115975c1c71b22e118bd8252
456307a47336e3d6576ed6d8563b67573a4238d3 19-Apr-2016 Vladimir Marko <vmarko@google.com> Revert "Revert "Use dex cache from compilation unit in RTP.""

The exposed issue has been fixed by
https://android-review.googlesource.com/215877

Bug:28210356

This reverts commit 34d9b04d8d0006967486c0ad1b221e7b632652af.

Change-Id: I5288c923e45d9ef3190dabb89738350a1212a60d
8b3f9b246d5bdbf67faeb2b872b75b8d72777bc0 06-Apr-2016 Aart Bik <ajcbik@google.com> Avoid constructing types with errors.

BUG=27626735

Rationale:
Do not construct classes with a link error. Without this,
the error type thought it was Object (mirror's method
IsObjectClass() returns true if there is no superclass).

Change-Id: I55ca8cc8cfc042210edf748aab10da4c6e345980
34d9b04d8d0006967486c0ad1b221e7b632652af 15-Apr-2016 Nicolas Geoffray <ngeoffray@google.com> Revert "Use dex cache from compilation unit in RTP."

bug:28210356

This reverts commit 27bb86edf60e2f9ca2c1075c0c86b9e79374f1d0.

Change-Id: Ib27ee90a7e4d516fd2db67a9c4e454023737841a
27bb86edf60e2f9ca2c1075c0c86b9e79374f1d0 14-Apr-2016 Vladimir Marko <vmarko@google.com> Use dex cache from compilation unit in RTP.

Avoid calling the costly ClassLinker::FindDexCache() from
reference type propagation when the dex cache from the
compilation unit will do, i.e. almost always. Compiling
the Nexus 5 boot image on host under perf(1) shows that
the FindDexCache() hits drop from about 0.2% to almost
nothing, though enabling inlining for the boot image will
increase it a bit to 0.03% due to unavoidable calls from
the inliner.

Also clean up the ScopedObjectAccess usage a bit.

Change-Id: I426a5f9f5da9e64fad2ea57654240789a48d3871
d9994f069dfeaa32ba929ca78816b5b83e2a4134 11-Feb-2016 Nicolas Geoffray <ngeoffray@google.com> Re-enable OSR.

Fixes two bugs:
- Dealing with proxy methods, which the compiler and code cache
does not handle.
- Dealing with phi types, that may have been speculatively optimized
but do not hold once jumping to the compiled code.

Change-Id: I7dcd9976ef7b12128fff95d2b7ed3e69cc42e90a
be10e8e99a78caae01fb65769218800d465144ae 22-Jan-2016 Vladimir Marko <vmarko@google.com> Optimizing: Try pattern substitution when we cannot inline.

Change-Id: I7c01f4494bac8498accc0f087044ec509fee4c98
7d1fbf38412078090e81e9d9fa502635d8541707 26-Jan-2016 Vladimir Marko <vmarko@google.com> Optimizing: Lazy creation of Handle<>s in RTP.

This reduces the number of StackHandleScope<>s that we
allocate, especially when we're inlining many methods.
Previously, each RTP would create 4 handles in the ctor
which is actually the same as kNumReferencesPerScope.

Change-Id: Ib6767993b1e89913a91275f0ef66dac786bccb6c
f5f64efda943000168d34bfe44ccbbadd284e55f 15-Dec-2015 Nicolas Geoffray <ngeoffray@google.com> Detect phi cycles.

Having reference and non-reference phi equivalent, only happened
for the 0/null constant. To avoid such occurences, we must
detect phi cycles.

bug:25493693

Change-Id: Ie1a8460c3abacca96c299da107fa4407e17dd792
fe86070bcbe938a5c8dec02b5a7d5efb632deed1 02-Dec-2015 David Brazdil <dbrazdil@google.com> Revert "Revert "ART: Do not eagerly type LoopPhi [null, ...]""

Fixes one more place where RTP expected the parent to have valid RTI.

This reverts commit 5f3fb18e9705f7d0d594f665858bff2020409c6a.

Bug: 25899441
Change-Id: I65c55a81617ffb82c2de2470eda562600b10d479
5f3fb18e9705f7d0d594f665858bff2020409c6a 02-Dec-2015 David Brazdil <dbrazdil@google.com> Revert "ART: Do not eagerly type LoopPhi [null, ...]"

Breaks some libcore tests. Revert to unblock others while investigating.

This reverts commit 3a738bfe9784b9ea0f2fccbe75f0c72ede536641.

Change-Id: I9f103c692199b8f9b6e7af469fc424512b57544a
3a738bfe9784b9ea0f2fccbe75f0c72ede536641 30-Nov-2015 David Brazdil <dbrazdil@google.com> ART: Do not eagerly type LoopPhi [null, ...]

ReferenceTypePropagation would eagerly set the type of each loop phi
to the type of the first input prior to beginning the fix-point
iteration. While this does make the algorithm converge faster, it
should not be applied when the first input is a NullConstant becuase
that sets the type of the phi and all dependent instructions to Object.

Bug: 25899441
Change-Id: Iff1ed26a63fe4332eaf88d9ca171e287f10ba1a6
cdfed3dc422d0e1a9a0a948863308e58c39d01ba 26-Oct-2015 Calin Juravle <calin@google.com> Revert "Revert "Run type propagation after inliner only when needed.""

This reverts commit 271743601650308c7ac5c7a3ec35025d8130a298.

Change-Id: I173e27a0a4d7d54f90ca459eb48d280d1d40ab70
271743601650308c7ac5c7a3ec35025d8130a298 26-Oct-2015 Calin Juravle <calin@google.com> Revert "Run type propagation after inliner only when needed."

This reverts commit 4e5dd521063beae1706410419f19c7e224db50fe.

Change-Id: I0de261d14dd3f71abe05f9bc71744820cf23b937
4e5dd521063beae1706410419f19c7e224db50fe 19-Oct-2015 Calin Juravle <calin@google.com> Run type propagation after inliner only when needed.

Currently we run a type propagation pass unconditionally after the
inliner. This change looks at the returned value (if any) and runs a
minimal type propagation only if its type has changed.

Change-Id: I0dd72bd481219081e8a978d2632426afc980d73a
2aaa4b5532d30c4e65d8892b556400bb61f9dc8c 17-Sep-2015 Vladimir Marko <vmarko@google.com> Optimizing: Tag more arena allocations.

Replace GrowableArray with ArenaVector and tag arena
allocations with new allocation types.

As part of this, make the register allocator a bit more
efficient, doing bulk insert/erase. Some loops are now
O(n) instead of O(n^2).

Change-Id: Ifac0871ffb34b121cc0447801a2d07eefd308c14
bbd733e4ef277eff19bf9a6601032da081e9b68f 18-Aug-2015 David Brazdil <dbrazdil@google.com> ART: Enable basic optimizations for try/catch

Generating code for try/catch methods requires having run at least the
instruction simplifier to remove redundant suspend checks. This patch
enables the first group of optimizations when try/catch is present.

Enabled optimizations:
1) IntrinsicsRecognizer
Does not modify the graph, only sets HInvoke::intrinsic_.

2) ConstantFolding
Does not deal with throwing instructions.

3) InstructionSimplifier
May remove a throwing instruction (e.g. LoadClass in VisitCheckCast),
or may turn a throwing instruction into a non-throwing one (ArraySet).
Their corresponding catch phi inputs are not removed but correctness
is preserved.

4) ReferenceTypePropagation
Does not modify the graph, only sets type properties. Typing of
LoadException from catch handler information was added.

5) DeadCodeElimination
Removing individual instructions is fine (same as 3). Removal of dead
blocks was disabled for try/catch.

Change-Id: I2722c3229eb8aaf326391e07f522dbf5186774b8
2e76830f0b3f23825677436c0633714402715099 28-Jul-2015 Calin Juravle <calin@google.com> Revert "Revert "Revert "Revert "Use the object class as top in reference type propagation""""

This reverts commit b734808d0c93af98ec4e3539fdb0a8c0787263b0.

Change-Id: Ifd925f166761bcb9be2268ff0fc9fa3a72f00c6f
a5ae3c3f468ffe3a317b498d7fde1f8e9325346a 28-Jul-2015 Calin Juravle <calin@google.com> Revert "Revert "Revert "Revert "Fixes and improvements in ReferenceTypePropagation""""

This reverts commit e344a8070d4549d513413c06767abf8a2c5e9709.

Change-Id: I400fab0e02ce3c11376cc1f3ae9c7cf2c82ffcc1
e344a8070d4549d513413c06767abf8a2c5e9709 28-Jul-2015 Calin Juravle <calin@google.com> Revert "Revert "Revert "Fixes and improvements in ReferenceTypePropagation"""

This reverts commit 00e3b38be4b280d6d7a7e843cd336ffbd2ba4365.

Change-Id: I4dbadb2d7312a410f1c56283f063dd82156cf702
b734808d0c93af98ec4e3539fdb0a8c0787263b0 28-Jul-2015 Calin Juravle <calin@google.com> Revert "Revert "Revert "Use the object class as top in reference type propagation"""

This reverts commit 80caa1478cf3df4eac1214d8a63a4da6f4fe622b.

Change-Id: I63b51ca418b19b2bfb5ede3f8444f8fbeb8a339d
80caa1478cf3df4eac1214d8a63a4da6f4fe622b 16-Jul-2015 Calin Juravle <calin@google.com> Revert "Revert "Use the object class as top in reference type propagation""

This reverts commit 7733bd644ac71f86d4b30a319624b23343882e53.

Change-Id: I7d393a808c01c084c18d632a54e0554b4b455f2c
00e3b38be4b280d6d7a7e843cd336ffbd2ba4365 15-Jul-2015 Calin Juravle <calin@google.com> Revert "Revert "Fixes and improvements in ReferenceTypePropagation""

This reverts commit 9b0096ba77e7e61bc2dcbbf954831dcae54a6c27.

Change-Id: I824f16e800ca32e646577d5e1e0d593887ccead1
90443477f9a0061581c420775ce3b7eeae7468bc 17-Jul-2015 Mathieu Chartier <mathieuc@google.com> Move to newer clang annotations

Also enable -Wthread-safety-negative.

Changes:
Switch to capabilities and negative capabilities.

Future work:
Use capabilities to implement uninterruptible annotations to work
with AssertNoThreadSuspension.

Bug: 20072211

Change-Id: I42fcbe0300d98a831c89d1eff3ecd5a7e99ebf33
7733bd644ac71f86d4b30a319624b23343882e53 22-Jul-2015 Calin Juravle <calin@google.com> Revert "Use the object class as top in reference type propagation"

This reverts commit 3fabec7a25d151b26ba7de13615bbead0dd615a6.

Change-Id: Id8614f6b6e3e0e4c9caeb9f771e4c145d9fec64f
9b0096ba77e7e61bc2dcbbf954831dcae54a6c27 22-Jul-2015 Calin Juravle <calin@google.com> Revert "Fixes and improvements in ReferenceTypePropagation"

This reverts commit b0d5fc0ac139da4aaa1440263416b9bde05630b0.

Change-Id: Iea8adfc0bd4cb7ee2b292278b8bac80a259acbd1
3fabec7a25d151b26ba7de13615bbead0dd615a6 16-Jul-2015 Calin Juravle <calin@google.com> Use the object class as top in reference type propagation

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
b0d5fc0ac139da4aaa1440263416b9bde05630b0 15-Jul-2015 Calin Juravle <calin@google.com> Fixes and improvements in ReferenceTypePropagation

- 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
beba9302bec33d72beb582970bf23d056f62641f 08-Jul-2015 Calin Juravle <calin@google.com> Revert "Use the object class as top in reference type propagation"

failing on the build bot on some targets but not locally. needs more investigation.

This reverts commit 20e6071362b84a9782b633a893c29ebde458205e.

Change-Id: I6965483f569fb862f9bdb66d459b747ded54de71
20e6071362b84a9782b633a893c29ebde458205e 01-Jul-2015 Calin Juravle <calin@google.com> Use the object class as top in reference type propagation

This properly types all instructions, making it safe to query the type
at any time.

Change-Id: I3ee2f0f79253cdf45b10ddab37ecb473345ca53a
69ba7b7112c2277ac225615b37e6df74c055740d 23-Jun-2015 David Brazdil <dbrazdil@google.com> ART: Run GraphChecker after Builder and SsaBuilder

This patch refactors the way GraphChecker is invoked, utilizing the
same scoping mechanism as pass timing and graph visualizer. Therefore,
GraphChecker will now run not just after instances of HOptimization
but after the builders and reg alloc, too.

Change-Id: I8173b98b79afa95e1fcbf3ac9630a873d7f6c1d4
ae09d2d244cf2f506822b3e14731b81c3b278f9d 29-May-2015 Guillaume "Vermeille" Sanchez <guillaumesa@google.com> Bring ReferenceTypePropagation to HInvoke return types

Change-Id: Id0683f67e32874713a30c072c71dc537b1271926
6c0c4f230f417ed484bae5c01b79551af7659389 12-Jun-2015 Calin Juravle <calin@google.com> Revert "Revert "Revert "Bring ReferenceTypePropagation to HInvoke return types"""

This reverts commit a981f9d5cac9a479d3b5d16508d71cfe17d95117.

Change-Id: I69faf16d5ef0ecc234fb52e071b682e728a8bf97
a981f9d5cac9a479d3b5d16508d71cfe17d95117 12-Jun-2015 Calin Juravle <calin@google.com> Revert "Revert "Bring ReferenceTypePropagation to HInvoke return types""

This reverts commit 958857d0f9686770a3b1117166d5fa700b39704a.

Change-Id: I196ff2a4453489f0105efc54eee73a2a9321ac4e
958857d0f9686770a3b1117166d5fa700b39704a 12-Jun-2015 Calin Juravle <calin@google.com> Revert "Bring ReferenceTypePropagation to HInvoke return types"

We exceed stack frame size with Clang in art::OptimizingCompiler::CompileOptimized


This reverts commit ddedddcedaae78fc6aa29940fdb1fbe40bb05774.

Change-Id: I6f992dda228acb9cae2087d1e6c78f2afdf30050
ddedddcedaae78fc6aa29940fdb1fbe40bb05774 29-May-2015 Guillaume "Vermeille" Sanchez <guillaumesa@google.com> Bring ReferenceTypePropagation to HInvoke return types

Change-Id: I9a7e974787cb8ba75b86bd07e8a37c5fe99911c3
222862ceaeed48528020412ef4f7b1cdaecf8789 09-Jun-2015 Guillaume Sanchez <guillaumesa@google.com> Add optimizations for instanceof/checkcast.

The optimizations try to statically determine the outcome of the
type tests, replacing/removing the instructions when possible.

This required to fix the is_exact flag for ReferenceTypePropagation.

Change-Id: I6cea29b6c351d118b62060e8420333085e9383fb
6e4758615308bb525b6350c30468e33a2e1f2274 08-Jun-2015 Nicolas Geoffray <ngeoffray@google.com> Revert "Support for inlining virtual and interface calls."

Fails for some apps.

bug: 21674542

This reverts commit 1d5006c34d75758752bf3499892e3d5beb11d5dc.

Change-Id: Ia74b5e54d59f8ffe9992591324a12f71efb67af4
1d5006c34d75758752bf3499892e3d5beb11d5dc 03-Jun-2015 Nicolas Geoffray <ngeoffray@google.com> Support for inlining virtual and interface calls.

Also had to change the pass order to get reference type propagation
before the inliner.

Change-Id: I4bf3bbb2d17c7d9cab632cfdd96adad8368bdfea
012a072d06474404ff488d181eb3d4a504c5cbe7 02-Jun-2015 Calin Juravle <calin@google.com> Revert "Revert "Revert "Bring ReferenceTypePropagation to HInvoke return types"""

This reverts commit 82cc909ff81cc25f7fe97ddac3a1a1f6dc9f5792.

Change-Id: If29dbe0dfd65998047c7ac4ef06c4789355b6bda
82cc909ff81cc25f7fe97ddac3a1a1f6dc9f5792 02-Jun-2015 Calin Juravle <calin@google.com> Revert "Revert "Bring ReferenceTypePropagation to HInvoke return types""

This reverts commit 8ccf8a0ce31083faa0d9c502f1f0f12a825f6c5d.

Change-Id: I729c147989e0e98d0739d7596b5bb41a72971624
8ccf8a0ce31083faa0d9c502f1f0f12a825f6c5d 02-Jun-2015 Calin Juravle <calin@google.com> Revert "Bring ReferenceTypePropagation to HInvoke return types"

This reverts commit 77e48c64e7c1c0084217b8df1b47ac6367e61cc7.

Change-Id: Ic6967b2ea7588862ac190e1c0555af615027b5b6
77e48c64e7c1c0084217b8df1b47ac6367e61cc7 29-May-2015 Guillaume "Vermeille" Sanchez <guillaumesa@google.com> Bring ReferenceTypePropagation to HInvoke return types

Change-Id: Ie8f6b0ea5bd841c9555f3b1b6d4b7dce92a117f1
104fd8a3f30ddcf07831250571aa2a233cd5c04d 20-May-2015 Guillaume "Vermeille" Sanchez <guillaumesa@google.com> Bring Reference Type Propagation to Instance/StaticInstanceField

For this, we need the field index in FieldInfo, hence the add of the field.

Change-Id: Id219bd826d8496acf3981307a8c42e2eb6ddb712
81d804a51d4fc415e1544a5a09505db049f4eda6 20-May-2015 Guillaume "Vermeille" Sanchez <guillaumesa@google.com> Bring Reference Type Propagation to NewArray

Change-Id: Ieff4f38854e06b0ed4b5689ced94a4289053d80d
d5111bf05fc0a9974280a80eeb43db6d5227a81e 22-May-2015 Nicolas Geoffray <ngeoffray@google.com> Do not use dex_compilation_unit after inlining.

It's incompatible with inlining, as inlined invokes/load class/new
can be from another dex file.

Change-Id: I8897b6a012942bc8e136f2bea70252d3fb3a7fa5
7c3952f423b8213083d60596a5f0bf4237ca3f7b 20-Feb-2015 Andreas Gampe <agampe@google.com> ART: Add -Wunused

Until the global CFLAGS are fixed, add Wunused. Fix declarations
in the optimizing compiler.

Change-Id: Ic4553f08e809dc54f3d82af57ac592622c98e000
61d544bfb812d79f5c9ddad171198836cea719db 23-Feb-2015 Calin Juravle <calin@google.com> [optimizing] Add if-context sensitivity for null popagation.

Change-Id: I3725b6c6a6cf44440c34a1bfb67e623531e665d6
b1498f67b444c897fa8f1530777ef118e05aa631 16-Feb-2015 Calin Juravle <calin@google.com> Improve type propagation with if-contexts

This works by adding a new instruction (HBoundType) after each `if (a
instanceof ClassA) {}` to bound the type that `a` can take in the True-
dominated blocks.

Change-Id: Iae6a150b353486d4509b0d9b092164675732b90c
acf735c13998ad2a175f5a17e7bfce220073279d 12-Feb-2015 Calin Juravle <calin@google.com> Reference type propagation

- propagate reference types between instructions
- remove checked casts when possible
- add StackHandleScopeCollection to manage an arbitrary number of stack
handles (see comments)

Change-Id: I31200067c5e7375a5ea8e2f873c4374ebdb5ee60
10e244f9e7f6d96a95c910a2bedef5bd3810c637 26-Jan-2015 Calin Juravle <calin@google.com> optimizing: NullCheck elimination

How it works:
- run a type analysis to propagate null information on instructions
- during the last instruction simplifier remove null checks for which
the input is known to be not null

The current type analysis is actually a nullability analysis but it will
be reused in follow up CLs to propagate type information: so it keeps
the more convenient name.

Change-Id: I54bb1d32ab24604b4d677d1ecdaf8d60a5ff5ce9