diff options
author | 2016-11-03 00:05:51 +0000 | |
---|---|---|
committer | 2016-11-03 00:05:51 +0000 | |
commit | c4005c3e71e98edd4a5a91c75dbee3d97b7dcda1 (patch) | |
tree | 4f4b9212ec7cd16e8f972913eebe2a08ff037dd3 /compiler/optimizing/nodes.h | |
parent | 3e9e3a3761bd3d9f4a9ea6a49b2707abba702f22 (diff) | |
parent | 2767f4ba2df934fea4c50a016e2955c2cf3f6b19 (diff) |
Merge "New instruction simplifications. Extra dce pass. Allow more per block repeats."
Diffstat (limited to 'compiler/optimizing/nodes.h')
-rw-r--r-- | compiler/optimizing/nodes.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/compiler/optimizing/nodes.h b/compiler/optimizing/nodes.h index 6a45149509..ce2edde1c1 100644 --- a/compiler/optimizing/nodes.h +++ b/compiler/optimizing/nodes.h @@ -1855,6 +1855,15 @@ class HInstruction : public ArenaObject<kArenaAllocInstruction> { size_t InputCount() const { return GetInputRecords().size(); } HInstruction* InputAt(size_t i) const { return InputRecordAt(i).GetInstruction(); } + bool HasInput(HInstruction* input) const { + for (const HInstruction* i : GetInputs()) { + if (i == input) { + return true; + } + } + return false; + } + void SetRawInputAt(size_t index, HInstruction* input) { SetRawInputRecordAt(index, HUserRecord<HInstruction*>(input)); } |