diff options
| author | 2017-08-11 19:29:31 +0000 | |
|---|---|---|
| committer | 2017-08-11 19:29:31 +0000 | |
| commit | e9b61bac34bea439d8ce39592973a66a32f43fb7 (patch) | |
| tree | aa0043f331844ba6083b764c7bce8c2a81671058 /compiler/optimizing/nodes.h | |
| parent | 675c779cb046bca49229e1e5268d0eb622159214 (diff) | |
| parent | 6ef45677305048c2bf0600f1c4b98a11b2cfaffb (diff) | |
Merge changes Ic119441c,I83b96b41
* changes:
optimizing: Add statistics for # of constructor fences added/removed
optimizing: Refactor statistics to use OptimizingCompilerStats helper
Diffstat (limited to 'compiler/optimizing/nodes.h')
| -rw-r--r-- | compiler/optimizing/nodes.h | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/compiler/optimizing/nodes.h b/compiler/optimizing/nodes.h index 488d47269b..68d6c2ebbc 100644 --- a/compiler/optimizing/nodes.h +++ b/compiler/optimizing/nodes.h @@ -6631,7 +6631,9 @@ class HConstructorFence FINAL : public HVariableInputSizeInstruction { // This must *not* be called during/after prepare_for_register_allocation, // because that removes all the inputs to the fences but the fence is actually // still considered live. - static void RemoveConstructorFences(HInstruction* instruction); + // + // Returns how many HConstructorFence instructions were removed from graph. + static size_t RemoveConstructorFences(HInstruction* instruction); // Check if this constructor fence is protecting // an HNewInstance or HNewArray that is also the immediate @@ -6879,9 +6881,13 @@ class HParallelMove FINAL : public HTemplateInstruction<0> { namespace art { +class OptimizingCompilerStats; + class HGraphVisitor : public ValueObject { public: - explicit HGraphVisitor(HGraph* graph) : graph_(graph) {} + explicit HGraphVisitor(HGraph* graph, OptimizingCompilerStats* stats = nullptr) + : stats_(stats), + graph_(graph) {} virtual ~HGraphVisitor() {} virtual void VisitInstruction(HInstruction* instruction ATTRIBUTE_UNUSED) {} @@ -6903,6 +6909,9 @@ class HGraphVisitor : public ValueObject { #undef DECLARE_VISIT_INSTRUCTION + protected: + OptimizingCompilerStats* stats_; + private: HGraph* const graph_; @@ -6911,7 +6920,8 @@ class HGraphVisitor : public ValueObject { class HGraphDelegateVisitor : public HGraphVisitor { public: - explicit HGraphDelegateVisitor(HGraph* graph) : HGraphVisitor(graph) {} + explicit HGraphDelegateVisitor(HGraph* graph, OptimizingCompilerStats* stats = nullptr) + : HGraphVisitor(graph, stats) {} virtual ~HGraphDelegateVisitor() {} // Visit functions that delegate to to super class. |