Flutter Engine
The Flutter Engine
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 > dart::Instruction dart::ZoneAllocated

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 Member Functions inherited from dart::Instruction
 Instruction (const InstructionSource &source, intptr_t deopt_id=DeoptId::kNone)
 
 Instruction (intptr_t deopt_id=DeoptId::kNone)
 
virtual ~Instruction ()
 
virtual Tag tag () const =0
 
virtual intptr_t statistics_tag () const
 
intptr_t deopt_id () const
 
virtual TokenPosition token_pos () const
 
InstructionSource source () const
 
virtual intptr_t InputCount () const =0
 
virtual ValueInputAt (intptr_t i) const =0
 
void SetInputAt (intptr_t i, Value *value)
 
InputsIterable inputs ()
 
void UnuseAllInputs ()
 
virtual intptr_t ArgumentCount () const
 
ValueArgumentValueAt (intptr_t index) const
 
DefinitionArgumentAt (intptr_t index) const
 
virtual void SetMoveArguments (MoveArgumentsArray *move_arguments)
 
virtual MoveArgumentsArrayGetMoveArguments () const
 
virtual void ReplaceInputsWithMoveArguments (MoveArgumentsArray *move_arguments)
 
bool HasMoveArguments () const
 
void RepairArgumentUsesInEnvironment () const
 
virtual bool ComputeCanDeoptimize () const =0
 
virtual bool ComputeCanDeoptimizeAfterCall () const
 
bool CanDeoptimize () const
 
virtual void Accept (InstructionVisitor *visitor)=0
 
Instructionprevious () const
 
void set_previous (Instruction *instr)
 
Instructionnext () const
 
void set_next (Instruction *instr)
 
void LinkTo (Instruction *next)
 
InstructionRemoveFromGraph (bool return_previous=true)
 
virtual intptr_t SuccessorCount () const
 
virtual BlockEntryInstrSuccessorAt (intptr_t index) const
 
SuccessorsIterable successors () const
 
void Goto (JoinEntryInstr *entry)
 
virtual const char * DebugName () const =0
 
void CheckField (const Field &field) const
 
const char * ToCString () const
 
 DECLARE_INSTRUCTION_TYPE_CHECK (BlockEntryWithInitialDefs, BlockEntryWithInitialDefs) template< typename T > T *Cast()
 
template<typename T >
const TCast () const
 
LocationSummarylocs ()
 
bool HasLocs () const
 
virtual LocationSummaryMakeLocationSummary (Zone *zone, bool is_optimizing) const =0
 
void InitializeLocationSummary (Zone *zone, bool optimizing)
 
virtual void EmitNativeCode (FlowGraphCompiler *compiler)
 
Environmentenv () const
 
void SetEnvironment (Environment *deopt_env)
 
void RemoveEnvironment ()
 
void ReplaceInEnvironment (Definition *current, Definition *replacement)
 
virtual intptr_t NumberOfInputsConsumedBeforeCall () const
 
intptr_t GetPassSpecificId (CompilerPass::Id pass) const
 
void SetPassSpecificId (CompilerPass::Id pass, intptr_t id)
 
bool HasPassSpecificId (CompilerPass::Id pass) const
 
bool HasUnmatchedInputRepresentations () const
 
virtual Representation RequiredInputRepresentation (intptr_t idx) const
 
SpeculativeMode SpeculativeModeOfInputs () const
 
virtual SpeculativeMode SpeculativeModeOfInput (intptr_t index) const
 
virtual Representation representation () const
 
bool WasEliminated () const
 
virtual intptr_t DeoptimizationTarget () const
 
virtual InstructionCanonicalize (FlowGraph *flow_graph)
 
void InsertBefore (Instruction *next)
 
void InsertAfter (Instruction *prev)
 
InstructionAppendInstruction (Instruction *tail)
 
virtual bool AllowsCSE () const
 
virtual bool HasUnknownSideEffects () const =0
 
virtual bool CanCallDart () const
 
virtual bool CanTriggerGC () const
 
virtual BlockEntryInstrGetBlock ()
 
virtual intptr_t inlining_id () const
 
virtual void set_inlining_id (intptr_t value)
 
virtual bool has_inlining_id () const
 
virtual uword Hash () const
 
bool Equals (const Instruction &other) const
 
virtual bool AttributesEqual (const Instruction &other) const
 
void InheritDeoptTarget (Zone *zone, Instruction *other)
 
bool NeedsEnvironment () const
 
virtual bool CanBecomeDeoptimizationTarget () const
 
void InheritDeoptTargetAfter (FlowGraph *flow_graph, Definition *call, Definition *result)
 
virtual bool MayThrow () const =0
 
virtual bool MayHaveVisibleEffect () const
 
virtual bool CanEliminate (const BlockEntryInstr *block) const
 
bool CanEliminate ()
 
bool IsDominatedBy (Instruction *dom)
 
void ClearEnv ()
 
void Unsupported (FlowGraphCompiler *compiler)
 
virtual bool UseSharedSlowPathStub (bool is_optimizing) const
 
Location::Kind RegisterKindForResult () const
 
- Public Member Functions inherited from dart::ZoneAllocated
 ZoneAllocated ()
 
void * operator new (size_t size)
 
void * operator new (size_t size, Zone *zone)
 
void operator delete (void *pointer)
 

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
 
