diff options
| author | 2014-05-07 09:33:54 +0000 | |
|---|---|---|
| committer | 2014-05-07 09:33:54 +0000 | |
| commit | f23a719218ffaa37a85482e40509e62275554774 (patch) | |
| tree | d04b4d12264758169a7d6c8ede2427f1078249f3 /compiler/optimizing/code_generator.cc | |
| parent | 290fda3acf3d9ce60f7ac3903fabfb01d3521d0f (diff) | |
| parent | 804d09372cc3d80d537da1489da4a45e0e19aa5d (diff) | |
Merge "Build live-in, live-out and kill sets for each block."
Diffstat (limited to 'compiler/optimizing/code_generator.cc')
| -rw-r--r-- | compiler/optimizing/code_generator.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler/optimizing/code_generator.cc b/compiler/optimizing/code_generator.cc index 8b85d71dae..bbebd3af24 100644 --- a/compiler/optimizing/code_generator.cc +++ b/compiler/optimizing/code_generator.cc @@ -30,12 +30,12 @@ namespace art { void CodeGenerator::Compile(CodeAllocator* allocator) { - const GrowableArray<HBasicBlock*>* blocks = GetGraph()->GetBlocks(); - DCHECK(blocks->Get(0) == GetGraph()->GetEntryBlock()); - DCHECK(GoesToNextBlock(GetGraph()->GetEntryBlock(), blocks->Get(1))); + const GrowableArray<HBasicBlock*>& blocks = GetGraph()->GetBlocks(); + DCHECK(blocks.Get(0) == GetGraph()->GetEntryBlock()); + DCHECK(GoesToNextBlock(GetGraph()->GetEntryBlock(), blocks.Get(1))); GenerateFrameEntry(); - for (size_t i = 0; i < blocks->Size(); i++) { - CompileBlock(blocks->Get(i)); + for (size_t i = 0, e = blocks.Size(); i < e; ++i) { + CompileBlock(blocks.Get(i)); } size_t code_size = GetAssembler()->CodeSize(); uint8_t* buffer = allocator->Allocate(code_size); |