aboutsummaryrefslogtreecommitdiff
path: root/src/main
AgeCommit message (Collapse)Author
2017-07-18Merge remote-tracking branch 'aosp/upstream-mirror' into mymerge4Alan Leung
2017-07-18Merge "Allows multiple --min-sdk in CompatDX"Alan Leung
2017-07-18Simplified IR processing order by first breaking cycles in call graph.Lars Bak
This fixes a race condition exposed by R8GMSCoreDeterministicTest. Bug: Change-Id: I6a46bd9a0bf061db2285cffcf60334910d1ec8d9
2017-07-18Merge "Do not assign same number to different basic block"Mikael Peltier
2017-07-18Merge "Support to keep nesting structure of class names."Stephan Herhut
2017-07-18Support to keep nesting structure of class names.Stephan Herhut
The minifier now produces names with $ separators for nested classes to keep the nesting structure in the names. This is needed for signature annotations, as they rely on the nesting structure to encode type paramemeters to the outer and inner class. R=yroussel@google.com Bug: Change-Id: I270608bc4124fc4b7a4d5aebfb2ea618a72115ce
2017-07-17Allows multiple --min-sdk in CompatDXAlan Leung
Bug: Change-Id: Ib69395f51211b4428146a5dd3bfe72872e0fc580
2017-07-17Do not assign same number to different basic blockmikaelpeltier
- shareIdenticalBlockSuffix optimization does not longer assign the same number to different basic block. It complicates debugging and it prevents to use basic block number as array index. - add an assertion into isConsistentGraph to guarantee this assumption. Change-Id: I561b7f52ee964c79cdca7d887791355c04ef2ebc
2017-07-17IRBuilder sets number to all created basic blockmikaelpeltier
- Most of the block created by the IRBuilder are initialized with a block number. Do it for all blocks rather than of only some. Change-Id: Ibaad66d00bb211babebd7b92ce153b563d2faaf4
2017-07-17Update highestSortingString atomically.Stephan Herhut
R=bak@google.com Bug: 63745863 Change-Id: Id9d83f2abe1b7e67c1a5f6744fc72fedea0ea8c6
2017-07-14Merge remote-tracking branch 'aosp/upstream-mirror' into masterIvan Gavrilovic
* aosp/upstream-mirror: If cycles are broken, proceed with caution, only use one thread. Update gradle in third-party to 3.5.1. Revert "Add build support for using protobuf in examples." Fix max number of entries in single dex Output dex to directory structure instead of flat one Fixes a race condition when running R8. Update JCTF tests to latest ART: Allow jar file as output path Add build support for using protobuf in examples. Add memory usage tracking to test scripts. Fix register allocation issues caused by special debug uses. Test: mma -j external/r8
2017-07-14Revising class map full loading.Denis Vnukov
Revise implementation of ClassMap.forceLoad(), replacing collectLoadedClasses() with getAllClasses(), removing unnecessary allocations in fully loaded class maps. Bug: Change-Id: Ia1a74c283797dc90835d55af53064d628ada8717
2017-07-14If cycles are broken, proceed with caution, only use one thread.Lars Bak
ee18912fbd1c75c8172ae5640342c2929f8efd4d Bug: Change-Id: I586904e64bfb2f30398ded670613f6c28b27f0d2
2017-07-14Fix max number of entries in single dexIvan Gavrilovic
Maximum allowed number of entries is 64k, so any index from 0 to 0xFFFF is allowed. Test: CompatDxTests Change-Id: If851db78416ed8caccfdf3eedae4427a861b7e67
2017-07-14Output dex to directory structure instead of flat oneIvan Gavrilovic
Test: OutputModeTest, updated D8IncrementalRunExamplesAndroidOTest Change-Id: I7ba5c4d4b69c8097e19082728ce4d723aa98b710
2017-07-14Fixes a race condition when running R8.Lars Bak
2f4517160f9ce402be795a6555f68b8129cb09da Bug: Change-Id: I9c73bc0b9db9feef1cd2b02e62af21861aee6367
2017-07-13Allow jar file as output pathIvan Gavrilovic
Test: D8CommandTest, R8CommandTest Change-Id: If90469d59d453b51646335e328084741740aff9e
2017-07-13Fix register allocation issues caused by special debug uses.Mads Ager
Debug uses registered on live intervals were sometimes ignored and other times not. That leads to inconsistencies in the register allocator. With this change, debug uses only extend the live range of values but do not register live interval uses. That makes the handling of uses consistent for the register allocator again and still ensures that values are kept alive by debug users in some register. R=herhut@google.com, mikaelpeltier@google.com, sgjesse@google.com, zerny@google.com Bug: 63285632 Bug: 62992398 Change-Id: Ia6515fed81d4d0e23c25631681076a67217a6e75
2017-07-13Merge remote-tracking branch 'aosp/upstream-mirror' into masterIvan Gavrilovic
* aosp/upstream-mirror: Use equals method from CanonicalizedDexItem Do not use a subclass in a static field initializer. Support continuous stepping in debug tests Fix keep rule debugging support. -printusage part I: parse -printusage [file]. Do not obfuscate unknown types in protos. Enable Art tests using Java 8 features Add support for generation keep rules from maindexlist. Write unaligned sections before aligned sections Test: mma -j external/r8 Change-Id: Ic2a572ff04de9cbafe48a212d77c6ad7658f855d
2017-07-12Merge "Use equals method from CanonicalizedDexItem"Mikael Peltier
2017-07-12Use equals method from CanonicalizedDexItemmikaelpeltier
- This method has a fast path when two instances are equals compare to computeEquals which does not contain the fast path. Change-Id: I3e356afd73a9f4c72bf757b45e72a610fab2880d
2017-07-12Merge "Do not use a subclass in a static field initializer."Mads Ager
2017-07-12Merge "Write unaligned sections before aligned sections"Mikael Peltier
2017-07-12Do not use a subclass in a static field initializer.Mads Ager
That can lead to clinit related deadlocks. R=gavra@google.com Change-Id: Id06a8f92191211d11cef951048ce5f43ee194cd4
2017-07-12Merge "Fix keep rule debugging support."Stephan Herhut
2017-07-12Fix keep rule debugging support.Stephan Herhut
When debugging keep rules, we used to keep all classes and methods. This blows up the dex to a size that no longer runs on devices. With this change we only keep default constructors, to handle the use of newInstance without corresponding keep rule. R=ager@google.com Bug: Change-Id: I3bca90c14ede030d03b4b0ae9e4c84dcdbbb41a8
2017-07-11Try to fix build. Will revert later.Alan Leung
Test: m && m tests Change-Id: I362fa30c7fbd54899fdb8761816b76d17b99ad40
2017-07-11Merge "-printusage part I: parse -printusage [file]."Jinseong Jeon
2017-07-11-printusage part I: parse -printusage [file].Jinseong Jeon
Bug: 36799826 Change-Id: I88093dc0bf170ffabde55bfd1e6385c2616e09b1
2017-07-11Merge "Do not obfuscate unknown types in protos."Stephan Herhut
2017-07-11Do not obfuscate unknown types in protos.Stephan Herhut
We used to obfuscate the name of classes in protos if we did not have a definition. The idea being that the program can only work if the corresponding parameters only get null values assigned. This unfortunately does not work for gmscore due to its dependencies on different android SDK versions. We end up in a scenario where a class from KitKat library is referenced but our code does not know, as the class is missing, and treats the class as a program class. This costs us about 10k. R=bak@google.com Bug: Change-Id: I05b43845c14a2e12dc361de16649716b16ecb746
2017-07-11Add support for generation keep rules from maindexlist.Stephan Herhut
We already have a tool to deobfuscate class names in a maindex list. This adds support to output keep rules instead of an unonbfuscated maindex list. R=bak@google.com Bug: Change-Id: I57f81b7e886ed5b19648e28c323fe2ce23a1c6f3
2017-07-10Write unaligned sections before aligned sectionsmikaelpeltier
- It allows to avoid a useless aligned that can appear for the Map when there is annotations. Change-Id: I2e90cdf6bdfc457f1aed896c77967ba92e439fcc
2017-07-07Remove erroneous assertion.Stephan Herhut
R=sgjesse@google.com Bug: Change-Id: I0595a1368dc1682f54a252b4060ee6edb7baddb2
2017-07-06Add creation of an instruction list iterator starting at an instructionSøren Gjesse
R=zerny@google.com Change-Id: I14af75e74b25a2ad7d3c305402b01f5730632eab
2017-07-06Replace --min-sdk-version with shorter and less confusing --min-api flag.Ian Zerny
R=sgjesse Change-Id: Iaf5eaf91d33dc3b89a148d7cf8c7a8305c88fc1d
2017-07-06Emit local changes accurately at all instruction points.Ian Zerny
Bug: 63243012 Change-Id: I874308618da6366b79b68e5b8eb0c0e1b08aa447
2017-07-06Merge "Make overwriting outputs the default and remove the flag/parameters ↵Ian Zerny
throughout."
2017-07-06Merge "Do not shared too much constants in dominator block of usages"Mikael Peltier
2017-07-05Make overwriting outputs the default and remove the flag/parameters throughout.Ian Zerny
When outputting to a directory, we remove all existing classesN.dex files to ensure the output files are a consistent build of a single app. R=sgjesse, yroussel Bug: Change-Id: I24d1cbe9ab4dddeb4f51f509dcf7608a26f0364d
2017-07-05Merge "Allow overwriting zip output file in D8 and R8"Yohann Roussel
2017-07-05Do not shared too much constants in dominator block of usagesmikaelpeltier
- It does not impact dex file size (only few bytes) of deploy.jar of GMS core v10 and v9. It allows to decrease code size of generated dex of jar files from the Android tree. Code size is decrease from 1783512 bytes to 466104 bytes for cssparser-0.9.13.jar and from 760244 bytes to 689728 bytes for freemarker-2.3.16.jar. In both case, the generated dex becomes smaller than with Dx. For the jar file attached to the bug, the generated dex file is 41096 bytes instead of 48424 bytes in release mode and is 43936 bytes instead of 49880 bytes in debug mode. In this case, generated dex files are also smaller than with Dx. Bug: 62475297 Change-Id: Idbab42a42c244bcc7f67e00238d38185405e8e72
2017-07-05Merge "Don't consider debug-value uses as actual uses."Ian Zerny
2017-07-05Don't consider debug-value uses as actual uses.Ian Zerny
R=ager, sgjesse Bug: 63285632 Bug: 62992398 Change-Id: Id9b28043e2e1acf14bdc40b47ea7a7bd7f4a602b
2017-07-05Don't consider library methods for single invoke targetsSøren Gjesse
Methods from the library can have implementations which are not visible - even if the library is included in the compilation. This could lead to a single implementation of a library interface method in the application to be considered a single target for optimization purposes. Keep the special handling of selected library methods from java.lang.StringBuilder and java.lang.StringBuffer. This saves 28 KB on GMS Core v9. Change-Id: I788186f10513bfe3644515a2a649a1d45bc1a721
2017-07-05Allow overwriting zip output file in D8 and R8Yohann Roussel
Change-Id: Ib4a226fc040a4ec4e09c0d1942f9bd798df59449
2017-07-04Merge "Update test comparing used registers with highest register number"Mikael Peltier
2017-07-04Update test comparing used registers with highest register numbermikaelpeltier
- It allow to save about 6k when dexing deploy.jar of GMS core v10. Change-Id: I5bf56a3e24d0634fc797706d352c175bd9f19c6d
2017-07-04Merge "Update the instruction block pointer when creating shared suffix blocks."Ian Zerny
2017-07-04Update the instruction block pointer when creating shared suffix blocks.Ian Zerny
R=sgjesse Bug: Change-Id: I0d9288c35f3e31cd08b2c52f53327f27ccf029c5