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

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

Issue 10996057: Instruction size and growth threshold for inlining. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 2 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 | « runtime/vm/flow_graph.h ('k') | runtime/vm/flow_graph_inliner.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/flow_graph.h" 5 #include "vm/flow_graph.h"
6 6
7 #include "vm/bit_vector.h" 7 #include "vm/bit_vector.h"
8 #include "vm/flow_graph_builder.h" 8 #include "vm/flow_graph_builder.h"
9 #include "vm/intermediate_language.h" 9 #include "vm/intermediate_language.h"
10 #include "vm/longjump.h" 10 #include "vm/longjump.h"
(...skipping 902 matching lines...) Expand 10 before | Expand all | Expand 10 after
913 ReorderPhis(caller_entry); 913 ReorderPhis(caller_entry);
914 // Adjust pre/post orders and update the dominator tree. 914 // Adjust pre/post orders and update the dominator tree.
915 DiscoverBlocks(); 915 DiscoverBlocks();
916 // TODO(zerny): Compute the dominator frontier locally. 916 // TODO(zerny): Compute the dominator frontier locally.
917 GrowableArray<BitVector*> dominance_frontier; 917 GrowableArray<BitVector*> dominance_frontier;
918 ComputeDominators(&dominance_frontier); 918 ComputeDominators(&dominance_frontier);
919 } 919 }
920 } 920 }
921 921
922 922
923 intptr_t FlowGraph::InstructionCount() const {
924 intptr_t size = 0;
925 // Iterate each block, skipping the graph entry.
926 for (intptr_t i = 1; i < preorder_.length(); ++i) {
927 for (ForwardInstructionIterator it(preorder_[i]);
928 !it.Done();
929 it.Advance()) {
930 ++size;
931 }
932 }
933 return size;
934 }
935
936
923 } // namespace dart 937 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph.h ('k') | runtime/vm/flow_graph_inliner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698