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

Unified Diff: runtime/vm/flow_graph_inliner.cc

Issue 2097413002: Improve inlining of recognized methods in AOT. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/flow_graph_inliner.h ('k') | runtime/vm/precompiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_inliner.cc
diff --git a/runtime/vm/flow_graph_inliner.cc b/runtime/vm/flow_graph_inliner.cc
index bba04b4cbda42b232b9b4970a8db72c670e5266e..35f61904a1c013b190eae93964474961e3bd6fe2 100644
--- a/runtime/vm/flow_graph_inliner.cc
+++ b/runtime/vm/flow_graph_inliner.cc
@@ -1001,7 +1001,6 @@ class CallSiteInliner : public ValueObject {
private:
friend class PolymorphicInliner;
-
static bool Contains(const GrowableArray<intptr_t>& a, intptr_t deopt_id) {
for (intptr_t i = 0; i < a.length(); i++) {
if (a[i] == deopt_id) return true;
@@ -1470,7 +1469,8 @@ bool PolymorphicInliner::CheckNonInlinedDuplicate(const Function& target) {
bool PolymorphicInliner::TryInliningPoly(intptr_t receiver_cid,
const Function& target) {
- if (TryInlineRecognizedMethod(receiver_cid, target)) {
+ if (owner_->inliner_->use_speculative_inlining() &&
+ TryInlineRecognizedMethod(receiver_cid, target)) {
owner_->inlined_ = true;
return true;
}
@@ -2898,11 +2898,6 @@ bool FlowGraphInliner::TryInlineRecognizedMethod(FlowGraph* flow_graph,
const ICData& ic_data,
TargetEntryInstr** entry,
Definition** last) {
- if (FLAG_precompiled_mode) {
- // The graphs generated below include deopts.
- return false;
- }
-
ICData& value_check = ICData::ZoneHandle(Z);
MethodRecognizer::Kind kind = MethodRecognizer::RecognizeKind(target);
switch (kind) {
« no previous file with comments | « runtime/vm/flow_graph_inliner.h ('k') | runtime/vm/precompiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698