OSDN Git Service

Use dex cache from compilation unit in HInstructionBuilder.
authorVladimir Marko <vmarko@google.com>
Wed, 13 Apr 2016 18:29:26 +0000 (19:29 +0100)
committerVladimir Marko <vmarko@google.com>
Thu, 14 Apr 2016 09:16:28 +0000 (10:16 +0100)
commit3cd50df11b3076b801954018236c366fd9b97948
tree8f442c981f5e0edfd5f2c4fc4fe8439a4eb001e6
parent8d4b37ed048487561358e13e2a18ad9ca0dab3c0
Use dex cache from compilation unit in HInstructionBuilder.

Avoid calling costly ClassLinker::FindDexCache() from
HInstructionBuilder, the dex cache is already available in
the compilation unit. Compiling Nexus 5 boot image on host
under perf(1) shows that the time spent in FindDexCache()
is reduced from about 2% to well under 0.2%, 90% of the
remaining hits coming from ReferenceTypePropagation which
doesn't have access to the compilation unit.

Change-Id: Id9df61c79db9a67e3f12c857f32a4ca80e5420c3
compiler/driver/compiler_driver.cc
compiler/driver/compiler_driver.h
compiler/optimizing/instruction_builder.cc
compiler/optimizing/instruction_builder.h