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

#include <il.h>

Inheritance diagram for dart::Definition:
dart::Instruction dart::ZoneAllocated dart::AllocationInstr dart::ComparisonInstr dart::DropTempsInstr dart::IfThenElseInstr dart::PureDefinition dart::SimdOpInstr dart::VariadicDefinition dart::TemplateAllocation< 3 > dart::TemplateAllocation< 0 > dart::AllocateObjectInstr dart::ArrayAllocationInstr dart::TemplateAllocation< N > dart::PureComparison dart::TemplateDartCall< 0 > dart::TemplateDartCall< 1 > dart::FfiCallInstr dart::InvokeMathCFunctionInstr dart::LeafRuntimeCallInstr dart::MaterializeObjectInstr dart::PhiInstr dart::TemplateDartCall< kExtraInputs >

Public Member Functions

 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
 
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
 
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)
 

Static Public Member Functions

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

static constexpr intptr_t kReplacementMarker = -2
 
- Static Public Attributes inherited from dart::Instruction
static const intptr_t kInstructionAttrs [kNumInstructions]
 

Protected Member Functions

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

Rangerange_ = nullptr
 

Friends

class RangeAnalysis
 
class Value
 

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 >
 

Detailed Description

Definition at line 2468 of file il.h.

Constructor & Destructor Documentation

◆ Definition() [1/2]

dart::Definition::Definition ( intptr_t  deopt_id = DeoptId::kNone)
inlineexplicit

Definition at line 2470 of file il.h.

2471 : Instruction(deopt_id) {}
Instruction(const InstructionSource &source, intptr_t deopt_id=DeoptId::kNone)
Definition il.h:974
intptr_t deopt_id() const
Definition il.h:987

◆ Definition() [2/2]

dart::Definition::Definition ( const InstructionSource source,
intptr_t  deopt_id = DeoptId::kNone 
)
inlineexplicit

Definition at line 2473 of file il.h.

InstructionSource source() const
Definition il.h:1002

Member Function Documentation

◆ AddEnvUse()

void dart::Definition::AddEnvUse ( Value value)
inline

Definition at line 2568 of file il.h.

2568{ Value::AddToList(value, &env_use_list_); }
static void AddToList(Value *value, Value **list)
Definition il.cc:1437

◆ AddInputUse()

void dart::Definition::AddInputUse ( Value value)
inline

Definition at line 2567 of file il.h.

2567{ Value::AddToList(value, &input_use_list_); }

◆ AsDefinition() [1/2]

virtual Definition * dart::Definition::AsDefinition ( )
inlinevirtual

Definition at line 2665 of file il.h.

2665{ return this; }

◆ AsDefinition() [2/2]

virtual const Definition * dart::Definition::AsDefinition ( ) const
inlinevirtual

Definition at line 2666 of file il.h.

2666{ return this; }

◆ CallCount()

virtual intptr_t dart::Definition::CallCount ( ) const
inlinevirtual

Reimplemented in dart::ClosureCallInstr, dart::InstanceCallInstr, dart::PolymorphicInstanceCallInstr, and dart::StaticCallInstr.

Definition at line 2478 of file il.h.

2478{ return -1; }

◆ CanEliminate()

virtual bool dart::Definition::CanEliminate ( const BlockEntryInstr block) const
inlinevirtual

Reimplemented from dart::Instruction.

Definition at line 2585 of file il.h.

2585 {
2586 // Basic blocks should not end in a definition, so treat this as replacing
2587 // the definition with a constant (that is then unused).
2588 return CanReplaceWithConstant();
2589 }
virtual bool CanReplaceWithConstant() const
Definition il.h:2581

◆ Canonicalize()

Definition * dart::Definition::Canonicalize ( FlowGraph flow_graph)
virtual

◆ CanReplaceWithConstant()

virtual bool dart::Definition::CanReplaceWithConstant ( ) const
inlinevirtual

Reimplemented in dart::MaterializeObjectInstr.

Definition at line 2581 of file il.h.

2581 {
2582 return !MayHaveVisibleEffect() && !CanDeoptimize();
2583 }
virtual bool MayHaveVisibleEffect() const
Definition il.h:1346
bool CanDeoptimize() const
Definition il.h:1073

◆ ClearSSATempIndex()

void dart::Definition::ClearSSATempIndex ( )
inline

