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

Side by Side Diff: src/compiler/pipeline.cc

Issue 476733002: Deprecte LoweringBuilder in favor of Reducer. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « src/compiler/lowering-builder.cc ('k') | src/compiler/simplified-lowering.h » ('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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler/pipeline.h" 5 #include "src/compiler/pipeline.h"
6 6
7 #include "src/base/platform/elapsed-timer.h" 7 #include "src/base/platform/elapsed-timer.h"
8 #include "src/compiler/ast-graph-builder.h" 8 #include "src/compiler/ast-graph-builder.h"
9 #include "src/compiler/code-generator.h" 9 #include "src/compiler/code-generator.h"
10 #include "src/compiler/graph-replay.h" 10 #include "src/compiler/graph-replay.h"
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 // Type the graph. 204 // Type the graph.
205 PhaseStats typer_stats(info(), PhaseStats::CREATE_GRAPH, "typer"); 205 PhaseStats typer_stats(info(), PhaseStats::CREATE_GRAPH, "typer");
206 typer.Run(&graph, info()->context()); 206 typer.Run(&graph, info()->context());
207 } 207 }
208 // All new nodes must be typed. 208 // All new nodes must be typed.
209 typer.DecorateGraph(&graph); 209 typer.DecorateGraph(&graph);
210 { 210 {
211 // Lower JSOperators where we can determine types. 211 // Lower JSOperators where we can determine types.
212 PhaseStats lowering_stats(info(), PhaseStats::CREATE_GRAPH, 212 PhaseStats lowering_stats(info(), PhaseStats::CREATE_GRAPH,
213 "typed lowering"); 213 "typed lowering");
214 JSTypedLowering lowering(&jsgraph, &source_positions); 214 SourcePositionTable::Scope pos(&source_positions,
215 lowering.LowerAllNodes(); 215 SourcePosition::Unknown());
216 JSTypedLowering lowering(&jsgraph);
217 GraphReducer graph_reducer(&graph);
218 graph_reducer.AddReducer(&lowering);
219 graph_reducer.ReduceGraph();
216 220
217 VerifyAndPrintGraph(&graph, "Lowered typed"); 221 VerifyAndPrintGraph(&graph, "Lowered typed");
218 } 222 }
219 } 223 }
220 224
221 Handle<Code> code = Handle<Code>::null(); 225 Handle<Code> code = Handle<Code>::null();
222 if (SupportedTarget()) { 226 if (SupportedTarget()) {
223 { 227 {
224 // Lower any remaining generic JSOperators. 228 // Lower any remaining generic JSOperators.
225 PhaseStats lowering_stats(info(), PhaseStats::CREATE_GRAPH, 229 PhaseStats lowering_stats(info(), PhaseStats::CREATE_GRAPH,
226 "generic lowering"); 230 "generic lowering");
231 SourcePositionTable::Scope pos(&source_positions,
232 SourcePosition::Unknown());
227 MachineOperatorBuilder machine(zone()); 233 MachineOperatorBuilder machine(zone());
228 JSGenericLowering lowering(info(), &jsgraph, &machine, &source_positions); 234 JSGenericLowering lowering(info(), &jsgraph, &machine);
229 lowering.LowerAllNodes(); 235 GraphReducer graph_reducer(&graph);
236 graph_reducer.AddReducer(&lowering);
237 graph_reducer.ReduceGraph();
230 238
231 VerifyAndPrintGraph(&graph, "Lowered generic"); 239 VerifyAndPrintGraph(&graph, "Lowered generic");
232 } 240 }
233 241
234 // Compute a schedule. 242 // Compute a schedule.
235 Schedule* schedule = ComputeSchedule(&graph); 243 Schedule* schedule = ComputeSchedule(&graph);
236 TraceSchedule(schedule); 244 TraceSchedule(schedule);
237 245
238 { 246 {
239 // Generate optimized code. 247 // Generate optimized code.
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 } 349 }
342 350
343 351
344 void Pipeline::TearDown() { 352 void Pipeline::TearDown() {
345 InstructionOperand::TearDownCaches(); 353 InstructionOperand::TearDownCaches();
346 } 354 }
347 355
348 } // namespace compiler 356 } // namespace compiler
349 } // namespace internal 357 } // namespace internal
350 } // namespace v8 358 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/lowering-builder.cc ('k') | src/compiler/simplified-lowering.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698