diff options
| author | 2015-11-23 09:19:25 +0000 | |
|---|---|---|
| committer | 2015-11-23 09:19:25 +0000 | |
| commit | 0af5e3b30f2a118530c750943dd4de9b0a383aea (patch) | |
| tree | 26521f783e65bda8c173011641a868beeb4b1da2 /compiler/optimizing/nodes.h | |
| parent | 05718eb6a93a7525705ca5e823bdd8bea672582d (diff) | |
| parent | 2171e2ab84baa41770489d01df9197a3ce871262 (diff) | |
Merge "Simplify boolean condition compared to 0"
am: 2171e2ab84
* commit '2171e2ab84baa41770489d01df9197a3ce871262':
Simplify boolean condition compared to 0
Diffstat (limited to 'compiler/optimizing/nodes.h')
| -rw-r--r-- | compiler/optimizing/nodes.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/optimizing/nodes.h b/compiler/optimizing/nodes.h index 263795d47b..a5ea15408c 100644 --- a/compiler/optimizing/nodes.h +++ b/compiler/optimizing/nodes.h @@ -371,6 +371,11 @@ class HGraph : public ArenaObject<kArenaAllocGraph> { bool HasTryCatch() const { return has_try_catch_; } void SetHasTryCatch(bool value) { has_try_catch_ = value; } + // Returns an instruction with the opposite boolean value from 'cond'. + // The instruction has been inserted into the graph, either as a constant, or + // before cursor. + HInstruction* InsertOppositeCondition(HInstruction* cond, HInstruction* cursor); + private: void FindBackEdges(ArenaBitVector* visited); void RemoveInstructionsAsUsersFromDeadBlocks(const ArenaBitVector& visited) const; |