summaryrefslogtreecommitdiffstats
path: root/compiler/optimizing/builder.h
diff options
context:
space:
mode:
authorNicolas Geoffray <ngeoffray@google.com>2014-12-02 10:19:51 +0000
committerNicolas Geoffray <ngeoffray@google.com>2014-12-02 10:26:17 +0000
commit43a539f780af20a1854bca81c3d4835a585f0620 (patch)
tree241042d7f40dab9fbf24560624b6e8ddfe9c066e /compiler/optimizing/builder.h
parent05d5810c2b20ac83da82cef9a9677884af81147d (diff)
downloadart-43a539f780af20a1854bca81c3d4835a585f0620.tar.gz
art-43a539f780af20a1854bca81c3d4835a585f0620.tar.bz2
art-43a539f780af20a1854bca81c3d4835a585f0620.zip
Add some heursitics for compiling, close to Quick's.
Quick has more machinery to give up/not give up, but we can backport them later. Change-Id: I5eb62c664246f4ce46f0400cf24ec34a72afb51e
Diffstat (limited to 'compiler/optimizing/builder.h')
-rw-r--r--compiler/optimizing/builder.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/compiler/optimizing/builder.h b/compiler/optimizing/builder.h
index 25781b08f..8519bcba6 100644
--- a/compiler/optimizing/builder.h
+++ b/compiler/optimizing/builder.h
@@ -80,7 +80,13 @@ class HGraphBuilder : public ValueObject {
// Finds all instructions that start a new block, and populates branch_targets_ with
// the newly created blocks.
- void ComputeBranchTargets(const uint16_t* start, const uint16_t* end);
+ // As a side effect, also compute the number of dex instructions, blocks, and
+ // branches.
+ void ComputeBranchTargets(const uint16_t* start,
+ const uint16_t* end,
+ size_t* number_of_dex_instructions,
+ size_t* number_of_block,
+ size_t* number_of_branches);
void MaybeUpdateCurrentBlock(size_t index);
HBasicBlock* FindBlockStartingAt(int32_t index) const;