diff options
Diffstat (limited to 'compiler/optimizing/nodes.h')
-rw-r--r-- | compiler/optimizing/nodes.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/compiler/optimizing/nodes.h b/compiler/optimizing/nodes.h index 710f709c89..6a45149509 100644 --- a/compiler/optimizing/nodes.h +++ b/compiler/optimizing/nodes.h @@ -1945,7 +1945,7 @@ class HInstruction : public ArenaObject<kArenaAllocInstruction> { return !HasEnvironmentUses() && GetUses().HasExactlyOneElement(); } - bool IsDeadAndRemovable() const { + bool IsRemovable() const { return !HasSideEffects() && !CanThrow() && @@ -1953,11 +1953,14 @@ class HInstruction : public ArenaObject<kArenaAllocInstruction> { !IsControlFlow() && !IsNativeDebugInfo() && !IsParameterValue() && - !HasUses() && // If we added an explicit barrier then we should keep it. !IsMemoryBarrier(); } + bool IsDeadAndRemovable() const { + return IsRemovable() && !HasUses(); + } + // Does this instruction strictly dominate `other_instruction`? // Returns false if this instruction and `other_instruction` are the same. // Aborts if this instruction and `other_instruction` are both phis. |