Files
sdk/runtime/vm/block_scheduler.h
T
kmillikin@google.com 00f20f3ffc Collect edge count profiling data and reorder basic blocks.
In unoptimized code, collect edge counts for all edges.  Use the counts
to reorder basic blocks in optimized code.  Basic blocks are reordered
by using Pettis and Hansen's "Profile Guided Code Positioning" bottom-up
algorithm.

R=fschneider@google.com, regis@google.com, srdjan@google.com

Review URL: https://codereview.chromium.org//18111006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26773 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-28 09:17:07 +00:00

31 lines
699 B
C++

// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
#ifndef VM_BLOCK_SCHEDULER_H_
#define VM_BLOCK_SCHEDULER_H_
#include "vm/allocation.h"
namespace dart {
class FlowGraph;
class BlockScheduler : public ValueObject {
public:
explicit BlockScheduler(FlowGraph* flow_graph) : flow_graph_(flow_graph) { }
FlowGraph* flow_graph() const { return flow_graph_; }
void AssignEdgeWeights() const;
void ReorderBlocks() const;
private:
FlowGraph* const flow_graph_;
};
} // namespace dart
#endif // VM_BLOCK_SCHEDULER_H_