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

Side by Side Diff: src/hydrogen.cc

Issue 14895019: Fix code gen bug on arm and mips; SeqStringSetChar overwrites a register; Add better default PrintD… (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Turn late dead code elimination back on. Created 7 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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 5421 matching lines...) Expand 10 before | Expand all | Expand 10 after
5432 // Transitively mark all inputs of live instructions live. 5432 // Transitively mark all inputs of live instructions live.
5433 while (!worklist.is_empty()) { 5433 while (!worklist.is_empty()) {
5434 HValue* instr = worklist.RemoveLast(); 5434 HValue* instr = worklist.RemoveLast();
5435 for (int i = 0; i < instr->OperandCount(); ++i) { 5435 for (int i = 0; i < instr->OperandCount(); ++i) {
5436 MarkLive(instr, instr->OperandAt(i), &worklist); 5436 MarkLive(instr, instr->OperandAt(i), &worklist);
5437 } 5437 }
5438 } 5438 }
5439 } 5439 }
5440 5440
5441 5441
5442 void HGraph::MarkLive(HValue *ref, HValue* instr, 5442 void HGraph::MarkLive(HValue *ref, HValue* instr,
Jakob Kummerow 2013/05/16 13:18:57 nit: while you're here: "HValue* ref", and if all
titzer 2013/05/16 14:28:44 Fits :)
5443 ZoneList<HValue*>* worklist) { 5443 ZoneList<HValue*>* worklist) {
5444 if (!instr->CheckFlag(HValue::kIsLive)) { 5444 if (!instr->CheckFlag(HValue::kIsLive)) {
5445 instr->SetFlag(HValue::kIsLive); 5445 instr->SetFlag(HValue::kIsLive);
5446 worklist->Add(instr, zone()); 5446 worklist->Add(instr, zone());
5447 5447
5448 if (FLAG_trace_dead_code_elimination) { 5448 if (FLAG_trace_dead_code_elimination) {
5449 HeapStringAllocator allocator; 5449 HeapStringAllocator allocator;
5450 StringStream stream(&allocator); 5450 StringStream stream(&allocator);
5451 ALLOW_HANDLE_DEREF(isolate(), "debug mode printing");
Jakob Kummerow 2013/05/16 13:18:57 I don't see any handle being dereferenced?
titzer 2013/05/16 14:28:44 Yeah, it can happen if you try to print an instruc
5451 if (ref != NULL) { 5452 if (ref != NULL) {
5452 ref->PrintTo(&stream); 5453 ref->PrintTo(&stream);
5453 } else { 5454 } else {
5454 stream.Add("root "); 5455 stream.Add("root ");
5455 } 5456 }
5456 stream.Add(" -> "); 5457 stream.Add(" -> ");
5457 instr->PrintTo(&stream); 5458 instr->PrintTo(&stream);
5458 PrintF("[MarkLive %s]\n", *stream.ToCString()); 5459 PrintF("[MarkLive %s]\n", *stream.ToCString());
5459 } 5460 }
5460 } 5461 }
(...skipping 6998 matching lines...) Expand 10 before | Expand all | Expand 10 after
12459 } 12460 }
12460 } 12461 }
12461 12462
12462 #ifdef DEBUG 12463 #ifdef DEBUG
12463 if (graph_ != NULL) graph_->Verify(false); // No full verify. 12464 if (graph_ != NULL) graph_->Verify(false); // No full verify.
12464 if (allocator_ != NULL) allocator_->Verify(); 12465 if (allocator_ != NULL) allocator_->Verify();
12465 #endif 12466 #endif
12466 } 12467 }
12467 12468
12468 } } // namespace v8::internal 12469 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698