diff options
author | Nicolas Geoffray <ngeoffray@google.com> | 2014-05-02 08:46:00 +0100 |
---|---|---|
committer | Nicolas Geoffray <ngeoffray@google.com> | 2014-05-07 10:32:11 +0100 |
commit | 804d09372cc3d80d537da1489da4a45e0e19aa5d (patch) | |
tree | b226350fdf3dc0c55a11e1615010c8475f167f90 /compiler/optimizing/code_generator.cc | |
parent | 0095e0b8380a8802f40a21928800b9df6e11f1d7 (diff) | |
download | art-804d09372cc3d80d537da1489da4a45e0e19aa5d.zip art-804d09372cc3d80d537da1489da4a45e0e19aa5d.tar.gz art-804d09372cc3d80d537da1489da4a45e0e19aa5d.tar.bz2 |
Build live-in, live-out and kill sets for each block.
This information will be used when computing live ranges of
instructions.
Change-Id: I345ee833c1ccb4a8e725c7976453f6d58d350d74
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 8b85d71..bbebd3a 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); |