| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 2011 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2022 TRACE_GVN_1("Updated first-time accumulated %s\n", | 2022 TRACE_GVN_1("Updated first-time accumulated %s\n", |
| 2023 *GetGVNFlagsString(*first_time_changes)); | 2023 *GetGVNFlagsString(*first_time_changes)); |
| 2024 } | 2024 } |
| 2025 } | 2025 } |
| 2026 instr = next; | 2026 instr = next; |
| 2027 } | 2027 } |
| 2028 } | 2028 } |
| 2029 | 2029 |
| 2030 | 2030 |
| 2031 bool HGlobalValueNumberer::AllowCodeMotion() { | 2031 bool HGlobalValueNumberer::AllowCodeMotion() { |
| 2032 return info()->shared_info()->opt_count() + 1 < Compiler::kDefaultMaxOptCount; | 2032 return info()->shared_info()->opt_count() + 1 < FLAG_max_opt_count; |
| 2033 } | 2033 } |
| 2034 | 2034 |
| 2035 | 2035 |
| 2036 bool HGlobalValueNumberer::ShouldMove(HInstruction* instr, | 2036 bool HGlobalValueNumberer::ShouldMove(HInstruction* instr, |
| 2037 HBasicBlock* loop_header) { | 2037 HBasicBlock* loop_header) { |
| 2038 // If we've disabled code motion or we're in a block that unconditionally | 2038 // If we've disabled code motion or we're in a block that unconditionally |
| 2039 // deoptimizes, don't move any instructions. | 2039 // deoptimizes, don't move any instructions. |
| 2040 return AllowCodeMotion() && !instr->block()->IsDeoptimizing(); | 2040 return AllowCodeMotion() && !instr->block()->IsDeoptimizing(); |
| 2041 } | 2041 } |
| 2042 | 2042 |
| (...skipping 7654 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9697 } | 9697 } |
| 9698 } | 9698 } |
| 9699 | 9699 |
| 9700 #ifdef DEBUG | 9700 #ifdef DEBUG |
| 9701 if (graph_ != NULL) graph_->Verify(false); // No full verify. | 9701 if (graph_ != NULL) graph_->Verify(false); // No full verify. |
| 9702 if (allocator_ != NULL) allocator_->Verify(); | 9702 if (allocator_ != NULL) allocator_->Verify(); |
| 9703 #endif | 9703 #endif |
| 9704 } | 9704 } |
| 9705 | 9705 |
| 9706 } } // namespace v8::internal | 9706 } } // namespace v8::internal |
| OLD | NEW |