diff options
Diffstat (limited to 'compiler/optimizing/builder.h')
-rw-r--r-- | compiler/optimizing/builder.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/compiler/optimizing/builder.h b/compiler/optimizing/builder.h index 58d85e9ef1..cae762b49f 100644 --- a/compiler/optimizing/builder.h +++ b/compiler/optimizing/builder.h @@ -97,10 +97,26 @@ class HGraphBuilder : public ValueObject { void MaybeUpdateCurrentBlock(size_t dex_pc); HBasicBlock* FindBlockStartingAt(int32_t dex_pc) const; HBasicBlock* FindOrCreateBlockStartingAt(int32_t dex_pc); + + // Returns whether the dex_pc of `block` lies within the given range. bool IsBlockInPcRange(HBasicBlock* block, uint32_t dex_pc_start, uint32_t dex_pc_end); + + // Adds new blocks to `branch_targets_` starting at the limits of TryItems and + // their exception handlers. void CreateBlocksForTryCatch(const DexFile::CodeItem& code_item); + + // Splits edges which cross the boundaries of TryItems, inserts TryBoundary + // instructions and links them to the corresponding catch blocks. void InsertTryBoundaryBlocks(const DexFile::CodeItem& code_item); + // Splits a single edge, inserting a TryBoundary of given `kind` and linking + // it to exception handlers of `try_item`. + void SplitTryBoundaryEdge(HBasicBlock* predecessor, + HBasicBlock* successor, + HTryBoundary::BoundaryKind kind, + const DexFile::CodeItem& code_item, + const DexFile::TryItem& try_item); + void InitializeLocals(uint16_t count); HLocal* GetLocalAt(int register_index) const; void UpdateLocal(int register_index, HInstruction* instruction) const; |