Definition at line 2491 of file il.h.

2491{ ssa_temp_index_ = -1; }

◆ ClearTempIndex()

void dart::Definition::ClearTempIndex ( )
inline

Definition at line 2482 of file il.h.

2482{ temp_index_ = -1; }

◆ ComputeType()

virtual CompileType dart::Definition::ComputeType ( ) const
inlinevirtual

◆ constant_value()

Object & dart::Definition::constant_value ( )

Definition at line 523 of file il.cc.

523 {
524 if (constant_value_ == nullptr) {
526 }
527 return *constant_value_;
528}
static Object & ZoneHandle()
Definition object.h:419

◆ env_use_list()

Value * dart::Definition::env_use_list ( ) const
inline

Definition at line 2560 of file il.h.

2560{ return env_use_list_; }

◆ HasOnlyInputUse()

bool dart::Definition::HasOnlyInputUse ( Value use) const

Definition at line 1480 of file il.cc.

1480 {
1481 return (input_use_list() == use) && (use->next_use() == nullptr);
1482}
Value * input_use_list() const
Definition il.h:2557

◆ HasOnlyUse()

bool dart::Definition::HasOnlyUse ( Value use) const

Definition at line 1468 of file il.cc.

1468 {
1469 if (!HasOnlyInputUse(use)) {
1470 return false;
1471 }
1472
1473 Instruction* target = use->instruction();
1474 for (Value::Iterator it(env_use_list()); !it.Done(); it.Advance()) {
1475 if (it.Current()->instruction() != target) return false;
1476 }
1477 return true;
1478}
Value * env_use_list() const
Definition il.h:2560
bool HasOnlyInputUse(Value *use) const
Definition il.cc:1480
uint32_t * target

◆ HasPairRepresentation()

bool dart::Definition::HasPairRepresentation ( ) const
inline

Definition at line 2499 of file il.h.

2499{ return location_count() == 2; }
intptr_t location_count() const
Definition il.h:2498

◆ HasSSATemp()

bool dart::Definition::HasSSATemp ( ) const
inline

Definition at line 2490 of file il.h.

2490{ return ssa_temp_index_ >= 0; }

◆ HasTemp()

bool dart::Definition::HasTemp ( ) const
inline

Definition at line 2483 of file il.h.

2483{ return temp_index_ >= 0; }

◆ HasType()

bool dart::Definition::HasType ( ) const
inline

Definition at line 2512 of file il.h.

2512{ return (type_ != nullptr); }

◆ HasUses()

bool dart::Definition::HasUses ( ) const
inline

Definition at line 2551 of file il.h.

2551 {
2552 return (input_use_list_ != nullptr) || (env_use_list_ != nullptr);
2553 }

◆ Identity()

virtual AliasIdentity dart::Definition::Identity ( ) const
inlinevirtual

Reimplemented in dart::StaticCallInstr, dart::CachableIdempotentCallInstr, and dart::AllocationInstr.

Definition at line 2642 of file il.h.

2642{ return AliasIdentity::Unknown(); }
static AliasIdentity Unknown()
Definition il.h:2399

◆ InferRange()

void dart::Definition::InferRange ( RangeAnalysis analysis,
Range range 
)
virtual

Reimplemented in dart::PhiInstr, and dart::IfThenElseInstr.

Definition at line 2650 of file range_analysis.cc.

2650 {
2651 if (Type()->ToCid() == kSmiCid) {
2653 } else if (IsInt64Definition()) {
2655 } else if (IsInt32Definition()) {
2657 } else if (Type()->IsInt()) {
2659 } else {
2660 // Only Smi and Mint supported.
2661 FATAL("Unsupported type in: %s", ToCString());
2662 }
2663
2664 // If the representation also gives us range information, then refine
2665 // the range from the type by using the intersection of the two.
2668 }
2669}
bool IsInt64Definition()
Definition il.h:8836
Range * range() const
Definition il.h:2618
CompileType * Type()
Definition il.h:2503
bool IsInt32Definition()
Definition il.h:2516
const char * ToCString() const
Range Intersect(const Range *other) const
static Range Full(RangeBoundary::RangeSize size)
#define FATAL(error)
static constexpr bool IsUnboxedInteger(Representation rep)
Definition locations.h:92

◆ input_use_list()

