OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
397 loop_side_effects_[i].RemoveAll(); | 397 loop_side_effects_[i].RemoveAll(); |
398 } | 398 } |
399 for (int i = graph_->blocks()->length() - 1; i >= 0; --i) { | 399 for (int i = graph_->blocks()->length() - 1; i >= 0; --i) { |
400 // Compute side effects for the block. | 400 // Compute side effects for the block. |
401 HBasicBlock* block = graph_->blocks()->at(i); | 401 HBasicBlock* block = graph_->blocks()->at(i); |
402 HInstruction* instr = block->first(); | 402 HInstruction* instr = block->first(); |
403 int id = block->block_id(); | 403 int id = block->block_id(); |
404 GVNFlagSet side_effects; | 404 GVNFlagSet side_effects; |
405 while (instr != NULL) { | 405 while (instr != NULL) { |
406 side_effects.Add(instr->ChangesFlags()); | 406 side_effects.Add(instr->ChangesFlags()); |
407 if (instr->IsSoftDeoptimize()) { | 407 if (instr->IsSoftDeoptimize() || instr->IsDeoptCounterAdd()) { |
408 block_side_effects_[id].RemoveAll(); | 408 block_side_effects_[id].RemoveAll(); |
409 side_effects.RemoveAll(); | 409 side_effects.RemoveAll(); |
410 break; | 410 break; |
411 } | 411 } |
412 instr = instr->next(); | 412 instr = instr->next(); |
413 } | 413 } |
414 block_side_effects_[id].Add(side_effects); | 414 block_side_effects_[id].Add(side_effects); |
415 | 415 |
416 // Loop headers are part of their loop. | 416 // Loop headers are part of their loop. |
417 if (block->IsLoopHeader()) { | 417 if (block->IsLoopHeader()) { |
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
849 dominated); | 849 dominated); |
850 successor_map->Kill(side_effects_on_all_paths); | 850 successor_map->Kill(side_effects_on_all_paths); |
851 successor_dominators->Kill(side_effects_on_all_paths); | 851 successor_dominators->Kill(side_effects_on_all_paths); |
852 } | 852 } |
853 } | 853 } |
854 current = next; | 854 current = next; |
855 } | 855 } |
856 } | 856 } |
857 | 857 |
858 } } // namespace v8::internal | 858 } } // namespace v8::internal |
OLD | NEW |