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 350 matching lines...) Loading... |
361 } | 361 } |
362 | 362 |
363 | 363 |
364 HGlobalValueNumberer::HGlobalValueNumberer(HGraph* graph, CompilationInfo* info) | 364 HGlobalValueNumberer::HGlobalValueNumberer(HGraph* graph, CompilationInfo* info) |
365 : graph_(graph), | 365 : graph_(graph), |
366 info_(info), | 366 info_(info), |
367 removed_side_effects_(false), | 367 removed_side_effects_(false), |
368 block_side_effects_(graph->blocks()->length(), graph->zone()), | 368 block_side_effects_(graph->blocks()->length(), graph->zone()), |
369 loop_side_effects_(graph->blocks()->length(), graph->zone()), | 369 loop_side_effects_(graph->blocks()->length(), graph->zone()), |
370 visited_on_paths_(graph->zone(), graph->blocks()->length()) { | 370 visited_on_paths_(graph->zone(), graph->blocks()->length()) { |
371 #ifdef DEBUG | 371 ASSERT(!AllowHandleAllocation::IsAllowed()); |
372 ASSERT(info->isolate()->optimizing_compiler_thread()->IsOptimizerThread() || | |
373 !info->isolate()->heap()->IsAllocationAllowed()); | |
374 #endif | |
375 block_side_effects_.AddBlock(GVNFlagSet(), graph_->blocks()->length(), | 372 block_side_effects_.AddBlock(GVNFlagSet(), graph_->blocks()->length(), |
376 graph_->zone()); | 373 graph_->zone()); |
377 loop_side_effects_.AddBlock(GVNFlagSet(), graph_->blocks()->length(), | 374 loop_side_effects_.AddBlock(GVNFlagSet(), graph_->blocks()->length(), |
378 graph_->zone()); | 375 graph_->zone()); |
379 } | 376 } |
380 | 377 |
381 bool HGlobalValueNumberer::Analyze() { | 378 bool HGlobalValueNumberer::Analyze() { |
382 removed_side_effects_ = false; | 379 removed_side_effects_ = false; |
383 ComputeBlockSideEffects(); | 380 ComputeBlockSideEffects(); |
384 if (FLAG_loop_invariant_code_motion) { | 381 if (FLAG_loop_invariant_code_motion) { |
(...skipping 464 matching lines...) Loading... |
849 dominated); | 846 dominated); |
850 successor_map->Kill(side_effects_on_all_paths); | 847 successor_map->Kill(side_effects_on_all_paths); |
851 successor_dominators->Kill(side_effects_on_all_paths); | 848 successor_dominators->Kill(side_effects_on_all_paths); |
852 } | 849 } |
853 } | 850 } |
854 current = next; | 851 current = next; |
855 } | 852 } |
856 } | 853 } |
857 | 854 |
858 } } // namespace v8::internal | 855 } } // namespace v8::internal |
OLD | NEW |