| Index: runtime/vm/intermediate_language.h
|
| diff --git a/runtime/vm/intermediate_language.h b/runtime/vm/intermediate_language.h
|
| index d496fbf15b1b9803e2dacab76c0a79dd89538569..766a6836e4fad3bcfc72638c9fb21a20d0ab2c93 100644
|
| --- a/runtime/vm/intermediate_language.h
|
| +++ b/runtime/vm/intermediate_language.h
|
| @@ -104,7 +104,7 @@ class CompileType : public ZoneAllocated {
|
| static CompileType Create(intptr_t cid, const AbstractType& type);
|
|
|
| CompileType CopyNonNullable() const {
|
| - return CompileType(kNonNullable, kIllegalCid, type_);
|
| + return CompileType(kNonNullable, cid_, type_);
|
| }
|
|
|
| static CompileType CreateNullable(bool is_nullable, intptr_t cid) {
|
| @@ -157,10 +157,9 @@ class CompileType : public ZoneAllocated {
|
| bool IsNone() const { return (cid_ == kIllegalCid) && (type_ == NULL); }
|
|
|
| bool IsInt() {
|
| - return !is_nullable() &&
|
| - ((ToCid() == kSmiCid) || (ToCid() == kMintCid) ||
|
| - ((type_ != NULL) &&
|
| - (type_->Equals(Type::Handle(Type::Int64Type())))));
|
| + return !is_nullable() && ((ToCid() == kSmiCid) || (ToCid() == kMintCid) ||
|
| + ((type_ != NULL) &&
|
| + (type_->Equals(Type::Handle(Type::IntType())))));
|
| }
|
|
|
| void PrintTo(BufferFormatter* f) const;
|
| @@ -568,7 +567,7 @@ class Instruction : public ZoneAllocated {
|
| virtual Tag tag() const = 0;
|
|
|
| intptr_t deopt_id() const {
|
| - ASSERT(ComputeCanDeoptimize() || CanBecomeDeoptimizationTarget());
|
| + ASSERT(CanDeoptimize() || CanBecomeDeoptimizationTarget());
|
| return GetDeoptId();
|
| }
|
|
|
| @@ -599,14 +598,8 @@ class Instruction : public ZoneAllocated {
|
| }
|
| inline Definition* ArgumentAt(intptr_t index) const;
|
|
|
| - // Returns true, if this instruction can deoptimize with its current imputs.
|
| - // This property can change if we add or remove redefinitions that constrain
|
| - // the type or the range of input operands during compilation.
|
| - virtual bool ComputeCanDeoptimize() const = 0;
|
| -
|
| - // Once we removed the deopt environment, we assume that this
|
| - // instruction can't deoptimize.
|
| - bool CanDeoptimize() const { return env() != NULL && ComputeCanDeoptimize(); }
|
| + // Returns true, if this instruction can deoptimize.
|
| + virtual bool CanDeoptimize() const = 0;
|
|
|
| // Visiting support.
|
| virtual void Accept(FlowGraphVisitor* visitor) = 0;
|
| @@ -749,6 +742,8 @@ class Instruction : public ZoneAllocated {
|
| // instruction.
|
| Instruction* AppendInstruction(Instruction* tail);
|
|
|
| + virtual bool AllowsDCE() const { return false; }
|
| +
|
| // Returns true if CSE and LICM are allowed for this instruction.
|
| virtual bool AllowsCSE() const { return false; }
|
|
|
| @@ -796,7 +791,7 @@ class Instruction : public ZoneAllocated {
|
| virtual void InheritDeoptTarget(Zone* zone, Instruction* other);
|
|
|
| bool NeedsEnvironment() const {
|
| - return ComputeCanDeoptimize() || CanBecomeDeoptimizationTarget();
|
| + return CanDeoptimize() || CanBecomeDeoptimizationTarget();
|
| }
|
|
|
| virtual bool CanBecomeDeoptimizationTarget() const { return false; }
|
| @@ -977,7 +972,7 @@ class ParallelMoveInstr : public TemplateInstruction<0, NoThrow> {
|
|
|
| virtual intptr_t ArgumentCount() const { return 0; }
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
|
|
| virtual EffectSet Effects() const {
|
| UNREACHABLE(); // This instruction never visited by optimization passes.
|
| @@ -1109,7 +1104,7 @@ class BlockEntryInstr : public Instruction {
|
| return true;
|
| }
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
|
|
| virtual EffectSet Effects() const { return EffectSet::None(); }
|
| virtual EffectSet Dependencies() const { return EffectSet::None(); }
|
| @@ -1842,7 +1837,7 @@ class PhiInstr : public Definition {
|
|
|
| Value* InputAt(intptr_t i) const { return inputs_[i]; }
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
|
|
| virtual EffectSet Effects() const { return EffectSet::None(); }
|
|
|
| @@ -1937,7 +1932,7 @@ class ParameterInstr : public Definition {
|
| return NULL;
|
| }
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
|
|
| virtual EffectSet Effects() const { return EffectSet::None(); }
|
| virtual EffectSet Dependencies() const { return EffectSet::None(); }
|
| @@ -1974,7 +1969,7 @@ class PushArgumentInstr : public TemplateDefinition<1, NoThrow> {
|
|
|
| Value* value() const { return InputAt(0); }
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
|
|
| virtual EffectSet Effects() const { return EffectSet::None(); }
|
|
|
| @@ -2013,7 +2008,7 @@ class ReturnInstr : public TemplateInstruction<1, NoThrow> {
|
| return true;
|
| }
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
|
|
| virtual EffectSet Effects() const { return EffectSet::None(); }
|
|
|
| @@ -2036,7 +2031,7 @@ class ThrowInstr : public TemplateInstruction<0, Throws> {
|
|
|
| virtual TokenPosition token_pos() const { return token_pos_; }
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return true; }
|
| + virtual bool CanDeoptimize() const { return true; }
|
|
|
| virtual EffectSet Effects() const { return EffectSet::None(); }
|
|
|
| @@ -2063,7 +2058,7 @@ class ReThrowInstr : public TemplateInstruction<0, Throws> {
|
| virtual TokenPosition token_pos() const { return token_pos_; }
|
| intptr_t catch_try_index() const { return catch_try_index_; }
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return true; }
|
| + virtual bool CanDeoptimize() const { return true; }
|
|
|
| virtual EffectSet Effects() const { return EffectSet::None(); }
|
|
|
| @@ -2087,7 +2082,7 @@ class StopInstr : public TemplateInstruction<0, NoThrow> {
|
|
|
| virtual intptr_t ArgumentCount() const { return 0; }
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
|
|
| virtual EffectSet Effects() const { return EffectSet::None(); }
|
|
|
| @@ -2129,7 +2124,7 @@ class GotoInstr : public TemplateInstruction<0, NoThrow> {
|
| return true;
|
| }
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
|
|
| virtual EffectSet Effects() const { return EffectSet::None(); }
|
|
|
| @@ -2205,7 +2200,7 @@ class IndirectGotoInstr : public TemplateInstruction<1, NoThrow> {
|
| return successors_[index];
|
| }
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
| virtual bool CanBecomeDeoptimizationTarget() const { return false; }
|
|
|
| virtual EffectSet Effects() const { return EffectSet::None(); }
|
| @@ -2338,9 +2333,7 @@ class BranchInstr : public Instruction {
|
|
|
| virtual TokenPosition token_pos() const { return comparison_->token_pos(); }
|
|
|
| - virtual bool ComputeCanDeoptimize() const {
|
| - return comparison()->ComputeCanDeoptimize();
|
| - }
|
| + virtual bool CanDeoptimize() const { return comparison()->CanDeoptimize(); }
|
|
|
| virtual bool CanBecomeDeoptimizationTarget() const {
|
| return comparison()->CanBecomeDeoptimizationTarget();
|
| @@ -2401,7 +2394,7 @@ class DeoptimizeInstr : public TemplateInstruction<0, NoThrow, Pure> {
|
| DeoptimizeInstr(ICData::DeoptReasonId deopt_reason, intptr_t deopt_id)
|
| : TemplateInstruction(deopt_id), deopt_reason_(deopt_reason) {}
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return true; }
|
| + virtual bool CanDeoptimize() const { return true; }
|
|
|
| virtual bool AttributesEqual(Instruction* other) const { return true; }
|
|
|
| @@ -2432,7 +2425,7 @@ class RedefinitionInstr : public TemplateDefinition<1, NoThrow> {
|
| void set_constrained_type(CompileType* type) { constrained_type_ = type; }
|
| CompileType* constrained_type() const { return constrained_type_; }
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
| virtual EffectSet Dependencies() const { return EffectSet::None(); }
|
| virtual EffectSet Effects() const { return EffectSet::None(); }
|
|
|
| @@ -2453,7 +2446,7 @@ class ConstraintInstr : public TemplateDefinition<1, NoThrow> {
|
|
|
| virtual CompileType ComputeType() const;
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
|
|
| virtual EffectSet Effects() const { return EffectSet::None(); }
|
|
|
| @@ -2495,7 +2488,7 @@ class ConstantInstr : public TemplateDefinition<0, NoThrow, Pure> {
|
|
|
| const Object& value() const { return value_; }
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
|
|
| virtual void InferRange(RangeAnalysis* analysis, Range* range);
|
|
|
| @@ -2572,7 +2565,7 @@ class AssertAssignableInstr : public TemplateDefinition<2, Throws, Pure> {
|
| }
|
| const String& dst_name() const { return dst_name_; }
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return true; }
|
| + virtual bool CanDeoptimize() const { return true; }
|
|
|
| virtual bool CanBecomeDeoptimizationTarget() const {
|
| // AssertAssignable instructions that are specialized by the optimizer
|
| @@ -2609,7 +2602,7 @@ class AssertBooleanInstr : public TemplateDefinition<1, Throws, Pure> {
|
| virtual TokenPosition token_pos() const { return token_pos_; }
|
| Value* value() const { return inputs_[0]; }
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return true; }
|
| + virtual bool CanDeoptimize() const { return true; }
|
|
|
| virtual Definition* Canonicalize(FlowGraph* flow_graph);
|
|
|
| @@ -2634,7 +2627,7 @@ class CurrentContextInstr : public TemplateDefinition<0, NoThrow> {
|
| DECLARE_INSTRUCTION(CurrentContext)
|
| virtual CompileType ComputeType() const;
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
|
|
| virtual EffectSet Effects() const { return EffectSet::None(); }
|
| virtual EffectSet Dependencies() const { return EffectSet::None(); }
|
| @@ -2681,7 +2674,7 @@ class ClosureCallInstr : public TemplateDefinition<1, Throws> {
|
| // TODO(kmillikin): implement exact call counts for closure calls.
|
| virtual intptr_t CallCount() const { return 1; }
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return true; }
|
| + virtual bool CanDeoptimize() const { return true; }
|
|
|
| virtual EffectSet Effects() const { return EffectSet::All(); }
|
|
|
| @@ -2749,7 +2742,7 @@ class InstanceCallInstr : public TemplateDefinition<0, Throws> {
|
| bool has_unique_selector() const { return has_unique_selector_; }
|
| void set_has_unique_selector(bool b) { has_unique_selector_ = b; }
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return true; }
|
| + virtual bool CanDeoptimize() const { return true; }
|
|
|
| virtual Definition* Canonicalize(FlowGraph* flow_graph);
|
|
|
| @@ -2835,7 +2828,7 @@ class PolymorphicInstanceCallInstr : public TemplateDefinition<0, Throws> {
|
|
|
| const ICData& ic_data() const { return ic_data_; }
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return true; }
|
| + virtual bool CanDeoptimize() const { return true; }
|
|
|
| virtual EffectSet Effects() const { return EffectSet::All(); }
|
|
|
| @@ -2870,7 +2863,7 @@ class StrictCompareInstr : public TemplateComparison<2, NoThrow, Pure> {
|
|
|
| virtual CompileType ComputeType() const;
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
|
|
| virtual Definition* Canonicalize(FlowGraph* flow_graph);
|
|
|
| @@ -2915,7 +2908,7 @@ class TestSmiInstr : public TemplateComparison<2, NoThrow, Pure> {
|
|
|
| virtual CompileType ComputeType() const;
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
|
|
| virtual Representation RequiredInputRepresentation(intptr_t idx) const {
|
| return kTagged;
|
| @@ -2960,7 +2953,7 @@ class TestCidsInstr : public TemplateComparison<1, NoThrow, Pure> {
|
|
|
| virtual Definition* Canonicalize(FlowGraph* flow_graph);
|
|
|
| - virtual bool ComputeCanDeoptimize() const {
|
| + virtual bool CanDeoptimize() const {
|
| return GetDeoptId() != Thread::kNoDeoptId;
|
| }
|
|
|
| @@ -3007,7 +3000,7 @@ class EqualityCompareInstr : public TemplateComparison<2, NoThrow, Pure> {
|
|
|
| virtual CompileType ComputeType() const;
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
|
|
| virtual void EmitBranchCode(FlowGraphCompiler* compiler, BranchInstr* branch);
|
|
|
| @@ -3049,7 +3042,7 @@ class RelationalOpInstr : public TemplateComparison<2, NoThrow, Pure> {
|
|
|
| virtual CompileType ComputeType() const;
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
|
|
| virtual void EmitBranchCode(FlowGraphCompiler* compiler, BranchInstr* branch);
|
|
|
| @@ -3096,9 +3089,7 @@ class IfThenElseInstr : public Definition {
|
|
|
| Value* InputAt(intptr_t i) const { return comparison()->InputAt(i); }
|
|
|
| - virtual bool ComputeCanDeoptimize() const {
|
| - return comparison()->ComputeCanDeoptimize();
|
| - }
|
| + virtual bool CanDeoptimize() const { return comparison()->CanDeoptimize(); }
|
|
|
| virtual bool CanBecomeDeoptimizationTarget() const {
|
| return comparison()->CanBecomeDeoptimizationTarget();
|
| @@ -3215,7 +3206,7 @@ class StaticCallInstr : public TemplateDefinition<0, Throws> {
|
| return ic_data() == NULL ? 0 : ic_data()->AggregateCount();
|
| }
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return true; }
|
| + virtual bool CanDeoptimize() const { return true; }
|
|
|
| virtual bool CanBecomeDeoptimizationTarget() const {
|
| // Static calls that are specialized by the optimizer (e.g. sqrt) need a
|
| @@ -3266,7 +3257,7 @@ class LoadLocalInstr : public TemplateDefinition<0, NoThrow> {
|
|
|
| const LocalVariable& local() const { return local_; }
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
|
|
| virtual EffectSet Effects() const {
|
| UNREACHABLE(); // Eliminated by SSA construction.
|
| @@ -3312,7 +3303,7 @@ class DropTempsInstr : public Definition {
|
|
|
| virtual CompileType ComputeType() const;
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
|
|
| virtual EffectSet Effects() const {
|
| UNREACHABLE(); // Eliminated by SSA construction.
|
| @@ -3353,7 +3344,7 @@ class StoreLocalInstr : public TemplateDefinition<1, NoThrow> {
|
| const LocalVariable& local() const { return local_; }
|
| Value* value() const { return inputs_[0]; }
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
|
|
| void mark_dead() { is_dead_ = true; }
|
| bool is_dead() const { return is_dead_; }
|
| @@ -3410,7 +3401,7 @@ class NativeCallInstr : public TemplateDefinition<0, Throws> {
|
| bool link_lazily() const { return link_lazily_; }
|
| virtual TokenPosition token_pos() const { return token_pos_; }
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
|
|
| virtual EffectSet Effects() const { return EffectSet::All(); }
|
|
|
| @@ -3444,7 +3435,7 @@ class DebugStepCheckInstr : public TemplateInstruction<0, NoThrow> {
|
| DECLARE_INSTRUCTION(DebugStepCheck)
|
|
|
| virtual TokenPosition token_pos() const { return token_pos_; }
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
| virtual EffectSet Effects() const { return EffectSet::All(); }
|
| virtual Instruction* Canonicalize(FlowGraph* flow_graph);
|
|
|
| @@ -3510,7 +3501,7 @@ class StoreInstanceFieldInstr : public TemplateDefinition<2, NoThrow> {
|
| (emit_store_barrier_ == kEmitStoreBarrier);
|
| }
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
|
|
| // May require a deoptimization target for input conversions.
|
| virtual intptr_t DeoptimizationTarget() const { return GetDeoptId(); }
|
| @@ -3561,7 +3552,7 @@ class GuardFieldInstr : public TemplateInstruction<1, NoThrow, Pure> {
|
|
|
| const Field& field() const { return field_; }
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return true; }
|
| + virtual bool CanDeoptimize() const { return true; }
|
| virtual bool CanBecomeDeoptimizationTarget() const {
|
| // Ensure that we record kDeopt PC descriptor in unoptimized code.
|
| return true;
|
| @@ -3627,7 +3618,7 @@ class LoadStaticFieldInstr : public TemplateDefinition<1, NoThrow> {
|
|
|
| Value* field_value() const { return inputs_[0]; }
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
|
|
| virtual bool AllowsCSE() const { return StaticField().is_final(); }
|
| virtual EffectSet Effects() const { return EffectSet::None(); }
|
| @@ -3663,7 +3654,7 @@ class StoreStaticFieldInstr : public TemplateDefinition<1, NoThrow> {
|
| const Field& field() const { return field_; }
|
| Value* value() const { return inputs_[kValuePos]; }
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
|
|
| // Currently CSE/LICM don't operate on any instructions that can be affected
|
| // by stores/loads. LoadOptimizer handles loads separately. Hence stores
|
| @@ -3725,7 +3716,7 @@ class LoadIndexedInstr : public TemplateDefinition<2, NoThrow> {
|
| intptr_t class_id() const { return class_id_; }
|
| bool aligned() const { return alignment_ == kAlignedAccess; }
|
|
|
| - virtual bool ComputeCanDeoptimize() const {
|
| + virtual bool CanDeoptimize() const {
|
| return GetDeoptId() != Thread::kNoDeoptId;
|
| }
|
|
|
| @@ -3796,7 +3787,7 @@ class LoadCodeUnitsInstr : public TemplateDefinition<2, NoThrow> {
|
| return element_count() <= kSmiBits / (index_scale() * kBitsPerByte);
|
| }
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
|
|
| virtual Representation representation() const { return representation_; }
|
| void set_representation(Representation repr) { representation_ = repr; }
|
| @@ -3826,7 +3817,7 @@ class OneByteStringFromCharCodeInstr
|
|
|
| Value* char_code() const { return inputs_[0]; }
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
|
|
| virtual bool AttributesEqual(Instruction* other) const { return true; }
|
|
|
| @@ -3847,7 +3838,7 @@ class StringToCharCodeInstr : public TemplateDefinition<1, NoThrow, Pure> {
|
|
|
| Value* str() const { return inputs_[0]; }
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
|
|
| virtual bool AttributesEqual(Instruction* other) const {
|
| return other->AsStringToCharCode()->cid_ == cid_;
|
| @@ -3875,7 +3866,7 @@ class StringInterpolateInstr : public TemplateDefinition<1, Throws> {
|
| virtual CompileType ComputeType() const;
|
| // Issues a static call to Dart code which calls toString on objects.
|
| virtual EffectSet Effects() const { return EffectSet::All(); }
|
| - virtual bool ComputeCanDeoptimize() const { return true; }
|
| + virtual bool CanDeoptimize() const { return true; }
|
|
|
| const Function& CallFunction() const;
|
|
|
| @@ -3919,7 +3910,7 @@ class StoreIndexedInstr : public TemplateDefinition<3, NoThrow> {
|
| (emit_store_barrier_ == kEmitStoreBarrier);
|
| }
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
|
|
| virtual Representation RequiredInputRepresentation(intptr_t idx) const;
|
|
|
| @@ -3956,7 +3947,7 @@ class BooleanNegateInstr : public TemplateDefinition<1, NoThrow> {
|
|
|
| Value* value() const { return inputs_[0]; }
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
|
|
| virtual EffectSet Effects() const { return EffectSet::None(); }
|
|
|
| @@ -3991,7 +3982,7 @@ class InstanceOfInstr : public TemplateDefinition<2, Throws> {
|
| const AbstractType& type() const { return type_; }
|
| virtual TokenPosition token_pos() const { return token_pos_; }
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return true; }
|
| + virtual bool CanDeoptimize() const { return true; }
|
|
|
| virtual EffectSet Effects() const { return EffectSet::None(); }
|
|
|
| @@ -4037,7 +4028,7 @@ class AllocateObjectInstr : public TemplateDefinition<0, NoThrow> {
|
| closure_function_ ^= function.raw();
|
| }
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
|
|
| virtual EffectSet Effects() const { return EffectSet::None(); }
|
|
|
| @@ -4072,7 +4063,7 @@ class AllocateUninitializedContextInstr
|
| virtual TokenPosition token_pos() const { return token_pos_; }
|
| intptr_t num_context_variables() const { return num_context_variables_; }
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
|
|
| virtual EffectSet Effects() const { return EffectSet::None(); }
|
|
|
| @@ -4159,7 +4150,7 @@ class MaterializeObjectInstr : public Definition {
|
| return kNoRepresentation;
|
| }
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
| virtual EffectSet Effects() const { return EffectSet::None(); }
|
|
|
| Location* locations() { return locations_; }
|
| @@ -4216,7 +4207,7 @@ class CreateArrayInstr : public TemplateDefinition<2, Throws> {
|
|
|
| // Throw needs environment, which is created only if instruction can
|
| // deoptimize.
|
| - virtual bool ComputeCanDeoptimize() const { return MayThrow(); }
|
| + virtual bool CanDeoptimize() const { return MayThrow(); }
|
|
|
| virtual EffectSet Effects() const { return EffectSet::None(); }
|
|
|
| @@ -4255,7 +4246,7 @@ class LoadUntaggedInstr : public TemplateDefinition<1, NoThrow> {
|
| Value* object() const { return inputs_[0]; }
|
| intptr_t offset() const { return offset_; }
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
|
|
| virtual EffectSet Effects() const { return EffectSet::None(); }
|
| virtual bool AttributesEqual(Instruction* other) const { return true; }
|
| @@ -4277,7 +4268,7 @@ class LoadClassIdInstr : public TemplateDefinition<1, NoThrow> {
|
|
|
| Value* object() const { return inputs_[0]; }
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
|
|
| virtual bool AllowsCSE() const { return true; }
|
| virtual EffectSet Dependencies() const {
|
| @@ -4361,7 +4352,7 @@ class LoadFieldInstr : public TemplateDefinition<1, NoThrow> {
|
| DECLARE_INSTRUCTION(LoadField)
|
| virtual CompileType ComputeType() const;
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
|
|
| virtual void InferRange(RangeAnalysis* analysis, Range* range);
|
|
|
| @@ -4414,7 +4405,7 @@ class InstantiateTypeInstr : public TemplateDefinition<1, Throws> {
|
| const AbstractType& type() const { return type_; }
|
| virtual TokenPosition token_pos() const { return token_pos_; }
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return true; }
|
| + virtual bool CanDeoptimize() const { return true; }
|
|
|
| virtual EffectSet Effects() const { return EffectSet::None(); }
|
|
|
| @@ -4451,7 +4442,7 @@ class InstantiateTypeArgumentsInstr : public TemplateDefinition<1, Throws> {
|
| const Class& instantiator_class() const { return instantiator_class_; }
|
| virtual TokenPosition token_pos() const { return token_pos_; }
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return true; }
|
| + virtual bool CanDeoptimize() const { return true; }
|
|
|
| virtual EffectSet Effects() const { return EffectSet::None(); }
|
|
|
| @@ -4479,7 +4470,7 @@ class AllocateContextInstr : public TemplateDefinition<0, NoThrow> {
|
| virtual TokenPosition token_pos() const { return token_pos_; }
|
| intptr_t num_context_variables() const { return num_context_variables_; }
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
|
|
| virtual EffectSet Effects() const { return EffectSet::None(); }
|
|
|
| @@ -4507,7 +4498,7 @@ class InitStaticFieldInstr : public TemplateInstruction<1, Throws> {
|
|
|
| DECLARE_INSTRUCTION(InitStaticField)
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return true; }
|
| + virtual bool CanDeoptimize() const { return true; }
|
| virtual EffectSet Effects() const { return EffectSet::All(); }
|
| virtual Instruction* Canonicalize(FlowGraph* flow_graph);
|
|
|
| @@ -4532,7 +4523,7 @@ class CloneContextInstr : public TemplateDefinition<1, NoThrow> {
|
| DECLARE_INSTRUCTION(CloneContext)
|
| virtual CompileType ComputeType() const;
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return true; }
|
| + virtual bool CanDeoptimize() const { return true; }
|
|
|
| virtual EffectSet Effects() const { return EffectSet::None(); }
|
|
|
| @@ -4556,7 +4547,7 @@ class CheckEitherNonSmiInstr : public TemplateInstruction<2, NoThrow, Pure> {
|
|
|
| DECLARE_INSTRUCTION(CheckEitherNonSmi)
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return true; }
|
| + virtual bool CanDeoptimize() const { return true; }
|
|
|
| virtual Instruction* Canonicalize(FlowGraph* flow_graph);
|
|
|
| @@ -4641,7 +4632,7 @@ class BoxInstr : public TemplateDefinition<1, NoThrow, Pure> {
|
| DECLARE_INSTRUCTION(Box)
|
| virtual CompileType ComputeType() const;
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
| virtual intptr_t DeoptimizationTarget() const { return Thread::kNoDeoptId; }
|
|
|
| virtual Representation RequiredInputRepresentation(intptr_t idx) const {
|
| @@ -4750,7 +4741,7 @@ class UnboxInstr : public TemplateDefinition<1, NoThrow, Pure> {
|
|
|
| Value* value() const { return inputs_[0]; }
|
|
|
| - virtual bool ComputeCanDeoptimize() const {
|
| + virtual bool CanDeoptimize() const {
|
| const intptr_t value_cid = value()->Type()->ToCid();
|
|
|
| if (CanConvertSmi() && (value()->Type()->ToCid() == kSmiCid)) {
|
| @@ -4852,7 +4843,7 @@ class UnboxUint32Instr : public UnboxInteger32Instr {
|
| ASSERT(is_truncating());
|
| }
|
|
|
| - virtual bool ComputeCanDeoptimize() const;
|
| + virtual bool CanDeoptimize() const;
|
|
|
| virtual void InferRange(RangeAnalysis* analysis, Range* range);
|
|
|
| @@ -4870,7 +4861,7 @@ class UnboxInt32Instr : public UnboxInteger32Instr {
|
| intptr_t deopt_id)
|
| : UnboxInteger32Instr(kUnboxedInt32, truncation_mode, value, deopt_id) {}
|
|
|
| - virtual bool ComputeCanDeoptimize() const;
|
| + virtual bool CanDeoptimize() const;
|
|
|
| virtual void InferRange(RangeAnalysis* analysis, Range* range);
|
|
|
| @@ -4918,7 +4909,7 @@ class MathUnaryInstr : public TemplateDefinition<1, NoThrow, Pure> {
|
| Value* value() const { return inputs_[0]; }
|
| MathUnaryKind kind() const { return kind_; }
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
|
|
| virtual Representation representation() const { return kUnboxedDouble; }
|
|
|
| @@ -4986,7 +4977,7 @@ class CaseInsensitiveCompareUC16Instr
|
| intptr_t class_id() const { return cid_; }
|
| intptr_t index_scale() const { return Instance::ElementSizeFor(cid_); }
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
|
|
| virtual Representation representation() const { return kTagged; }
|
|
|
| @@ -5027,7 +5018,7 @@ class MathMinMaxInstr : public TemplateDefinition<2, NoThrow, Pure> {
|
|
|
| intptr_t result_cid() const { return result_cid_; }
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
|
|
| virtual Representation representation() const {
|
| if (result_cid() == kSmiCid) {
|
| @@ -5082,7 +5073,7 @@ class BinaryDoubleOpInstr : public TemplateDefinition<2, NoThrow, Pure> {
|
|
|
| virtual TokenPosition token_pos() const { return token_pos_; }
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
|
|
| virtual Representation representation() const { return kUnboxedDouble; }
|
|
|
| @@ -5130,7 +5121,7 @@ class DoubleTestOpInstr : public TemplateComparison<1, NoThrow, Pure> {
|
|
|
| MethodRecognizer::Kind op_kind() const { return op_kind_; }
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
|
|
| virtual Representation RequiredInputRepresentation(intptr_t idx) const {
|
| ASSERT(idx == 0);
|
| @@ -5179,7 +5170,7 @@ class BinaryFloat32x4OpInstr : public TemplateDefinition<2, NoThrow, Pure> {
|
|
|
| Token::Kind op_kind() const { return op_kind_; }
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
|
|
| virtual Representation representation() const { return kUnboxedFloat32x4; }
|
|
|
| @@ -5226,7 +5217,7 @@ class Simd32x4ShuffleInstr : public TemplateDefinition<1, NoThrow, Pure> {
|
|
|
| intptr_t mask() const { return mask_; }
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
|
|
| virtual Representation representation() const {
|
| if ((op_kind_ == MethodRecognizer::kFloat32x4ShuffleX) ||
|
| @@ -5298,7 +5289,7 @@ class Simd32x4ShuffleMixInstr : public TemplateDefinition<2, NoThrow, Pure> {
|
|
|
| intptr_t mask() const { return mask_; }
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
|
|
| virtual Representation representation() const {
|
| if (op_kind() == MethodRecognizer::kInt32x4ShuffleMix) {
|
| @@ -5360,7 +5351,7 @@ class Float32x4ConstructorInstr : public TemplateDefinition<4, NoThrow, Pure> {
|
| Value* value2() const { return inputs_[2]; }
|
| Value* value3() const { return inputs_[3]; }
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
|
|
| virtual Representation representation() const { return kUnboxedFloat32x4; }
|
|
|
| @@ -5396,7 +5387,7 @@ class Float32x4SplatInstr : public TemplateDefinition<1, NoThrow, Pure> {
|
|
|
| Value* value() const { return inputs_[0]; }
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
|
|
| virtual Representation representation() const { return kUnboxedFloat32x4; }
|
|
|
| @@ -5428,7 +5419,7 @@ class Float32x4ZeroInstr : public TemplateDefinition<0, NoThrow, Pure> {
|
| public:
|
| Float32x4ZeroInstr() {}
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
|
|
| virtual Representation representation() const { return kUnboxedFloat32x4; }
|
|
|
| @@ -5458,7 +5449,7 @@ class Float32x4ComparisonInstr : public TemplateDefinition<2, NoThrow, Pure> {
|
|
|
| MethodRecognizer::Kind op_kind() const { return op_kind_; }
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
|
|
| virtual Representation representation() const { return kUnboxedInt32x4; }
|
|
|
| @@ -5505,7 +5496,7 @@ class Float32x4MinMaxInstr : public TemplateDefinition<2, NoThrow, Pure> {
|
|
|
| MethodRecognizer::Kind op_kind() const { return op_kind_; }
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
|
|
| virtual Representation representation() const { return kUnboxedFloat32x4; }
|
|
|
| @@ -5552,7 +5543,7 @@ class Float32x4ScaleInstr : public TemplateDefinition<2, NoThrow, Pure> {
|
|
|
| MethodRecognizer::Kind op_kind() const { return op_kind_; }
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
|
|
| virtual Representation representation() const { return kUnboxedFloat32x4; }
|
|
|
| @@ -5599,7 +5590,7 @@ class Float32x4SqrtInstr : public TemplateDefinition<1, NoThrow, Pure> {
|
|
|
| MethodRecognizer::Kind op_kind() const { return op_kind_; }
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
|
|
| virtual Representation representation() const { return kUnboxedFloat32x4; }
|
|
|
| @@ -5644,7 +5635,7 @@ class Float32x4ZeroArgInstr : public TemplateDefinition<1, NoThrow, Pure> {
|
|
|
| MethodRecognizer::Kind op_kind() const { return op_kind_; }
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
|
|
| virtual Representation representation() const { return kUnboxedFloat32x4; }
|
|
|
| @@ -5691,7 +5682,7 @@ class Float32x4ClampInstr : public TemplateDefinition<3, NoThrow, Pure> {
|
| Value* lower() const { return inputs_[1]; }
|
| Value* upper() const { return inputs_[2]; }
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
|
|
| virtual Representation representation() const { return kUnboxedFloat32x4; }
|
|
|
| @@ -5734,7 +5725,7 @@ class Float32x4WithInstr : public TemplateDefinition<2, NoThrow, Pure> {
|
|
|
| MethodRecognizer::Kind op_kind() const { return op_kind_; }
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
|
|
| virtual Representation representation() const { return kUnboxedFloat32x4; }
|
|
|
| @@ -5784,7 +5775,7 @@ class Simd64x2ShuffleInstr : public TemplateDefinition<1, NoThrow, Pure> {
|
|
|
| intptr_t mask() const { return mask_; }
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
|
|
| virtual Representation representation() const {
|
| if ((op_kind_ == MethodRecognizer::kFloat64x2GetX) ||
|
| @@ -5838,7 +5829,7 @@ class Float32x4ToInt32x4Instr : public TemplateDefinition<1, NoThrow, Pure> {
|
|
|
| Value* left() const { return inputs_[0]; }
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
|
|
| virtual Representation representation() const { return kUnboxedInt32x4; }
|
|
|
| @@ -5874,7 +5865,7 @@ class Float32x4ToFloat64x2Instr : public TemplateDefinition<1, NoThrow, Pure> {
|
|
|
| Value* left() const { return inputs_[0]; }
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
|
|
| virtual Representation representation() const { return kUnboxedFloat64x2; }
|
|
|
| @@ -5910,7 +5901,7 @@ class Float64x2ToFloat32x4Instr : public TemplateDefinition<1, NoThrow, Pure> {
|
|
|
| Value* left() const { return inputs_[0]; }
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
|
|
| virtual Representation representation() const { return kUnboxedFloat32x4; }
|
|
|
| @@ -5948,7 +5939,7 @@ class Float64x2ConstructorInstr : public TemplateDefinition<2, NoThrow, Pure> {
|
| Value* value0() const { return inputs_[0]; }
|
| Value* value1() const { return inputs_[1]; }
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
|
|
| virtual Representation representation() const { return kUnboxedFloat64x2; }
|
|
|
| @@ -5984,7 +5975,7 @@ class Float64x2SplatInstr : public TemplateDefinition<1, NoThrow, Pure> {
|
|
|
| Value* value() const { return inputs_[0]; }
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
|
|
| virtual Representation representation() const { return kUnboxedFloat64x2; }
|
|
|
| @@ -6015,7 +6006,7 @@ class Float64x2ZeroInstr : public TemplateDefinition<0, NoThrow, Pure> {
|
| public:
|
| Float64x2ZeroInstr() {}
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
|
|
| virtual Representation representation() const { return kUnboxedFloat64x2; }
|
|
|
| @@ -6043,7 +6034,7 @@ class Float64x2ZeroArgInstr : public TemplateDefinition<1, NoThrow, Pure> {
|
|
|
| MethodRecognizer::Kind op_kind() const { return op_kind_; }
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
|
|
| virtual Representation representation() const {
|
| if (op_kind() == MethodRecognizer::kFloat64x2GetSignMask) {
|
| @@ -6096,7 +6087,7 @@ class Float64x2OneArgInstr : public TemplateDefinition<2, NoThrow, Pure> {
|
|
|
| MethodRecognizer::Kind op_kind() const { return op_kind_; }
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
|
|
| virtual Representation representation() const { return kUnboxedFloat64x2; }
|
|
|
| @@ -6154,7 +6145,7 @@ class Int32x4ConstructorInstr : public TemplateDefinition<4, NoThrow, Pure> {
|
| Value* value2() const { return inputs_[2]; }
|
| Value* value3() const { return inputs_[3]; }
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
|
|
| virtual Representation representation() const { return kUnboxedInt32x4; }
|
|
|
| @@ -6201,7 +6192,7 @@ class Int32x4BoolConstructorInstr
|
| Value* value2() const { return inputs_[2]; }
|
| Value* value3() const { return inputs_[3]; }
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
|
|
| virtual Representation representation() const { return kUnboxedInt32x4; }
|
|
|
| @@ -6241,7 +6232,7 @@ class Int32x4GetFlagInstr : public TemplateDefinition<1, NoThrow, Pure> {
|
|
|
| MethodRecognizer::Kind op_kind() const { return op_kind_; }
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
|
|
| virtual Representation representation() const { return kTagged; }
|
|
|
| @@ -6285,7 +6276,7 @@ class Simd32x4GetSignMaskInstr : public TemplateDefinition<1, NoThrow, Pure> {
|
|
|
| MethodRecognizer::Kind op_kind() const { return op_kind_; }
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
|
|
| virtual Representation representation() const { return kTagged; }
|
|
|
| @@ -6336,7 +6327,7 @@ class Int32x4SelectInstr : public TemplateDefinition<3, NoThrow, Pure> {
|
| Value* trueValue() const { return inputs_[1]; }
|
| Value* falseValue() const { return inputs_[2]; }
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
|
|
| virtual Representation representation() const { return kUnboxedFloat32x4; }
|
|
|
| @@ -6382,7 +6373,7 @@ class Int32x4SetFlagInstr : public TemplateDefinition<2, NoThrow, Pure> {
|
|
|
| MethodRecognizer::Kind op_kind() const { return op_kind_; }
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
|
|
| virtual Representation representation() const { return kUnboxedInt32x4; }
|
|
|
| @@ -6425,7 +6416,7 @@ class Int32x4ToFloat32x4Instr : public TemplateDefinition<1, NoThrow, Pure> {
|
|
|
| Value* left() const { return inputs_[0]; }
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
|
|
| virtual Representation representation() const { return kUnboxedFloat32x4; }
|
|
|
| @@ -6468,7 +6459,7 @@ class BinaryInt32x4OpInstr : public TemplateDefinition<2, NoThrow, Pure> {
|
|
|
| Token::Kind op_kind() const { return op_kind_; }
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
|
|
| virtual Representation representation() const { return kUnboxedInt32x4; }
|
|
|
| @@ -6515,7 +6506,7 @@ class BinaryFloat64x2OpInstr : public TemplateDefinition<2, NoThrow, Pure> {
|
|
|
| Token::Kind op_kind() const { return op_kind_; }
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
|
|
| virtual Representation representation() const { return kUnboxedFloat64x2; }
|
|
|
| @@ -6590,9 +6581,7 @@ class UnarySmiOpInstr : public UnaryIntegerOpInstr {
|
| UnarySmiOpInstr(Token::Kind op_kind, Value* value, intptr_t deopt_id)
|
| : UnaryIntegerOpInstr(op_kind, value, deopt_id) {}
|
|
|
| - virtual bool ComputeCanDeoptimize() const {
|
| - return op_kind() == Token::kNEGATE;
|
| - }
|
| + virtual bool CanDeoptimize() const { return op_kind() == Token::kNEGATE; }
|
|
|
| virtual CompileType ComputeType() const;
|
|
|
| @@ -6610,7 +6599,7 @@ class UnaryUint32OpInstr : public UnaryIntegerOpInstr {
|
| ASSERT(op_kind == Token::kBIT_NOT);
|
| }
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
|
|
| virtual CompileType ComputeType() const;
|
|
|
| @@ -6635,7 +6624,7 @@ class UnaryMintOpInstr : public UnaryIntegerOpInstr {
|
| ASSERT(op_kind == Token::kBIT_NOT);
|
| }
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
|
|
| virtual CompileType ComputeType() const;
|
|
|
| @@ -6669,7 +6658,7 @@ class CheckedSmiOpInstr : public TemplateDefinition<2, Throws> {
|
| Value* left() const { return inputs_[0]; }
|
| Value* right() const { return inputs_[1]; }
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
|
|
| virtual EffectSet Effects() const { return EffectSet::All(); }
|
|
|
| @@ -6701,7 +6690,7 @@ class CheckedSmiComparisonInstr : public TemplateComparison<2, Throws> {
|
|
|
| InstanceCallInstr* call() const { return call_; }
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
|
|
| virtual Definition* Canonicalize(FlowGraph* flow_graph);
|
|
|
| @@ -6779,6 +6768,26 @@ class BinaryIntegerOpInstr : public TemplateDefinition<2, NoThrow, Pure> {
|
|
|
| virtual Definition* Canonicalize(FlowGraph* flow_graph);
|
|
|
| + virtual bool AllowsDCE() const {
|
| + switch (op_kind()) {
|
| + case Token::kADD:
|
| + case Token::kSUB:
|
| + case Token::kMUL:
|
| + case Token::kBIT_AND:
|
| + case Token::kBIT_OR:
|
| + case Token::kBIT_XOR:
|
| + return true;
|
| +
|
| + case Token::kSHR:
|
| + case Token::kSHL:
|
| + // These instructions throw on negative shifts.
|
| + return !CanDeoptimize();
|
| +
|
| + default:
|
| + return false;
|
| + }
|
| + }
|
| +
|
| virtual bool AttributesEqual(Instruction* other) const;
|
|
|
| virtual intptr_t DeoptimizationTarget() const { return GetDeoptId(); }
|
| @@ -6811,7 +6820,7 @@ class BinarySmiOpInstr : public BinaryIntegerOpInstr {
|
| intptr_t deopt_id)
|
| : BinaryIntegerOpInstr(op_kind, left, right, deopt_id) {}
|
|
|
| - virtual bool ComputeCanDeoptimize() const;
|
| + virtual bool CanDeoptimize() const;
|
|
|
| virtual void InferRange(RangeAnalysis* analysis, Range* range);
|
| virtual CompileType ComputeType() const;
|
| @@ -6857,7 +6866,7 @@ class BinaryInt32OpInstr : public BinaryIntegerOpInstr {
|
| #endif
|
| }
|
|
|
| - virtual bool ComputeCanDeoptimize() const;
|
| + virtual bool CanDeoptimize() const;
|
|
|
| virtual Representation representation() const { return kUnboxedInt32; }
|
|
|
| @@ -6886,7 +6895,7 @@ class BinaryUint32OpInstr : public BinaryIntegerOpInstr {
|
| mark_truncating();
|
| }
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
|
|
| virtual Representation representation() const { return kUnboxedUint32; }
|
|
|
| @@ -6914,7 +6923,7 @@ class ShiftUint32OpInstr : public BinaryIntegerOpInstr {
|
| ASSERT((op_kind == Token::kSHR) || (op_kind == Token::kSHL));
|
| }
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return true; }
|
| + virtual bool CanDeoptimize() const { return true; }
|
|
|
| virtual Representation representation() const { return kUnboxedUint32; }
|
|
|
| @@ -6940,7 +6949,7 @@ class BinaryMintOpInstr : public BinaryIntegerOpInstr {
|
| intptr_t deopt_id)
|
| : BinaryIntegerOpInstr(op_kind, left, right, deopt_id) {}
|
|
|
| - virtual bool ComputeCanDeoptimize() const {
|
| + virtual bool CanDeoptimize() const {
|
| return (can_overflow() &&
|
| ((op_kind() == Token::kADD) || (op_kind() == Token::kSUB))) ||
|
| (op_kind() == Token::kMUL); // Deopt if inputs are not int32.
|
| @@ -6973,7 +6982,7 @@ class ShiftMintOpInstr : public BinaryIntegerOpInstr {
|
| ASSERT((op_kind == Token::kSHR) || (op_kind == Token::kSHL));
|
| }
|
|
|
| - virtual bool ComputeCanDeoptimize() const {
|
| + virtual bool CanDeoptimize() const {
|
| return has_shift_count_check() ||
|
| (can_overflow() && (op_kind() == Token::kSHL));
|
| }
|
| @@ -7012,7 +7021,7 @@ class UnaryDoubleOpInstr : public TemplateDefinition<1, NoThrow, Pure> {
|
| DECLARE_INSTRUCTION(UnaryDoubleOp)
|
| virtual CompileType ComputeType() const;
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
|
|
| virtual intptr_t DeoptimizationTarget() const {
|
| // Direct access since this instruction cannot deoptimize, and the deopt-id
|
| @@ -7051,7 +7060,7 @@ class CheckStackOverflowInstr : public TemplateInstruction<0, NoThrow> {
|
|
|
| DECLARE_INSTRUCTION(CheckStackOverflow)
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return true; }
|
| + virtual bool CanDeoptimize() const { return true; }
|
|
|
| virtual EffectSet Effects() const { return EffectSet::None(); }
|
|
|
| @@ -7081,7 +7090,7 @@ class SmiToDoubleInstr : public TemplateDefinition<1, NoThrow, Pure> {
|
|
|
| virtual Representation representation() const { return kUnboxedDouble; }
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
|
|
| virtual bool AttributesEqual(Instruction* other) const { return true; }
|
|
|
| @@ -7108,7 +7117,7 @@ class Int32ToDoubleInstr : public TemplateDefinition<1, NoThrow, Pure> {
|
|
|
| virtual Representation representation() const { return kUnboxedDouble; }
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
|
|
| virtual bool AttributesEqual(Instruction* other) const { return true; }
|
|
|
| @@ -7142,7 +7151,7 @@ class MintToDoubleInstr : public TemplateDefinition<1, NoThrow, Pure> {
|
| return GetDeoptId();
|
| }
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
| virtual bool AttributesEqual(Instruction* other) const { return true; }
|
|
|
| private:
|
| @@ -7166,7 +7175,7 @@ class DoubleToIntegerInstr : public TemplateDefinition<1, Throws> {
|
|
|
| virtual intptr_t ArgumentCount() const { return 1; }
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return true; }
|
| + virtual bool CanDeoptimize() const { return true; }
|
|
|
| virtual EffectSet Effects() const { return EffectSet::None(); }
|
|
|
| @@ -7191,7 +7200,7 @@ class DoubleToSmiInstr : public TemplateDefinition<1, NoThrow, Pure> {
|
| DECLARE_INSTRUCTION(DoubleToSmi)
|
| virtual CompileType ComputeType() const;
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return true; }
|
| + virtual bool CanDeoptimize() const { return true; }
|
|
|
| virtual Representation RequiredInputRepresentation(intptr_t idx) const {
|
| ASSERT(idx == 0);
|
| @@ -7223,7 +7232,7 @@ class DoubleToDoubleInstr : public TemplateDefinition<1, NoThrow, Pure> {
|
| DECLARE_INSTRUCTION(DoubleToDouble)
|
| virtual CompileType ComputeType() const;
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
|
|
| virtual Representation representation() const { return kUnboxedDouble; }
|
|
|
| @@ -7258,7 +7267,7 @@ class DoubleToFloatInstr : public TemplateDefinition<1, NoThrow, Pure> {
|
|
|
| virtual CompileType ComputeType() const;
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
|
|
| virtual Representation representation() const {
|
| // This works since double is the representation that the typed array
|
| @@ -7297,7 +7306,7 @@ class FloatToDoubleInstr : public TemplateDefinition<1, NoThrow, Pure> {
|
|
|
| virtual CompileType ComputeType() const;
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
|
|
| virtual Representation representation() const { return kUnboxedDouble; }
|
|
|
| @@ -7335,7 +7344,7 @@ class InvokeMathCFunctionInstr : public PureDefinition {
|
| DECLARE_INSTRUCTION(InvokeMathCFunction)
|
| virtual CompileType ComputeType() const;
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
|
|
| virtual Representation representation() const { return kUnboxedDouble; }
|
|
|
| @@ -7394,7 +7403,7 @@ class ExtractNthOutputInstr : public TemplateDefinition<1, NoThrow, Pure> {
|
| DECLARE_INSTRUCTION(ExtractNthOutput)
|
|
|
| virtual CompileType ComputeType() const;
|
| - virtual bool ComputeCanDeoptimize() const { return false; }
|
| + virtual bool CanDeoptimize() const { return false; }
|
|
|
| intptr_t index() const { return index_; }
|
|
|
| @@ -7455,7 +7464,7 @@ class MergedMathInstr : public PureDefinition {
|
|
|
| virtual CompileType ComputeType() const;
|
|
|
| - virtual bool ComputeCanDeoptimize() const {
|
| + virtual bool CanDeoptimize() const {
|
| if (kind_ == kTruncDivMod) {
|
| return true;
|
| } else {
|
| @@ -7521,7 +7530,7 @@ class CheckClassInstr : public TemplateInstruction<1, NoThrow> {
|
|
|
| DECLARE_INSTRUCTION(CheckClass)
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return true; }
|
| + virtual bool CanDeoptimize() const { return true; }
|
|
|
| virtual TokenPosition token_pos() const { return token_pos_; }
|
|
|
| @@ -7578,7 +7587,7 @@ class CheckSmiInstr : public TemplateInstruction<1, NoThrow, Pure> {
|
|
|
| DECLARE_INSTRUCTION(CheckSmi)
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return true; }
|
| + virtual bool CanDeoptimize() const { return true; }
|
|
|
| virtual Instruction* Canonicalize(FlowGraph* flow_graph);
|
|
|
| @@ -7607,7 +7616,7 @@ class CheckClassIdInstr : public TemplateInstruction<1, NoThrow> {
|
|
|
| DECLARE_INSTRUCTION(CheckClassId)
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return true; }
|
| + virtual bool CanDeoptimize() const { return true; }
|
|
|
| virtual Instruction* Canonicalize(FlowGraph* flow_graph);
|
|
|
| @@ -7640,7 +7649,7 @@ class CheckArrayBoundInstr : public TemplateInstruction<2, NoThrow, Pure> {
|
|
|
| DECLARE_INSTRUCTION(CheckArrayBound)
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return true; }
|
| + virtual bool CanDeoptimize() const { return true; }
|
|
|
| bool IsRedundant(const RangeBoundary& length);
|
|
|
| @@ -7684,7 +7693,7 @@ class GenericCheckBoundInstr : public TemplateInstruction<2, Throws, NoCSE> {
|
|
|
| DECLARE_INSTRUCTION(GenericCheckBound)
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return true; }
|
| + virtual bool CanDeoptimize() const { return true; }
|
|
|
| // Give a name to the location/input indices.
|
| enum { kLengthPos = 0, kIndexPos = 1 };
|
| @@ -7722,7 +7731,7 @@ class UnboxedIntConverterInstr : public TemplateDefinition<1, NoThrow> {
|
|
|
| Definition* Canonicalize(FlowGraph* flow_graph);
|
|
|
| - virtual bool ComputeCanDeoptimize() const;
|
| + virtual bool CanDeoptimize() const;
|
|
|
| virtual Representation representation() const { return to(); }
|
|
|
| @@ -7768,7 +7777,7 @@ class GrowRegExpStackInstr : public TemplateDefinition<1, Throws> {
|
|
|
| Value* typed_data_cell() const { return inputs_[0]; }
|
|
|
| - virtual bool ComputeCanDeoptimize() const { return MayThrow(); }
|
| + virtual bool CanDeoptimize() const { return MayThrow(); }
|
| virtual EffectSet Effects() const { return EffectSet::None(); }
|
|
|
| DECLARE_INSTRUCTION(GrowRegExpStack);
|
| @@ -7974,7 +7983,6 @@ class Environment : public ZoneAllocated {
|
|
|
| private:
|
| friend class ShallowIterator;
|
| - friend class BlockBuilder; // For Environment constructor.
|
|
|
| Environment(intptr_t length,
|
| intptr_t fixed_parameter_count,
|
|
|