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>
Tue, 19 Apr 2016 14:09:02 +0000 (15:09 +0100)
commit116e6e2f36e82156d54f2505909be0a6b2b7247d
tree6c8a449293d9d9afb69c2205bc9eb3db89cf3be8
parent78d7c8826d5cca583202085dfde382fb6fcc1629
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.

Bug: 28173563

(cherry picked from commit 3cd50df11b3076b801954018236c366fd9b97948)

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