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

Side by Side Diff: src/hydrogen.cc

Issue 8267007: Always limit inlining depth to avoid taking too much time for --stress-opt runs. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 4537 matching lines...) Expand 10 before | Expand all | Expand 10 after
4548 TraceInline(target, caller, "target requires context change"); 4548 TraceInline(target, caller, "target requires context change");
4549 return false; 4549 return false;
4550 } 4550 }
4551 #endif 4551 #endif
4552 4552
4553 4553
4554 // Don't inline deeper than kMaxInliningLevels calls. 4554 // Don't inline deeper than kMaxInliningLevels calls.
4555 HEnvironment* env = environment(); 4555 HEnvironment* env = environment();
4556 int current_level = 1; 4556 int current_level = 1;
4557 while (env->outer() != NULL) { 4557 while (env->outer() != NULL) {
4558 if (current_level == (FLAG_limit_inlining 4558 if (current_level == Compiler::kMaxInliningLevels) {
4559 ? Compiler::kMaxInliningLevels
4560 : 2 * Compiler::kMaxInliningLevels)) {
4561 TraceInline(target, caller, "inline depth limit reached"); 4559 TraceInline(target, caller, "inline depth limit reached");
4562 return false; 4560 return false;
4563 } 4561 }
4564 current_level++; 4562 current_level++;
4565 env = env->outer(); 4563 env = env->outer();
4566 } 4564 }
4567 4565
4568 // Don't inline recursive functions. 4566 // Don't inline recursive functions.
4569 if (*target_shared == outer_info->closure()->shared()) { 4567 if (*target_shared == outer_info->closure()->shared()) {
4570 TraceInline(target, caller, "target is recursive"); 4568 TraceInline(target, caller, "target is recursive");
(...skipping 2368 matching lines...) Expand 10 before | Expand all | Expand 10 after
6939 } 6937 }
6940 } 6938 }
6941 6939
6942 #ifdef DEBUG 6940 #ifdef DEBUG
6943 if (graph_ != NULL) graph_->Verify(false); // No full verify. 6941 if (graph_ != NULL) graph_->Verify(false); // No full verify.
6944 if (allocator_ != NULL) allocator_->Verify(); 6942 if (allocator_ != NULL) allocator_->Verify();
6945 #endif 6943 #endif
6946 } 6944 }
6947 6945
6948 } } // namespace v8::internal 6946 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698