Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
dart::GotoInstr Class Reference

#include <il.h>

Inheritance diagram for dart::GotoInstr:
dart::TemplateInstruction< 0, NoThrow >

Public Member Functions

 GotoInstr (JoinEntryInstr *entry, intptr_t deopt_id)
 
BlockEntryInstrblock () const
 
void set_block (BlockEntryInstr *block)
 
JoinEntryInstrsuccessor () const
 
void set_successor (JoinEntryInstr *successor)
 
virtual intptr_t SuccessorCount () const
 
virtual BlockEntryInstrSuccessorAt (intptr_t index) const
 
double edge_weight () const
 
void set_edge_weight (double weight)
 
void adjust_edge_weight (double scale_factor)
 
virtual bool CanBecomeDeoptimizationTarget () const
 
virtual intptr_t DeoptimizationTarget () const
 
virtual bool ComputeCanDeoptimize () const
 
virtual bool HasUnknownSideEffects () const
 
ParallelMoveInstrparallel_move () const
 
bool HasParallelMove () const
 
bool HasNonRedundantParallelMove () const
 
ParallelMoveInstrGetParallelMove ()
 
virtual TokenPosition token_pos () const
 
 DISALLOW_COPY_AND_ASSIGN (GotoInstr)
 
- Public Member Functions inherited from dart::TemplateInstruction< 0, NoThrow >
 TemplateInstruction (intptr_t deopt_id=DeoptId::kNone)
 
 TemplateInstruction (const InstructionSource &source, intptr_t deopt_id=DeoptId::kNone)
 
virtual intptr_t InputCount () const
 
virtual ValueInputAt (intptr_t i) const
 
virtual bool MayThrow () const
 

Public Attributes

DECLARE_INSTRUCTION_SERIALIZABLE_FIELDS(GotoInstr, TemplateInstruction, FIELD_LIST) DECLARE_EXTRA_SERIALIZATION private JoinEntryInstrsuccessor_ = nullptr
 

Additional Inherited Members

- Public Types inherited from dart::TemplateInstruction< 0, NoThrow >
using BaseClass = typename NoCSE< Instruction, PureInstruction >::Base
 
- Protected Attributes inherited from dart::TemplateInstruction< 0, NoThrow >
EmbeddedArray< Value *, Ninputs_
 

Detailed Description

Definition at line 3682 of file il.h.

Constructor & Destructor Documentation

◆ GotoInstr()

dart::GotoInstr::GotoInstr ( JoinEntryInstr entry,
intptr_t  deopt_id 
)
inlineexplicit

Definition at line 3684 of file il.h.

3685 : TemplateInstruction(deopt_id),
3686 edge_weight_(0.0),
3687 parallel_move_(nullptr),
3688 successor_(entry) {}
DECLARE_INSTRUCTION_SERIALIZABLE_FIELDS(GotoInstr, TemplateInstruction, FIELD_LIST) DECLARE_EXTRA_SERIALIZATION private JoinEntryInstr * successor_
Definition il.h:3752
TemplateInstruction(intptr_t deopt_id=DeoptId::kNone)
Definition il.h:1501

Member Function Documentation

◆ adjust_edge_weight()

void dart::GotoInstr::adjust_edge_weight ( double  scale_factor)
inline

Definition at line 3702 of file il.h.

3702{ edge_weight_ *= scale_factor; }

◆ block()

BlockEntryInstr * dart::GotoInstr::block ( ) const
inline

Definition at line 3692 of file il.h.

3692{ return block_; }

◆ CanBecomeDeoptimizationTarget()

virtual bool dart::GotoInstr::CanBecomeDeoptimizationTarget ( ) const
inlinevirtual

Definition at line 3704 of file il.h.

3704 {
3705 // Goto instruction can be used as a deoptimization target when LICM
3706 // hoists instructions out of the loop.
3707 return true;
3708 }

◆ ComputeCanDeoptimize()

virtual bool dart::GotoInstr::ComputeCanDeoptimize ( ) const
inlinevirtual

Definition at line 3713 of file il.h.

3713{ return false; }

◆ DeoptimizationTarget()

virtual intptr_t dart::GotoInstr::DeoptimizationTarget ( ) const
inlinevirtual

Definition at line 3711 of file il.h.

3711{ return GetDeoptId(); }

◆ DISALLOW_COPY_AND_ASSIGN()

dart::GotoInstr::DISALLOW_COPY_AND_ASSIGN ( GotoInstr  )

◆ edge_weight()

double dart::GotoInstr::edge_weight ( ) const
inline

Definition at line 3700 of file il.h.

3700{ return edge_weight_; }

◆ GetParallelMove()

ParallelMoveInstr * dart::GotoInstr::GetParallelMove ( )
inline

Definition at line 3725 of file il.h.

3725 {
3726 if (parallel_move_ == nullptr) {
3727 parallel_move_ = new ParallelMoveInstr();
3728 }
3729 return parallel_move_;
3730 }

◆ HasNonRedundantParallelMove()

bool dart::GotoInstr::HasNonRedundantParallelMove ( ) const
inline

Definition at line 3721 of file il.h.

3721 {
3722 return HasParallelMove() && !parallel_move()->IsRedundant();
3723 }
ParallelMoveInstr * parallel_move() const
Definition il.h:3717
bool HasParallelMove() const
Definition il.h:3719
bool IsRedundant() const
Definition il.cc:4925

◆ HasParallelMove()

bool dart::GotoInstr::HasParallelMove ( ) const
inline

Definition at line 3719 of file il.h.

3719{ return parallel_move_ != nullptr; }

◆ HasUnknownSideEffects()

virtual bool dart::GotoInstr::HasUnknownSideEffects ( ) const
inlinevirtual

Definition at line 3715 of file il.h.

3715{ return false; }

◆ parallel_move()

ParallelMoveInstr * dart::GotoInstr::parallel_move ( ) const
inline

Definition at line 3717 of file il.h.

3717{ return parallel_move_; }

◆ set_block()

void dart::GotoInstr::set_block ( BlockEntryInstr block)
inline

Definition at line 3693 of file il.h.

3693{ block_ = block; }
BlockEntryInstr * block() const
Definition il.h:3692

◆ set_edge_weight()

void dart::GotoInstr::set_edge_weight ( double  weight)
inline

Definition at line 3701 of file il.h.

3701{ edge_weight_ = weight; }

◆ set_successor()

void dart::GotoInstr::set_successor ( JoinEntryInstr successor)
inline

Definition at line 3696 of file il.h.

3696{ successor_ = successor; }
JoinEntryInstr * successor() const
Definition il.h:3695

◆ successor()

JoinEntryInstr * dart::GotoInstr::successor ( ) const
inline

Definition at line 3695 of file il.h.

3695{ return successor_; }

◆ SuccessorAt()

BlockEntryInstr * dart::GotoInstr::SuccessorAt ( intptr_t  index) const
virtual

Definition at line 2016 of file il.cc.

2016 {
2017 ASSERT(index == 0);
2018 return successor();
2019}
#define ASSERT(E)

◆ SuccessorCount()

intptr_t dart::GotoInstr::SuccessorCount ( ) const
virtual

Definition at line 2012 of file il.cc.

2012 {
2013 return 1;
2014}

◆ token_pos()

virtual TokenPosition dart::GotoInstr::token_pos ( ) const
inlinevirtual

Definition at line 3732 of file il.h.

3732 {
3733 return TokenPosition::kControlFlow;
3734 }

Member Data Documentation

◆ successor_

Definition at line 3752 of file il.h.


The documentation for this class was generated from the following files: