summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Mingyao Yang <mingyao@google.com> 2017-10-26 17:51:18 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2017-10-26 17:51:18 +0000
commitdf12b6fbd98883cc1714f731847b7628f2fb7f11 (patch)
treeba4aef5d74821791cadb01e94af8833d7c985159
parent89ef026f70d9d5afc5ebddc490dbe0c508286e44 (diff)
parentc62b7ec6e47148049a2aa986a380dd6e58952d7a (diff)
Merge "Use HGraphDelegateVisitor instead of HGraphVisitor for lse."
-rw-r--r--compiler/optimizing/load_store_elimination.cc23
1 files changed, 4 insertions, 19 deletions
diff --git a/compiler/optimizing/load_store_elimination.cc b/compiler/optimizing/load_store_elimination.cc
index af5585ec92..7dff696e32 100644
--- a/compiler/optimizing/load_store_elimination.cc
+++ b/compiler/optimizing/load_store_elimination.cc
@@ -39,13 +39,14 @@ static HInstruction* const kUnknownHeapValue =
static HInstruction* const kDefaultHeapValue =
reinterpret_cast<HInstruction*>(static_cast<uintptr_t>(-2));
-class LSEVisitor : public HGraphVisitor {
+// Use HGraphDelegateVisitor for which all VisitInvokeXXX() delegate to VisitInvoke().
+class LSEVisitor : public HGraphDelegateVisitor {
public:
LSEVisitor(HGraph* graph,
const HeapLocationCollector& heap_locations_collector,
const SideEffectsAnalysis& side_effects,
OptimizingCompilerStats* stats)
- : HGraphVisitor(graph, stats),
+ : HGraphDelegateVisitor(graph, stats),
heap_location_collector_(heap_locations_collector),
side_effects_(side_effects),
allocator_(graph->GetArenaStack()),
@@ -540,23 +541,7 @@ class LSEVisitor : public HGraphVisitor {
}
}
- void VisitInvokeStaticOrDirect(HInvokeStaticOrDirect* invoke) OVERRIDE {
- HandleInvoke(invoke);
- }
-
- void VisitInvokeVirtual(HInvokeVirtual* invoke) OVERRIDE {
- HandleInvoke(invoke);
- }
-
- void VisitInvokeInterface(HInvokeInterface* invoke) OVERRIDE {
- HandleInvoke(invoke);
- }
-
- void VisitInvokeUnresolved(HInvokeUnresolved* invoke) OVERRIDE {
- HandleInvoke(invoke);
- }
-
- void VisitInvokePolymorphic(HInvokePolymorphic* invoke) OVERRIDE {
+ void VisitInvoke(HInvoke* invoke) OVERRIDE {
HandleInvoke(invoke);
}