| 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 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 394 loop_side_effects_[i].RemoveAll(); | 394 loop_side_effects_[i].RemoveAll(); |
| 395 } | 395 } |
| 396 for (int i = graph()->blocks()->length() - 1; i >= 0; --i) { | 396 for (int i = graph()->blocks()->length() - 1; i >= 0; --i) { |
| 397 // Compute side effects for the block. | 397 // Compute side effects for the block. |
| 398 HBasicBlock* block = graph()->blocks()->at(i); | 398 HBasicBlock* block = graph()->blocks()->at(i); |
| 399 int id = block->block_id(); | 399 int id = block->block_id(); |
| 400 GVNFlagSet side_effects; | 400 GVNFlagSet side_effects; |
| 401 for (HInstructionIterator it(block); !it.Done(); it.Advance()) { | 401 for (HInstructionIterator it(block); !it.Done(); it.Advance()) { |
| 402 HInstruction* instr = it.Current(); | 402 HInstruction* instr = it.Current(); |
| 403 side_effects.Add(instr->ChangesFlags()); | 403 side_effects.Add(instr->ChangesFlags()); |
| 404 if (instr->IsSoftDeoptimize()) { | 404 if (instr->IsDeoptimize()) { |
| 405 block_side_effects_[id].RemoveAll(); | 405 block_side_effects_[id].RemoveAll(); |
| 406 side_effects.RemoveAll(); | 406 side_effects.RemoveAll(); |
| 407 break; | 407 break; |
| 408 } | 408 } |
| 409 } | 409 } |
| 410 block_side_effects_[id].Add(side_effects); | 410 block_side_effects_[id].Add(side_effects); |
| 411 | 411 |
| 412 // Loop headers are part of their loop. | 412 // Loop headers are part of their loop. |
| 413 if (block->IsLoopHeader()) { | 413 if (block->IsLoopHeader()) { |
| 414 loop_side_effects_[id].Add(side_effects); | 414 loop_side_effects_[id].Add(side_effects); |
| (...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 846 dominated); | 846 dominated); |
| 847 successor_map->Kill(side_effects_on_all_paths); | 847 successor_map->Kill(side_effects_on_all_paths); |
| 848 successor_dominators->Kill(side_effects_on_all_paths); | 848 successor_dominators->Kill(side_effects_on_all_paths); |
| 849 } | 849 } |
| 850 } | 850 } |
| 851 current = next; | 851 current = next; |
| 852 } | 852 } |
| 853 } | 853 } |
| 854 | 854 |
| 855 } } // namespace v8::internal | 855 } } // namespace v8::internal |
| OLD | NEW |