Value * dart::Definition::input_use_list ( ) const
inline

Definition at line 2557 of file il.h.

2557{ return input_use_list_; }

◆ input_uses()

ValueListIterable dart::Definition::input_uses ( ) const
inline

Definition at line 2563 of file il.h.

2563 {
2564 return ValueListIterable(input_use_list_);
2565 }

◆ IsArrayLength()

bool dart::Definition::IsArrayLength ( Definition def)
static

Definition at line 583 of file il.cc.

583 {
584 if (def != nullptr) {
585 if (auto load = def->OriginalDefinitionIgnoreBoxingAndConstraints()
586 ->AsLoadField()) {
587 return load->IsImmutableLengthLoad();
588 }
589 }
590 return false;
591}
SI T load(const P *ptr)

◆ IsInt32Definition()

bool dart::Definition::IsInt32Definition ( )
inline

Definition at line 2516 of file il.h.

2516 {
2517 return IsBinaryInt32Op() || IsBoxInt32() || IsUnboxInt32() ||
2518 IsIntConverter();
2519 }

◆ IsInt64Definition()

bool dart::Definition::IsInt64Definition ( )
inline

Definition at line 8836 of file il.h.

8836 {
8837 return (Type()->ToCid() == kMintCid) || IsBinaryInt64Op() ||
8838 IsUnaryInt64Op() || IsShiftInt64Op() || IsSpeculativeShiftInt64Op() ||
8839 IsBoxInt64() || IsUnboxInt64();
8840}

◆ location_count()

intptr_t dart::Definition::location_count ( ) const
inline

Definition at line 2498 of file il.h.

2498{ return LocationCount(representation()); }
intptr_t LocationCount(Representation rep)
Definition locations.h:75

◆ MayCreateUnsafeUntaggedPointer()

virtual bool dart::Definition::MayCreateUnsafeUntaggedPointer ( ) const
inlinevirtual

Reimplemented in dart::PhiInstr, dart::CachableIdempotentCallInstr, dart::FfiCallInstr, and dart::LeafRuntimeCallInstr.

Definition at line 2573 of file il.h.

2573 {
2574 // To ensure the default is safe, conservatively assume any untagged
2575 // result may be a GC-movable address.
2576 return representation() == kUntagged;
2577 }

◆ OriginalDefinition()

Definition * dart::Definition::OriginalDefinition ( )

Definition at line 530 of file il.cc.

530 {
531 Definition* defn = this;
532 Value* unwrapped;
533 while ((unwrapped = defn->RedefinedValue()) != nullptr) {
534 defn = unwrapped->definition();
535 }
536 return defn;
537}
Definition(intptr_t deopt_id=DeoptId::kNone)
Definition il.h:2470

◆ OriginalDefinitionIgnoreBoxingAndConstraints()

Definition * dart::Definition::OriginalDefinitionIgnoreBoxingAndConstraints ( )

Definition at line 567 of file il.cc.

567 {
568 Definition* def = this;
569 while (true) {
570 Definition* orig;
571 if (def->IsConstraint() || def->IsBox() || def->IsUnbox() ||
572 def->IsIntConverter() || def->IsFloatToDouble() ||
573 def->IsDoubleToFloat()) {
574 orig = def->InputAt(0)->definition();
575 } else {
576 orig = def->OriginalDefinition();
577 }
578 if (orig == def) return def;
579 def = orig;
580 }
581}

◆ range()

Range * dart::Definition::range ( ) const
inline

Definition at line 2618 of file il.h.

2618{ return range_; }
Range * range_
Definition il.h:2674

◆ RecomputeType()

virtual bool dart::Definition::RecomputeType ( )
inlinevirtual

Reimplemented in dart::PhiInstr.

Definition at line 2530 of file il.h.

2530{ return false; }

◆ RedefinedValue()

Value * dart::Definition::RedefinedValue ( ) const
virtual

Definition at line 539 of file il.cc.

539 {
540 return nullptr;
541}

◆ Replacement()

Definition * dart::Definition::Replacement ( )
inline

Definition at line 2628 of file il.h.

2628 {
2629 if (ssa_temp_index_ == kReplacementMarker) {
2630 return reinterpret_cast<Definition*>(temp_index_);
2631 }
2632 return this;
2633 }
static constexpr intptr_t kReplacementMarker
Definition il.h:2626

