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

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

Issue 1758653003: Add source position information to profile (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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_inliner.h" 5 #include "vm/flow_graph_inliner.h"
6 6
7 #include "vm/aot_optimizer.h" 7 #include "vm/aot_optimizer.h"
8 #include "vm/block_scheduler.h" 8 #include "vm/block_scheduler.h"
9 #include "vm/branch_optimizer.h" 9 #include "vm/branch_optimizer.h"
10 #include "vm/compiler.h" 10 #include "vm/compiler.h"
(...skipping 1942 matching lines...) Expand 10 before | Expand all | Expand 10 after
1953 1953
1954 intptr_t FlowGraphInliner::NextInlineId(const Function& function, 1954 intptr_t FlowGraphInliner::NextInlineId(const Function& function,
1955 TokenPosition tp, 1955 TokenPosition tp,
1956 intptr_t parent_id) { 1956 intptr_t parent_id) {
1957 const intptr_t id = inline_id_to_function_->length(); 1957 const intptr_t id = inline_id_to_function_->length();
1958 // TODO(johnmccutchan): Do not allow IsNoSource once all nodes have proper 1958 // TODO(johnmccutchan): Do not allow IsNoSource once all nodes have proper
1959 // source positions. 1959 // source positions.
1960 ASSERT(tp.IsReal() || tp.IsSynthetic() || tp.IsNoSource()); 1960 ASSERT(tp.IsReal() || tp.IsSynthetic() || tp.IsNoSource());
1961 inline_id_to_function_->Add(&function); 1961 inline_id_to_function_->Add(&function);
1962 inline_id_to_token_pos_->Add(tp); 1962 inline_id_to_token_pos_->Add(tp);
1963 ASSERT(inline_id_to_token_pos_->length() == inline_id_to_function_->length());
1964 caller_inline_id_->Add(parent_id); 1963 caller_inline_id_->Add(parent_id);
1964 // We always have one less token position than function.
1965 ASSERT(inline_id_to_token_pos_->length() ==
srdjan 2016/03/02 19:02:55 s/function/functions/
Cutch 2016/03/02 19:14:07 Done.
1966 (inline_id_to_function_->length() - 1));
1965 return id; 1967 return id;
1966 } 1968 }
1967 1969
1968 1970
1969 static bool ShouldInlineSimd() { 1971 static bool ShouldInlineSimd() {
1970 return FlowGraphCompiler::SupportsUnboxedSimd128(); 1972 return FlowGraphCompiler::SupportsUnboxedSimd128();
1971 } 1973 }
1972 1974
1973 1975
1974 static bool CanUnboxDouble() { 1976 static bool CanUnboxDouble() {
(...skipping 1088 matching lines...) Expand 10 before | Expand all | Expand 10 after
3063 return InlineDoubleOp(flow_graph, Token::kMUL, call, entry, last); 3065 return InlineDoubleOp(flow_graph, Token::kMUL, call, entry, last);
3064 case MethodRecognizer::kDoubleDiv: 3066 case MethodRecognizer::kDoubleDiv:
3065 return InlineDoubleOp(flow_graph, Token::kDIV, call, entry, last); 3067 return InlineDoubleOp(flow_graph, Token::kDIV, call, entry, last);
3066 default: 3068 default:
3067 return false; 3069 return false;
3068 } 3070 }
3069 } 3071 }
3070 3072
3071 3073
3072 } // namespace dart 3074 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698