- Public Types inherited from dart::Instruction
enum  Tag { FOR_EACH_INSTRUCTION =(DECLARE_TAG) kNumInstructions }
 
enum  SpeculativeMode { kGuardInputs , kNotSpeculative }
 
using InputsIterable = InstructionIndexedPropertyIterable< InputsTrait >
 
using SuccessorsIterable = InstructionIndexedPropertyIterable< SuccessorsTrait >
 
- Static Public Member Functions inherited from dart::Instruction
static const ICDataGetICData (const ZoneGrowableArray< const ICData * > &ic_data_array, intptr_t deopt_id, bool is_static_call)
 
static LocationSummaryMakeCallSummary (Zone *zone, const Instruction *instr, LocationSummary *locs=nullptr)
 
static bool SlowPathSharingSupported (bool is_optimizing)
 
- Static Public Attributes inherited from dart::Instruction
static const intptr_t kInstructionAttrs [kNumInstructions]
 
- Protected Member Functions inherited from dart::Instruction
intptr_t GetDeoptId () const
 
virtual void CopyDeoptIdFrom (const Instruction &instr)
 
void WriteExtraWithoutInputs (FlowGraphSerializer *s)
 
void ReadExtraWithoutInputs (FlowGraphDeserializer *d)
 
- Protected Attributes inherited from dart::TemplateInstruction< 0, NoThrow >
EmbeddedArray< Value *, Ninputs_
 

Detailed Description

Definition at line 3700 of file il.h.

Constructor & Destructor Documentation

◆ GotoInstr()

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

Definition at line 3702 of file il.h.

3704 edge_weight_(0.0),
3705 parallel_move_(nullptr),
3706 successor_(entry) {}
DECLARE_INSTRUCTION_SERIALIZABLE_FIELDS(GotoInstr, TemplateInstruction, FIELD_LIST) DECLARE_EXTRA_SERIALIZATION private JoinEntryInstr * successor_
Definition: il.h:3770
intptr_t deopt_id() const
Definition: il.h:993
TemplateInstruction(intptr_t deopt_id=DeoptId::kNone)
Definition: il.h:1507

Member Function Documentation

◆ adjust_edge_weight()

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

Definition at line 3720 of file il.h.

3720{ edge_weight_ *= scale_factor; }

◆ block()

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

Definition at line 3710 of file il.h.

3710{ return block_; }

◆ CanBecomeDeoptimizationTarget()

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

Reimplemented from dart::Instruction.

Definition at line 3722 of file il.h.

3722 {
3723 // Goto instruction can be used as a deoptimization target when LICM
3724 // hoists instructions out of the loop.
3725 return true;
3726 }

◆ ComputeCanDeoptimize()

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

Implements dart::Instruction.

Definition at line 3731 of file il.h.

3731{ return false; }

◆ DeoptimizationTarget()

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

Reimplemented from dart::Instruction.

Definition at line 3729 of file il.h.

3729{ return GetDeoptId(); }
intptr_t GetDeoptId() const
Definition: il.h:1409

◆ DISALLOW_COPY_AND_ASSIGN()

dart::GotoInstr::DISALLOW_COPY_AND_ASSIGN ( GotoInstr  )

◆ edge_weight()

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

Definition at line 3718 of file il.h.

3718{ return edge_weight_; }

◆ GetParallelMove()

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

Definition at line 3743 of file il.h.

3743 {
3744 if (parallel_move_ == nullptr) {
3745 parallel_move_ = new ParallelMoveInstr();
3746 }
3747 return parallel_move_;
3748 }

◆ HasNonRedundantParallelMove()

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

Definition at line 3739 of file il.h.

3739 {
3740 return HasParallelMove() && !parallel_move()->IsRedundant();
3741 }
ParallelMoveInstr * parallel_move() const
Definition: il.h:3735
bool HasParallelMove() const
Definition: il.h:3737
bool IsRedundant() const
Definition: il.cc:4929

◆ HasParallelMove()

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

Definition at line 3737 of file il.h.

3737{ return parallel_move_ != nullptr; }

◆ HasUnknownSideEffects()

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

Implements dart::Instruction.

Definition at line 3733 of file il.h.

3733{ return false; }

◆ parallel_move()

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

Definition at line 3735 of file il.h.

3735{ return parallel_move_; }

◆ set_block()

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

Definition at line 3711 of file il.h.

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

◆ set_edge_weight()

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

Definition at line 3719 of file il.h.

3719{ edge_weight_ = weight; }

◆ set_successor()

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

Definition at line 3714 of file il.h.

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

◆ successor()

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

Definition at line 3713 of file il.h.

3713{ return successor_; }

◆ SuccessorAt()

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

Reimplemented from dart::Instruction.

Definition at line 2025 of file il.cc.

2025 {
2026 ASSERT(index == 0);
2027 return successor();
2028}
#define ASSERT(E)

◆ SuccessorCount()

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

Reimplemented from dart::Instruction.

Definition at line 2021 of file il.cc.

2021 {
2022 return 1;
2023}

◆ token_pos()

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

Reimplemented from dart::Instruction.

Definition at line 3750 of file il.h.

3750 {
3751 return TokenPosition::kControlFlow;
3752 }

Member Data Documentation

◆ successor_

Definition at line 3770 of file il.h.


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