Flutter Engine
The Flutter Engine
Public Member Functions | Static Public Member Functions | List of all members
dart::UnaryIntegerOpInstr Class Reference

#include <il.h>

Inheritance diagram for dart::UnaryIntegerOpInstr:
dart::TemplateDefinition< 1, NoThrow, Pure > dart::PureDefinition dart::Definition dart::Instruction dart::ZoneAllocated dart::UnaryInt64OpInstr dart::UnarySmiOpInstr dart::UnaryUint32OpInstr

Public Member Functions

 UnaryIntegerOpInstr (Token::Kind op_kind, Value *value, intptr_t deopt_id)
 
Valuevalue () const
 
Token::Kind op_kind () const
 
virtual DefinitionCanonicalize (FlowGraph *flow_graph)
 
virtual bool AttributesEqual (const Instruction &other) const
 
virtual intptr_t DeoptimizationTarget () const
 
- Public Member Functions inherited from dart::TemplateDefinition< 1, NoThrow, Pure >
 TemplateDefinition (intptr_t deopt_id=DeoptId::kNone)
 
 TemplateDefinition (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::PureDefinition
 PureDefinition (intptr_t deopt_id)
 
 PureDefinition (const InstructionSource &source, intptr_t deopt_id)
 
virtual bool AllowsCSE () const
 
virtual bool HasUnknownSideEffects () const
 
- 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)
 

Static Public Member Functions

static UnaryIntegerOpInstrMake (Representation representation, Token::Kind op_kind, Value *value, intptr_t deopt_id, SpeculativeMode speculative_mode, Range *range)
 
- 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)
 

Additional Inherited Members

- Public Types inherited from dart::TemplateDefinition< 1, NoThrow, Pure >
using BaseClass = typename Pure< Definition, PureDefinition >::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 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::TemplateDefinition< 1, NoThrow, Pure >
EmbeddedArray< Value *, Ninputs_
 
- Protected Attributes inherited from dart::Definition
Rangerange_ = nullptr
 

Detailed Description

Definition at line 9225 of file il.h.

Constructor & Destructor Documentation

◆ UnaryIntegerOpInstr()

dart::UnaryIntegerOpInstr::UnaryIntegerOpInstr ( Token::Kind  op_kind,
Value value,
intptr_t  deopt_id 
)
inline

Definition at line 9227 of file il.h.

9228 : TemplateDefinition(deopt_id), op_kind_(op_kind) {
9229 ASSERT((op_kind == Token::kNEGATE) || (op_kind == Token::kBIT_NOT));
9230 SetInputAt(0, value);
9231 }
void SetInputAt(intptr_t i, Value *value)
Definition: il.h:1014
intptr_t deopt_id() const
Definition: il.h:993
TemplateDefinition(intptr_t deopt_id=DeoptId::kNone)
Definition: il.h:2749
Value * value() const
Definition: il.h:9240
Token::Kind op_kind() const
Definition: il.h:9241
#define ASSERT(E)

Member Function Documentation

◆ AttributesEqual()

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

Reimplemented from dart::Instruction.

Reimplemented in dart::UnaryInt64OpInstr.

Definition at line 9245 of file il.h.

9245 {
9246 return other.AsUnaryIntegerOp()->op_kind() == op_kind();
9247 }

◆ Canonicalize()

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

Reimplemented from dart::Definition.

Definition at line 2393 of file il.cc.

2393 {
2394 // If range analysis has already determined a single possible value for
2395 // this operation, then replace it if possible.
2397 const auto& value =
2399 auto* const replacement =
2400 flow_graph->TryCreateConstantReplacementFor(this, value);
2401 if (replacement != this) {
2402 return replacement;
2403 }
2404 }
2405
2406 return this;
2407}
Range * range() const
Definition: il.h:2636
virtual bool CanReplaceWithConstant() const
Definition: il.h:2599
static IntegerPtr NewCanonical(const String &str)
Definition: object.cc:22999
static Object & Handle()
Definition: object.h:407
static bool IsSingleton(Range *range)

◆ DeoptimizationTarget()

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

Reimplemented from dart::Instruction.

Definition at line 9249 of file il.h.

9249 {
9250 // Direct access since this instruction cannot deoptimize, and the deopt-id
9251 // was inherited from another instruction that could deoptimize.
9252 return GetDeoptId();
9253 }
intptr_t GetDeoptId() const
Definition: il.h:1409

◆ Make()

UnaryIntegerOpInstr * dart::UnaryIntegerOpInstr::Make ( Representation  representation,
Token::Kind  op_kind,
Value value,
intptr_t  deopt_id,
SpeculativeMode  speculative_mode,
Range range 
)
static

Definition at line 2257 of file il.cc.

2262 {
2263 UnaryIntegerOpInstr* op = nullptr;
2264 switch (representation) {
2265 case kTagged:
2266 op = new UnarySmiOpInstr(op_kind, value, deopt_id);
2267 break;
2268 case kUnboxedInt32:
2269 return nullptr;
2270 case kUnboxedUint32:
2271 op = new UnaryUint32OpInstr(op_kind, value, deopt_id);
2272 break;
2273 case kUnboxedInt64:
2274 op = new UnaryInt64OpInstr(op_kind, value, deopt_id, speculative_mode);
2275 break;
2276 default:
2277 UNREACHABLE();
2278 return nullptr;
2279 }
2280
2281 if (op == nullptr) {
2282 return op;
2283 }
2284
2285 if (!Range::IsUnknown(range)) {
2286 op->set_range(*range);
2287 }
2288
2289 ASSERT(op->representation() == representation);
2290 return op;
2291}
#define UNREACHABLE()
Definition: assert.h:248
virtual Representation representation() const
Definition: il.h:1260
static bool IsUnknown(const Range *other)
UnaryIntegerOpInstr(Token::Kind op_kind, Value *value, intptr_t deopt_id)
Definition: il.h:9227

◆ op_kind()

Token::Kind dart::UnaryIntegerOpInstr::op_kind ( ) const
inline

Definition at line 9241 of file il.h.

9241{ return op_kind_; }

◆ value()

Value * dart::UnaryIntegerOpInstr::value ( ) const
inline

Definition at line 9240 of file il.h.

9240{ return inputs_[0]; }
EmbeddedArray< Value *, N > inputs_
Definition: il.h:2762

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