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

Side by Side Diff: src/hydrogen.cc

Issue 9188005: Blocks that contain soft deopts have no side effects. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 11 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 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 1396 matching lines...) Expand 10 before | Expand all | Expand 10 after
1407 1407
1408 void HGlobalValueNumberer::ComputeBlockSideEffects() { 1408 void HGlobalValueNumberer::ComputeBlockSideEffects() {
1409 for (int i = graph_->blocks()->length() - 1; i >= 0; --i) { 1409 for (int i = graph_->blocks()->length() - 1; i >= 0; --i) {
1410 // Compute side effects for the block. 1410 // Compute side effects for the block.
1411 HBasicBlock* block = graph_->blocks()->at(i); 1411 HBasicBlock* block = graph_->blocks()->at(i);
1412 HInstruction* instr = block->first(); 1412 HInstruction* instr = block->first();
1413 int id = block->block_id(); 1413 int id = block->block_id();
1414 int side_effects = 0; 1414 int side_effects = 0;
1415 while (instr != NULL) { 1415 while (instr != NULL) {
1416 side_effects |= instr->ChangesFlags(); 1416 side_effects |= instr->ChangesFlags();
1417 if (instr->IsSoftDeoptimize()) {
1418 block_side_effects_[id] = 0;
1419 side_effects = 0;
1420 break;
1421 }
1417 instr = instr->next(); 1422 instr = instr->next();
1418 } 1423 }
1419 block_side_effects_[id] |= side_effects; 1424 block_side_effects_[id] |= side_effects;
1420 1425
1421 // Loop headers are part of their loop. 1426 // Loop headers are part of their loop.
1422 if (block->IsLoopHeader()) { 1427 if (block->IsLoopHeader()) {
1423 loop_side_effects_[id] |= side_effects; 1428 loop_side_effects_[id] |= side_effects;
1424 } 1429 }
1425 1430
1426 // Propagate loop side effects upwards. 1431 // Propagate loop side effects upwards.
(...skipping 5957 matching lines...) Expand 10 before | Expand all | Expand 10 after
7384 } 7389 }
7385 } 7390 }
7386 7391
7387 #ifdef DEBUG 7392 #ifdef DEBUG
7388 if (graph_ != NULL) graph_->Verify(false); // No full verify. 7393 if (graph_ != NULL) graph_->Verify(false); // No full verify.
7389 if (allocator_ != NULL) allocator_->Verify(); 7394 if (allocator_ != NULL) allocator_->Verify();
7390 #endif 7395 #endif
7391 } 7396 }
7392 7397
7393 } } // namespace v8::internal 7398 } } // 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