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

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

Issue 272513004: Reland r20974: Unify and simplify the FastCloneShallowArrayStub (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: This time it will work! Created 6 years, 7 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
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "hydrogen.h" 5 #include "hydrogen.h"
6 #include "hydrogen-gvn.h" 6 #include "hydrogen-gvn.h"
7 #include "v8.h" 7 #include "v8.h"
8 8
9 namespace v8 { 9 namespace v8 {
10 namespace internal { 10 namespace internal {
(...skipping 845 matching lines...) Expand 10 before | Expand all | Expand 10 after
856 dominators->Store(changes, instr); 856 dominators->Store(changes, instr);
857 if (FLAG_trace_gvn) { 857 if (FLAG_trace_gvn) {
858 HeapStringAllocator allocator; 858 HeapStringAllocator allocator;
859 StringStream stream(&allocator); 859 StringStream stream(&allocator);
860 stream.Add("Instruction i%d changes ", instr->id()); 860 stream.Add("Instruction i%d changes ", instr->id());
861 side_effects_tracker_.PrintSideEffectsTo(&stream, changes); 861 side_effects_tracker_.PrintSideEffectsTo(&stream, changes);
862 stream.Add("\n"); 862 stream.Add("\n");
863 stream.OutputToStdOut(); 863 stream.OutputToStdOut();
864 } 864 }
865 } 865 }
866 if (instr->CheckFlag(HValue::kUseGVN)) { 866 if (instr->CheckFlag(HValue::kUseGVN) &&
867 !instr->CheckFlag(HValue::kCantBeReplaced)) {
867 ASSERT(!instr->HasObservableSideEffects()); 868 ASSERT(!instr->HasObservableSideEffects());
868 HInstruction* other = map->Lookup(instr); 869 HInstruction* other = map->Lookup(instr);
869 if (other != NULL) { 870 if (other != NULL) {
870 ASSERT(instr->Equals(other) && other->Equals(instr)); 871 ASSERT(instr->Equals(other) && other->Equals(instr));
871 TRACE_GVN_4("Replacing instruction i%d (%s) with i%d (%s)\n", 872 TRACE_GVN_4("Replacing instruction i%d (%s) with i%d (%s)\n",
872 instr->id(), 873 instr->id(),
873 instr->Mnemonic(), 874 instr->Mnemonic(),
874 other->id(), 875 other->id(),
875 other->Mnemonic()); 876 other->Mnemonic());
876 if (instr->HasSideEffects()) removed_side_effects_ = true; 877 if (instr->HasSideEffects()) removed_side_effects_ = true;
(...skipping 27 matching lines...) Expand all
904 dominated); 905 dominated);
905 successor_map->Kill(side_effects_on_all_paths); 906 successor_map->Kill(side_effects_on_all_paths);
906 successor_dominators->Kill(side_effects_on_all_paths); 907 successor_dominators->Kill(side_effects_on_all_paths);
907 } 908 }
908 } 909 }
909 current = next; 910 current = next;
910 } 911 }
911 } 912 }
912 913
913 } } // namespace v8::internal 914 } } // namespace v8::internal
OLDNEW
« src/hydrogen.cc ('K') | « src/hydrogen.cc ('k') | src/hydrogen-instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698