Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
dart::ComparisonInstr Class Referenceabstract

#include <il.h>

Inheritance diagram for dart::ComparisonInstr:
dart::Definition dart::Instruction dart::ZoneAllocated dart::PureComparison

Public Member Functions

Valueleft () const
 
Valueright () const
 
virtual TokenPosition token_pos () const
 
Token::Kind kind () const
 
virtual ComparisonInstrCopyWithNewOperands (Value *left, Value *right)=0
 
virtual void EmitBranchCode (FlowGraphCompiler *compiler, BranchInstr *branch)
 
virtual Condition EmitComparisonCode (FlowGraphCompiler *compiler, BranchLabels labels)=0
 
virtual void EmitNativeCode (FlowGraphCompiler *compiler)
 
void SetDeoptId (const Instruction &instr)
 
void set_operation_cid (intptr_t value)
 
intptr_t operation_cid () const
 
virtual void NegateComparison ()
 
virtual bool CanBecomeDeoptimizationTarget () const
 
virtual intptr_t DeoptimizationTarget () const
 
virtual bool AttributesEqual (const Instruction &other) const
 
bool IsComparisonWithConstant (Value **other_operand, ConstantInstr **constant_operand)
 
 DECLARE_INSTRUCTION_SERIALIZABLE_FIELDS (ComparisonInstr, Definition, FIELD_LIST) protected
 
- Public Member Functions inherited from dart::Definition
 Definition (intptr_t deopt_id=DeoptId::kNone)
 
 Definition (const InstructionSource &source, intptr_t deopt_id=DeoptId::kNone)
 
virtual intptr_t CallCount () const
 
intptr_t temp_index () const
 
void set_temp_index (intptr_t index)
 
void ClearTempIndex ()
 
bool HasTemp () const
 
intptr_t ssa_temp_index () const
 
void set_ssa_temp_index (intptr_t index)
 
bool HasSSATemp () const
 
void ClearSSATempIndex ()
 
intptr_t vreg (intptr_t index) const
 
intptr_t location_count () const
 
bool HasPairRepresentation () const
 
CompileTypeType ()
 
bool HasType () const
 
bool IsInt64Definition ()
 
bool IsInt32Definition ()
 
virtual CompileType ComputeType () const
 
virtual bool RecomputeType ()
 
PRINT_OPERANDS_TO_SUPPORT PRINT_TO_SUPPORT bool UpdateType (CompileType new_type)
 
bool HasUses () const
 
bool HasOnlyUse (Value *use) const
 
bool HasOnlyInputUse (Value *use) const
 
Valueinput_use_list () const
 
void set_input_use_list (Value *head)
 
Valueenv_use_list () const
 
void set_env_use_list (Value *head)
 
ValueListIterable input_uses () const
 
void AddInputUse (Value *value)
 
void AddEnvUse (Value *value)
 
virtual bool MayCreateUnsafeUntaggedPointer () const
 
virtual bool CanReplaceWithConstant () const
 
virtual bool CanEliminate (const BlockEntryInstr *block) const
 
void ReplaceUsesWith (Definition *other)
 
void ReplaceWithResult (Instruction *replacement, Definition *replacement_for_uses, ForwardInstructionIterator *iterator)
 
void ReplaceWith (Definition *other, ForwardInstructionIterator *iterator)
 
Objectconstant_value ()
 
virtual void InferRange (RangeAnalysis *analysis, Range *range)
 
Rangerange () const
 
void set_range (const Range &)
 
virtual DefinitionCanonicalize (FlowGraph *flow_graph)
 
DefinitionReplacement ()
 
void SetReplacement (Definition *other)
 
virtual AliasIdentity Identity () const
 
virtual void SetIdentity (AliasIdentity identity)
 
DefinitionOriginalDefinition ()
 
virtual ValueRedefinedValue () const
 
DefinitionOriginalDefinitionIgnoreBoxingAndConstraints ()
 
virtual DefinitionAsDefinition ()
 
virtual const DefinitionAsDefinition () 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)
 

Additional Inherited Members

- 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::Definition
static bool IsArrayLength (Definition *def)
 
- 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::Definition
static constexpr intptr_t kReplacementMarker = -2
 
- Static Public Attributes inherited from dart::Instruction
static const intptr_t kInstructionAttrs [kNumInstructions]
 
- Protected Member Functions inherited from dart::Definition
void set_type (CompileType *type)
 
- 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::Definition
Rangerange_ = nullptr
 

Detailed Description

Definition at line 3844 of file il.h.

Member Function Documentation

◆ AttributesEqual()

virtual bool dart::ComparisonInstr::AttributesEqual ( const Instruction other) const
inlinevirtual

Reimplemented from dart::Instruction.

