diff options
author | Nicolas Geoffray <ngeoffray@google.com> | 2014-09-11 10:30:02 +0100 |
---|---|---|
committer | Nicolas Geoffray <ngeoffray@google.com> | 2014-09-11 10:32:12 +0100 |
commit | 8a16d97fb8f031822b206e65f9109a071da40563 (patch) | |
tree | 9dbbf5feaac15d2e4f54fbfc3c204fcdd6e8317a /compiler/optimizing/code_generator.cc | |
parent | c7f6b86c269727fe031146b9c18652d40916d46f (diff) | |
download | android_art-8a16d97fb8f031822b206e65f9109a071da40563.tar.gz android_art-8a16d97fb8f031822b206e65f9109a071da40563.tar.bz2 android_art-8a16d97fb8f031822b206e65f9109a071da40563.zip |
Fix valgrind errors.
For now just stack allocate the code generator. Will think
about cleaning up the root problem later (CodeGenerator being an
arena object).
Change-Id: I161a6f61c5f27ea88851b446f3c1e12ee9c594d7
Diffstat (limited to 'compiler/optimizing/code_generator.cc')
-rw-r--r-- | compiler/optimizing/code_generator.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/optimizing/code_generator.cc b/compiler/optimizing/code_generator.cc index 7731e6e982..2547a294d4 100644 --- a/compiler/optimizing/code_generator.cc +++ b/compiler/optimizing/code_generator.cc @@ -48,11 +48,11 @@ void CodeGenerator::CompileBaseline(CodeAllocator* allocator, bool is_leaf) { + 1 /* current method */); GenerateFrameEntry(); + HGraphVisitor* location_builder = GetLocationBuilder(); + HGraphVisitor* instruction_visitor = GetInstructionVisitor(); for (size_t i = 0, e = blocks.Size(); i < e; ++i) { HBasicBlock* block = blocks.Get(i); Bind(GetLabelOf(block)); - HGraphVisitor* location_builder = GetLocationBuilder(); - HGraphVisitor* instruction_visitor = GetInstructionVisitor(); for (HInstructionIterator it(block->GetInstructions()); !it.Done(); it.Advance()) { HInstruction* current = it.Current(); current->Accept(location_builder); @@ -77,10 +77,10 @@ void CodeGenerator::CompileOptimized(CodeAllocator* allocator) { block_labels_.SetSize(blocks.Size()); GenerateFrameEntry(); + HGraphVisitor* instruction_visitor = GetInstructionVisitor(); for (size_t i = 0, e = blocks.Size(); i < e; ++i) { HBasicBlock* block = blocks.Get(i); Bind(GetLabelOf(block)); - HGraphVisitor* instruction_visitor = GetInstructionVisitor(); for (HInstructionIterator it(block->GetInstructions()); !it.Done(); it.Advance()) { HInstruction* current = it.Current(); current->Accept(instruction_visitor); |