From 85d8c1ef43adec4f57c5ce372ef7816d13c98420 Mon Sep 17 00:00:00 2001 From: buzbee Date: Fri, 27 Jan 2012 15:52:35 -0800 Subject: Minor compiler tuning Large switch statements were getting bogged down in a linear search. Added a map for fast lookup (which may also be useful for debug support). Change-Id: I00e5956ea7e98ff2c870fb2d3e299e8d4c88f598 --- src/compiler/Frontend.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/compiler/Frontend.cc') diff --git a/src/compiler/Frontend.cc b/src/compiler/Frontend.cc index c5692bc10d..2a6714f35e 100644 --- a/src/compiler/Frontend.cc +++ b/src/compiler/Frontend.cc @@ -765,6 +765,8 @@ CompiledMethod* oatCompileMethod(const Compiler& compiler, const DexFile::CodeIt cUnit->numDalvikRegisters = code_item->registers_size_; cUnit->blockMap = std::map(); cUnit->blockMap.clear(); + cUnit->boundaryMap = std::map(); + cUnit->boundaryMap.clear(); bool useMatch = compilerMethodMatch.length() != 0; bool match = useMatch && (compilerFlipMatch ^ (PrettyMethod(method_idx, dex_file).find(compilerMethodMatch) != std::string::npos)); -- cgit v1.2.3-59-g8ed1b