◆ ReplaceUsesWith()

void dart::Definition::ReplaceUsesWith ( Definition other)

Definition at line 1484 of file il.cc.

1484 {
1485 ASSERT(other != nullptr);
1486 ASSERT(this != other);
1487
1488 Value* current = nullptr;
1490 if (next != nullptr) {
1491 // Change all the definitions.
1492 while (next != nullptr) {
1493 current = next;
1494 current->set_definition(other);
1495 current->RefineReachingType(other->Type());
1496 next = current->next_use();
1497 }
1498
1499 // Concatenate the lists.
1500 next = other->input_use_list();
1501 current->set_next_use(next);
1502 if (next != nullptr) next->set_previous_use(current);
1503 other->set_input_use_list(input_use_list());
1504 set_input_use_list(nullptr);
1505 }
1506
1507 // Repeat for environment uses.
1508 current = nullptr;
1509 next = env_use_list();
1510 if (next != nullptr) {
1511 while (next != nullptr) {
1512 current = next;
1513 current->set_definition(other);
1514 current->RefineReachingType(other->Type());
1515 next = current->next_use();
1516 }
1517 next = other->env_use_list();
1518 current->set_next_use(next);
1519 if (next != nullptr) next->set_previous_use(current);
1520 other->set_env_use_list(env_use_list());
1521 set_env_use_list(nullptr);
1522 }
1523}
void set_input_use_list(Value *head)
Definition il.h:2558
void set_env_use_list(Value *head)
Definition il.h:2561
Instruction * next() const
Definition il.h:1087
#define ASSERT(E)

◆ ReplaceWith()

void dart::Definition::ReplaceWith ( Definition other,
ForwardInstructionIterator iterator 
)

Definition at line 1653 of file il.cc.

1654 {
1655 // Reuse this instruction's SSA name for other.
1656 ASSERT(!other->HasSSATemp());
1657 if (HasSSATemp()) {
1658 other->set_ssa_temp_index(ssa_temp_index());
1659 }
1660 ReplaceWithResult(other, other, iterator);
1661}
bool HasSSATemp() const
Definition il.h:2490
void ReplaceWithResult(Instruction *replacement, Definition *replacement_for_uses, ForwardInstructionIterator *iterator)
Definition il.cc:1623
intptr_t ssa_temp_index() const
Definition il.h:2485

◆ ReplaceWithResult()

void dart::Definition::ReplaceWithResult ( Instruction replacement,
Definition replacement_for_uses,
ForwardInstructionIterator iterator 
)

Definition at line 1623 of file il.cc.

1625 {
1626 // Record replacement's input uses.
1627 for (intptr_t i = replacement->InputCount() - 1; i >= 0; --i) {
1628 Value* input = replacement->InputAt(i);
1629 input->definition()->AddInputUse(input);
1630 }
1631 // Take replacement's environment from this definition.
1632 ASSERT(replacement->env() == nullptr);
1633 replacement->SetEnvironment(env());
1634 ClearEnv();
1635 // Replace all uses of this definition with replacement_for_uses.
1636 ReplaceUsesWith(replacement_for_uses);
1637
1638 // Finally replace this one with the replacement instruction in the graph.
1639 previous()->LinkTo(replacement);
1640 if ((iterator != nullptr) && (this == iterator->Current())) {
1641 // Remove through the iterator.
1642 replacement->LinkTo(this);
1643 iterator->RemoveCurrentFromGraph();
1644 } else {
1645 replacement->LinkTo(next());
1646 // Remove this definition's input uses.
1648 }
1649 set_previous(nullptr);
1650 set_next(nullptr);
1651}
void ReplaceUsesWith(Definition *other)
Definition il.cc:1484
void set_previous(Instruction *instr)
Definition il.h:1082
void LinkTo(Instruction *next)
Definition il.h:1102
Environment * env() const
Definition il.h:1209
void UnuseAllInputs()
Definition il.cc:1525
void set_next(Instruction *instr)
Definition il.h:1088
void ClearEnv()
Definition il.h:1358
Instruction * previous() const
Definition il.h:1081

◆ set_env_use_list()

void dart::Definition::set_env_use_list ( Value head)
inline

Definition at line 2561 of file il.h.

2561{ env_use_list_ = head; }

