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

Unified Diff: src/lithium.cc

Issue 17572011: Split HPhase for Lithium and Hydrogen using common CompilationPhase base. (Closed) Base URL: git@github.com:v8/v8.git@master
Patch Set: Created 7 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: src/lithium.cc
diff --git a/src/lithium.cc b/src/lithium.cc
index 2993c9aa73155bbfad9122a3d021d08f9107c761..a7c625afba4a52ff63a7d56646f6c985bba1ff9e 100644
--- a/src/lithium.cc
+++ b/src/lithium.cc
@@ -307,7 +307,7 @@ Label* LChunk::GetAssemblyLabel(int block_id) const {
}
void LChunk::MarkEmptyBlocks() {
- HPhase phase("L_Mark empty blocks", this);
+ LPhase phase("L_Mark empty blocks", this);
for (int i = 0; i < graph()->blocks()->length(); ++i) {
HBasicBlock* block = graph()->blocks()->at(i);
int first = block->first_instruction_index();
@@ -491,4 +491,28 @@ void LChunk::set_allocated_double_registers(BitVector* allocated_registers) {
}
+LPhase::LPhase(const char* name, LAllocator* allocator)
+ : CompilationPhase(name, allocator->isolate(), allocator->zone()),
+ allocator_(allocator), chunk_(allocator->chunk()) { }
+
+
+LPhase::LPhase(const char* name, LChunk* chunk)
+ : CompilationPhase(name, chunk->isolate(), chunk->zone()),
+ allocator_(NULL), chunk_(chunk) { }
+
+
+LPhase::~LPhase() {
+ if (ShouldProduceTraceOutput()) {
+ isolate()->GetHTracer()->TraceLithium(name(), chunk_);
+ if (allocator_ != NULL) {
+ isolate()->GetHTracer()->TraceLiveRanges(name(), allocator_);
+ }
+ }
+
+#ifdef DEBUG
+ if (allocator_ != NULL) allocator_->Verify();
+#endif
+}
+
+
} } // namespace v8::internal
« src/compiler.cc ('K') | « src/lithium.h ('k') | src/lithium-allocator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698