Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(179)

Side by Side Diff: runtime/vm/compiler.cc

Issue 1682803005: VM: Remove dead code from flow graph optimizer. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: removed extra flag decl Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | runtime/vm/flow_graph_compiler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/compiler.h" 5 #include "vm/compiler.h"
6 6
7 #include "vm/assembler.h" 7 #include "vm/assembler.h"
8 8
9 #include "vm/ast_printer.h" 9 #include "vm/ast_printer.h"
10 #include "vm/block_scheduler.h" 10 #include "vm/block_scheduler.h"
11 #include "vm/branch_optimizer.h" 11 #include "vm/branch_optimizer.h"
12 #include "vm/cha.h" 12 #include "vm/cha.h"
13 #include "vm/code_generator.h" 13 #include "vm/code_generator.h"
14 #include "vm/code_patcher.h" 14 #include "vm/code_patcher.h"
15 #include "vm/constant_propagator.h" 15 #include "vm/constant_propagator.h"
16 #include "vm/dart_entry.h" 16 #include "vm/dart_entry.h"
17 #include "vm/debugger.h" 17 #include "vm/debugger.h"
18 #include "vm/deopt_instructions.h" 18 #include "vm/deopt_instructions.h"
19 #include "vm/disassembler.h" 19 #include "vm/disassembler.h"
20 #include "vm/exceptions.h" 20 #include "vm/exceptions.h"
21 #include "vm/flags.h" 21 #include "vm/flags.h"
22 #include "vm/flow_graph.h" 22 #include "vm/flow_graph.h"
23 #include "vm/flow_graph_allocator.h" 23 #include "vm/flow_graph_allocator.h"
24 #include "vm/flow_graph_builder.h" 24 #include "vm/flow_graph_builder.h"
25 #include "vm/flow_graph_compiler.h" 25 #include "vm/flow_graph_compiler.h"
26 #include "vm/flow_graph_inliner.h" 26 #include "vm/flow_graph_inliner.h"
27 #include "vm/flow_graph_optimizer.h" 27 #include "vm/flow_graph_optimizer.h"
28 #include "vm/flow_graph_range_analysis.h"
28 #include "vm/flow_graph_type_propagator.h" 29 #include "vm/flow_graph_type_propagator.h"
29 #include "vm/il_printer.h" 30 #include "vm/il_printer.h"
30 #include "vm/longjump.h" 31 #include "vm/longjump.h"
31 #include "vm/object.h" 32 #include "vm/object.h"
32 #include "vm/object_store.h" 33 #include "vm/object_store.h"
33 #include "vm/os.h" 34 #include "vm/os.h"
34 #include "vm/parser.h" 35 #include "vm/parser.h"
35 #include "vm/precompiler.h" 36 #include "vm/precompiler.h"
36 #include "vm/redundancy_elimination.h" 37 #include "vm/redundancy_elimination.h"
37 #include "vm/regexp_parser.h" 38 #include "vm/regexp_parser.h"
(...skipping 840 matching lines...) Expand 10 before | Expand all | Expand 10 after
878 "RangeAnalysis"); 879 "RangeAnalysis");
879 #endif // !PRODUCT 880 #endif // !PRODUCT
880 // Propagate types after store-load-forwarding. Some phis may have 881 // Propagate types after store-load-forwarding. Some phis may have
881 // become smi phis that can be processed by range analysis. 882 // become smi phis that can be processed by range analysis.
882 FlowGraphTypePropagator::Propagate(flow_graph); 883 FlowGraphTypePropagator::Propagate(flow_graph);
883 DEBUG_ASSERT(flow_graph->VerifyUseLists()); 884 DEBUG_ASSERT(flow_graph->VerifyUseLists());
884 885
885 // We have to perform range analysis after LICM because it 886 // We have to perform range analysis after LICM because it
886 // optimistically moves CheckSmi through phis into loop preheaders 887 // optimistically moves CheckSmi through phis into loop preheaders
887 // making some phis smi. 888 // making some phis smi.
888 optimizer.InferIntRanges(); 889 RangeAnalysis range_analysis(flow_graph);
890 range_analysis.Analyze();
889 DEBUG_ASSERT(flow_graph->VerifyUseLists()); 891 DEBUG_ASSERT(flow_graph->VerifyUseLists());
890 } 892 }
891 893
892 if (FLAG_constant_propagation) { 894 if (FLAG_constant_propagation) {
893 #ifndef PRODUCT 895 #ifndef PRODUCT
894 TimelineDurationScope tds2(thread(), 896 TimelineDurationScope tds2(thread(),
895 compiler_timeline, 897 compiler_timeline,
896 "ConstantPropagator::OptimizeBranches"); 898 "ConstantPropagator::OptimizeBranches");
897 #endif // !PRODUCT 899 #endif // !PRODUCT
898 // Constant propagation can use information from range analysis to 900 // Constant propagation can use information from range analysis to
(...skipping 983 matching lines...) Expand 10 before | Expand all | Expand 10 after
1882 } 1884 }
1883 1885
1884 1886
1885 void BackgroundCompiler::EnsureInit(Thread* thread) { 1887 void BackgroundCompiler::EnsureInit(Thread* thread) {
1886 UNREACHABLE(); 1888 UNREACHABLE();
1887 } 1889 }
1888 1890
1889 #endif // DART_PRECOMPILED_RUNTIME 1891 #endif // DART_PRECOMPILED_RUNTIME
1890 1892
1891 } // namespace dart 1893 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/flow_graph_compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698