diff options
Diffstat (limited to 'compiler/optimizing/nodes.h')
-rw-r--r-- | compiler/optimizing/nodes.h | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/compiler/optimizing/nodes.h b/compiler/optimizing/nodes.h index ed2f2111b2..103d318710 100644 --- a/compiler/optimizing/nodes.h +++ b/compiler/optimizing/nodes.h @@ -1565,10 +1565,10 @@ class HLoopInformationOutwardIterator : public ValueObject { M(Min, BinaryOperation) \ M(MonitorOperation, Instruction) \ M(Mul, BinaryOperation) \ - M(NativeDebugInfo, Instruction) \ M(Neg, UnaryOperation) \ M(NewArray, Instruction) \ M(NewInstance, Instruction) \ + M(Nop, Instruction) \ M(Not, UnaryOperation) \ M(NotEqual, Condition) \ M(NullConstant, Instruction) \ @@ -2433,7 +2433,7 @@ class HInstruction : public ArenaObject<kArenaAllocInstruction> { !CanThrow() && !IsSuspendCheck() && !IsControlFlow() && - !IsNativeDebugInfo() && + !IsNop() && !IsParameterValue() && // If we added an explicit barrier then we should keep it. !IsMemoryBarrier() && @@ -6783,22 +6783,27 @@ class HSuspendCheck final : public HExpression<0> { SlowPathCode* slow_path_; }; -// Pseudo-instruction which provides the native debugger with mapping information. -// It ensures that we can generate line number and local variables at this point. -class HNativeDebugInfo : public HExpression<0> { +// Pseudo-instruction which doesn't generate any code. +// If `emit_environment` is true, it can be used to generate an environment. It is used, for +// example, to provide the native debugger with mapping information. It ensures that we can generate +// line number and local variables at this point. +class HNop : public HExpression<0> { public: - explicit HNativeDebugInfo(uint32_t dex_pc) - : HExpression<0>(kNativeDebugInfo, SideEffects::None(), dex_pc) { + explicit HNop(uint32_t dex_pc, bool needs_environment) + : HExpression<0>(kNop, SideEffects::None(), dex_pc), needs_environment_(needs_environment) { } bool NeedsEnvironment() const override { - return true; + return needs_environment_; } - DECLARE_INSTRUCTION(NativeDebugInfo); + DECLARE_INSTRUCTION(Nop); protected: - DEFAULT_COPY_CONSTRUCTOR(NativeDebugInfo); + DEFAULT_COPY_CONSTRUCTOR(Nop); + + private: + bool needs_environment_; }; /** |