diff options
Diffstat (limited to 'compiler/optimizing/nodes.cc')
-rw-r--r-- | compiler/optimizing/nodes.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/compiler/optimizing/nodes.cc b/compiler/optimizing/nodes.cc index cd36598171..4a574b0754 100644 --- a/compiler/optimizing/nodes.cc +++ b/compiler/optimizing/nodes.cc @@ -292,6 +292,15 @@ bool HGraph::AnalyzeNaturalLoops() const { return true; } +HNullConstant* HGraph::GetNullConstant() { + if (cached_null_constant_ == nullptr) { + cached_null_constant_ = new (arena_) HNullConstant(); + entry_block_->InsertInstructionBefore(cached_null_constant_, + entry_block_->GetLastInstruction()); + } + return cached_null_constant_; +} + void HLoopInformation::Add(HBasicBlock* block) { blocks_.SetBit(block->GetBlockId()); } |