Definition at line 3885 of file il.h.

3885 {
3886 auto const other_comparison = other.AsComparison();
3887 return kind() == other_comparison->kind() &&
3888 (operation_cid() == other_comparison->operation_cid());
3889 }
intptr_t operation_cid() const
Definition: il.h:3878
Token::Kind kind() const
Definition: il.h:3850

◆ CanBecomeDeoptimizationTarget()

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

Reimplemented from dart::Instruction.

Definition at line 3882 of file il.h.

3882{ return true; }

◆ CopyWithNewOperands()

virtual ComparisonInstr * dart::ComparisonInstr::CopyWithNewOperands ( Value left,
Value right 
)
pure virtual

◆ DECLARE_INSTRUCTION_SERIALIZABLE_FIELDS()

dart::ComparisonInstr::DECLARE_INSTRUCTION_SERIALIZABLE_FIELDS ( ComparisonInstr  ,
Definition  ,
FIELD_LIST   
)
inline

Definition at line 3914 of file il.h.

3919 :
3920 ComparisonInstr(const InstructionSource& source,
3922 intptr_t deopt_id = DeoptId::kNone)
3924 token_pos_(source.token_pos),
3925 kind_(kind),
3926 operation_cid_(kIllegalCid) {}
virtual TokenPosition token_pos() const
Definition: il.h:3849
Definition(intptr_t deopt_id=DeoptId::kNone)
Definition: il.h:2488
static constexpr intptr_t kNone
Definition: deopt_id.h:27
friend class ComparisonInstr
Definition: il.h:1401
InstructionSource source() const
Definition: il.h:1008
intptr_t deopt_id() const
Definition: il.h:993
@ kIllegalCid
Definition: class_id.h:214

◆ DeoptimizationTarget()

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

Reimplemented from dart::Instruction.

Definition at line 3883 of file il.h.

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

◆ EmitBranchCode()

virtual void dart::ComparisonInstr::EmitBranchCode ( FlowGraphCompiler compiler,
BranchInstr branch 
)
virtual

◆ EmitComparisonCode()

virtual Condition dart::ComparisonInstr::EmitComparisonCode ( FlowGraphCompiler compiler,
BranchLabels  labels 
)
pure virtual

◆ EmitNativeCode()

virtual void dart::ComparisonInstr::EmitNativeCode ( FlowGraphCompiler compiler)
virtual

Reimplemented from dart::Instruction.

◆ IsComparisonWithConstant()

bool dart::ComparisonInstr::IsComparisonWithConstant ( Value **  other_operand,
ConstantInstr **  constant_operand 
)
inline

Definition at line 3893 of file il.h.

3894 {
3895 if (right()->BindsToConstant(constant_operand)) {
3896 *other_operand = left();
3897 return true;
3898 } else if (left()->BindsToConstant(constant_operand)) {
3899 *other_operand = right();
3900 return true;
3901 } else {
3902 return false;
3903 }
3904 }
Value * right() const
Definition: il.h:3847
Value * left() const
Definition: il.h:3846

◆ kind()

Token::Kind dart::ComparisonInstr::kind ( ) const
inline

Definition at line 3850 of file il.h.

3850{ return kind_; }

◆ left()

Value * dart::ComparisonInstr::left ( ) const
inline

Definition at line 3846 of file il.h.

3846{ return InputAt(0); }
virtual Value * InputAt(intptr_t i) const =0

◆ NegateComparison()

virtual void dart::ComparisonInstr::NegateComparison ( )
inlinevirtual

Definition at line 3880 of file il.h.

3880{ kind_ = Token::NegateComparison(kind_); }
static Token::Kind NegateComparison(Token::Kind op)
Definition: token.h:322

◆ operation_cid()

intptr_t dart::ComparisonInstr::operation_cid ( ) const
inline

Definition at line 3878 of file il.h.

3878{ return operation_cid_; }

◆ right()

Value * dart::ComparisonInstr::right ( ) const
inline

Definition at line 3847 of file il.h.

3847{ return InputAt(1); }

◆ set_operation_cid()

void dart::ComparisonInstr::set_operation_cid ( intptr_t  value)
inline

Definition at line 3877 of file il.h.

3877{ operation_cid_ = value; }
uint8_t value

◆ SetDeoptId()

void dart::ComparisonInstr::SetDeoptId ( const Instruction instr)
inline

Definition at line 3874 of file il.h.

3874{ CopyDeoptIdFrom(instr); }
virtual void CopyDeoptIdFrom(const Instruction &instr)
Definition: il.h:1411

◆ token_pos()

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

Reimplemented from dart::Instruction.

Definition at line 3849 of file il.h.

3849{ return token_pos_; }

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