◆ set_input_use_list()

void dart::Definition::set_input_use_list ( Value head)
inline

Definition at line 2558 of file il.h.

2558{ input_use_list_ = head; }

◆ set_range()

void dart::Definition::set_range ( const Range range)

Definition at line 2643 of file range_analysis.cc.

2643 {
2644 if (range_ == nullptr) {
2645 range_ = new Range();
2646 }
2647 *range_ = range;
2648}

◆ set_ssa_temp_index()

void dart::Definition::set_ssa_temp_index ( intptr_t  index)
inline

Definition at line 2486 of file il.h.

2486 {
2487 ASSERT(index >= 0);
2488 ssa_temp_index_ = index;
2489 }

◆ set_temp_index()

void dart::Definition::set_temp_index ( intptr_t  index)
inline

Definition at line 2481 of file il.h.

2481{ temp_index_ = index; }

◆ set_type()

void dart::Definition::set_type ( CompileType type)
inlineprotected

Definition at line 2676 of file il.h.

2676 {
2677 ASSERT(type->owner() == this);
2678 type_ = type;
2679 }

◆ SetIdentity()

virtual void dart::Definition::SetIdentity ( AliasIdentity  identity)
inlinevirtual

Reimplemented in dart::StaticCallInstr, dart::CachableIdempotentCallInstr, and dart::AllocationInstr.

Definition at line 2644 of file il.h.

2644{ UNREACHABLE(); }
#define UNREACHABLE()
Definition assert.h:248

◆ SetReplacement()

void dart::Definition::SetReplacement ( Definition other)
inline

Definition at line 2635 of file il.h.

2635 {
2636 ASSERT(ssa_temp_index_ >= 0);
2638 ssa_temp_index_ = kReplacementMarker;
2639 temp_index_ = reinterpret_cast<intptr_t>(other);
2640 }
bool WasEliminated() const
Definition il.h:1256

◆ ssa_temp_index()

intptr_t dart::Definition::ssa_temp_index ( ) const
inline

Definition at line 2485 of file il.h.

2485{ return ssa_temp_index_; }

◆ temp_index()

intptr_t dart::Definition::temp_index ( ) const
inline

Definition at line 2480 of file il.h.

2480{ return temp_index_; }

◆ Type()

CompileType * dart::Definition::Type ( )
inline

Definition at line 2503 of file il.h.

2503 {
2504 if (type_ == nullptr) {
2505 auto type = new CompileType(ComputeType());
2506 type->set_owner(this);
2507 set_type(type);
2508 }
2509 return type_;
2510 }
virtual CompileType ComputeType() const
Definition il.h:2524
void set_type(CompileType *type)
Definition il.h:2676

◆ UpdateType()

PRINT_OPERANDS_TO_SUPPORT PRINT_TO_SUPPORT bool dart::Definition::UpdateType ( CompileType  new_type)
inline

Definition at line 2535 of file il.h.

2535 {
2536 if (type_ == nullptr) {
2537 auto type = new CompileType(new_type);
2538 type->set_owner(this);
2539 set_type(type);
2540 return true;
2541 }
2542
2543 if (type_->IsNone() || !type_->IsEqualTo(&new_type)) {
2544 *type_ = new_type;
2545 return true;
2546 }
2547
2548 return false;
2549 }
bool IsEqualTo(CompileType *other)
bool IsNone() const

◆ vreg()

intptr_t dart::Definition::vreg ( intptr_t  index) const
inline

Definition at line 2493 of file il.h.

2493 {
2494 ASSERT((index >= 0) && (index < location_count()));
2495 if (ssa_temp_index_ == -1) return -1;
2496 return ssa_temp_index_ * kMaxLocationCount + index;
2497 }
static constexpr intptr_t kMaxLocationCount
Definition locations.h:73

Friends And Related Symbol Documentation

◆ RangeAnalysis

friend class RangeAnalysis
friend

Definition at line 2671 of file il.h.

◆ Value

friend class Value
friend

Definition at line 2672 of file il.h.

Member Data Documentation

◆ kReplacementMarker

constexpr intptr_t dart::Definition::kReplacementMarker = -2
staticconstexpr

Definition at line 2626 of file il.h.

◆ range_

Range* dart::Definition::range_ = nullptr
protected

Definition at line 2674 of file il.h.


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