diff options
author | Vladimir Marko <vmarko@google.com> | 2018-03-19 18:42:49 +0000 |
---|---|---|
committer | Vladimir Marko <vmarko@google.com> | 2018-06-12 15:46:22 +0100 |
commit | 6fa4404f501cf0fb5a87074baec9673cedde25d4 (patch) | |
tree | ade27385c4aa0db96956b873321a7994e69acd8d /compiler/optimizing/code_generator_utils.cc | |
parent | 1e739fa94947147953c53e92964e0e9e1eac0526 (diff) |
Simplify const-string.indexOf().
Simplify String.indexOf() called on empty or single-char
constant string. We see these patterns in inlined
java.net.URI$Parser.scan(int, int, String, String)
called with constant strings from other URI$Parser methods.
The empty string simplification allows constant folding
and DCE to remove some of the code. The single-character
string simplification avoids entrypoint call overhead.
Test: New tests in 458-checker-instruct-simplification
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Change-Id: I4d3c997a8d6220202d481bbf8cbf280832c27cd7
Diffstat (limited to 'compiler/optimizing/code_generator_utils.cc')
0 files changed, 0 insertions, 0 deletions