diff options
author | 2017-09-08 16:16:46 +0000 | |
---|---|---|
committer | 2017-09-08 16:16:46 +0000 | |
commit | 86ce50481f91e3be2e5f2686e18e11babde721ae (patch) | |
tree | 3179155108b883d8c0c4bb3dbac0b70db0d7f698 /compiler/optimizing/nodes.h | |
parent | 88f929ce72a5eabdb1ae1b32e5ec157d0e9f1ef8 (diff) | |
parent | dd018df8a00e841fe38fabe38520b7d297a885c1 (diff) |
Merge "optimizing: add block-scoped constructor fence merging pass"
Diffstat (limited to 'compiler/optimizing/nodes.h')
-rw-r--r-- | compiler/optimizing/nodes.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/compiler/optimizing/nodes.h b/compiler/optimizing/nodes.h index 93677f66a8..6bf53f7147 100644 --- a/compiler/optimizing/nodes.h +++ b/compiler/optimizing/nodes.h @@ -6643,13 +6643,24 @@ class HConstructorFence FINAL : public HVariableInputSizeInstruction { // Returns how many HConstructorFence instructions were removed from graph. static size_t RemoveConstructorFences(HInstruction* instruction); + // Combine all inputs of `this` and `other` instruction and remove + // `other` from the graph. + // + // Inputs are unique after the merge. + // + // Requirement: `this` must not be the same as `other. + void Merge(HConstructorFence* other); + // Check if this constructor fence is protecting // an HNewInstance or HNewArray that is also the immediate // predecessor of `this`. // + // If `ignore_inputs` is true, then the immediate predecessor doesn't need + // to be one of the inputs of `this`. + // // Returns the associated HNewArray or HNewInstance, // or null otherwise. - HInstruction* GetAssociatedAllocation(); + HInstruction* GetAssociatedAllocation(bool ignore_inputs = false); DECLARE_INSTRUCTION(ConstructorFence); |