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

Side by Side Diff: src/hydrogen-gvn.cc

Issue 153533003: Reduce memory usage due to fixpoint iteration of GVN. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 10 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 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 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 visited_on_paths_(graph->blocks()->length(), zone()) { 371 visited_on_paths_(graph->blocks()->length(), zone()) {
372 ASSERT(!AllowHandleAllocation::IsAllowed()); 372 ASSERT(!AllowHandleAllocation::IsAllowed());
373 block_side_effects_.AddBlock(GVNFlagSet(), graph->blocks()->length(), 373 block_side_effects_.AddBlock(GVNFlagSet(), graph->blocks()->length(),
374 zone()); 374 zone());
375 loop_side_effects_.AddBlock(GVNFlagSet(), graph->blocks()->length(), 375 loop_side_effects_.AddBlock(GVNFlagSet(), graph->blocks()->length(),
376 zone()); 376 zone());
377 } 377 }
378 378
379 379
380 void HGlobalValueNumberingPhase::Reset() { 380 void HGlobalValueNumberingPhase::Reset() {
381 block_side_effects_.Clear(); 381 ASSERT(block_side_effects_.length() == graph()->blocks()->length());
382 loop_side_effects_.Clear(); 382 ASSERT(loop_side_effects_.length() == graph()->blocks()->length());
383 for (int i = 0; i < graph()->blocks()->length(); ++i) {
384 block_side_effects_[i] = GVNFlagSet();
385 loop_side_effects_[i] = GVNFlagSet();
386 }
383 visited_on_paths_.Clear(); 387 visited_on_paths_.Clear();
384 block_side_effects_.AddBlock(GVNFlagSet(), graph()->blocks()->length(),
385 zone());
386 loop_side_effects_.AddBlock(GVNFlagSet(), graph()->blocks()->length(),
387 zone());
388 } 388 }
389 389
390 390
391 void HGlobalValueNumberingPhase::Analyze() { 391 void HGlobalValueNumberingPhase::Analyze() {
392 removed_side_effects_ = false; 392 removed_side_effects_ = false;
393 ComputeBlockSideEffects(); 393 ComputeBlockSideEffects();
394 if (FLAG_loop_invariant_code_motion) { 394 if (FLAG_loop_invariant_code_motion) {
395 LoopInvariantCodeMotion(); 395 LoopInvariantCodeMotion();
396 } 396 }
397 AnalyzeGraph(); 397 AnalyzeGraph();
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
862 dominated); 862 dominated);
863 successor_map->Kill(side_effects_on_all_paths); 863 successor_map->Kill(side_effects_on_all_paths);
864 successor_dominators->Kill(side_effects_on_all_paths); 864 successor_dominators->Kill(side_effects_on_all_paths);
865 } 865 }
866 } 866 }
867 current = next; 867 current = next;
868 } 868 }
869 } 869 }
870 870
871 } } // namespace v8::internal 871 } } // 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