summaryrefslogtreecommitdiff
path: root/compiler/optimizing/instruction_builder.h
diff options
context:
space:
mode:
authorVladimir Marko <vmarko@google.com>2018-10-31 14:33:58 +0000
committerVladimir Marko <vmarko@google.com>2018-11-01 12:22:49 +0000
commit3b5062083d3e203d1c72b066150b4fe441588a25 (patch)
treeaefb004034b634fe6a608cbd63f2c984f44752a5 /compiler/optimizing/instruction_builder.h
parenta2c211ca97cce4d900a6b2047049ffbe46fd5890 (diff)
ART: Cache resolved types in InstructionBuilder.
And avoid using the CompilerDriver for class resolution and retrieving CompilerOptions. Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Change-Id: Icec3de58456cfeaf3f2be6e57e037fdf45e8b851
Diffstat (limited to 'compiler/optimizing/instruction_builder.h')
-rw-r--r--compiler/optimizing/instruction_builder.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/optimizing/instruction_builder.h b/compiler/optimizing/instruction_builder.h
index 0ee026af23..21afd1166a 100644
--- a/compiler/optimizing/instruction_builder.h
+++ b/compiler/optimizing/instruction_builder.h
@@ -338,6 +338,10 @@ class HInstructionBuilder : public ValueObject {
ScopedArenaVector<HBasicBlock*> loop_headers_;
+ // Cached resolved types for the current compilation unit's DexFile.
+ // Handle<>s reference entries in the `handles_`.
+ ScopedArenaSafeMap<dex::TypeIndex, Handle<mirror::Class>> class_cache_;
+
static constexpr int kDefaultNumberOfLoops = 2;
DISALLOW_COPY_AND_ASSIGN(HInstructionBuilder);