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

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

Issue 166163003: Add flags for write barrier elimination and local allocation folding. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comment by Hannes Payer. 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 | « src/hydrogen-instructions.h ('k') | 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 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 3366 matching lines...) Expand 10 before | Expand all | Expand 10 after
3377 3377
3378 // Try to fold allocations together with their dominating allocations. 3378 // Try to fold allocations together with their dominating allocations.
3379 if (!dominator->IsAllocate()) { 3379 if (!dominator->IsAllocate()) {
3380 if (FLAG_trace_allocation_folding) { 3380 if (FLAG_trace_allocation_folding) {
3381 PrintF("#%d (%s) cannot fold into #%d (%s)\n", 3381 PrintF("#%d (%s) cannot fold into #%d (%s)\n",
3382 id(), Mnemonic(), dominator->id(), dominator->Mnemonic()); 3382 id(), Mnemonic(), dominator->id(), dominator->Mnemonic());
3383 } 3383 }
3384 return; 3384 return;
3385 } 3385 }
3386 3386
3387 // Check whether we are folding within the same block for local folding.
3388 if (FLAG_use_local_allocation_folding && dominator->block() != block()) {
3389 if (FLAG_trace_allocation_folding) {
3390 PrintF("#%d (%s) cannot fold into #%d (%s), crosses basic blocks\n",
3391 id(), Mnemonic(), dominator->id(), dominator->Mnemonic());
3392 }
3393 return;
3394 }
3395
3387 HAllocate* dominator_allocate = HAllocate::cast(dominator); 3396 HAllocate* dominator_allocate = HAllocate::cast(dominator);
3388 HValue* dominator_size = dominator_allocate->size(); 3397 HValue* dominator_size = dominator_allocate->size();
3389 HValue* current_size = size(); 3398 HValue* current_size = size();
3390 3399
3391 // TODO(hpayer): Add support for non-constant allocation in dominator. 3400 // TODO(hpayer): Add support for non-constant allocation in dominator.
3392 if (!current_size->IsInteger32Constant() || 3401 if (!current_size->IsInteger32Constant() ||
3393 !dominator_size->IsInteger32Constant()) { 3402 !dominator_size->IsInteger32Constant()) {
3394 if (FLAG_trace_allocation_folding) { 3403 if (FLAG_trace_allocation_folding) {
3395 PrintF("#%d (%s) cannot fold into #%d (%s), dynamic allocation size\n", 3404 PrintF("#%d (%s) cannot fold into #%d (%s), dynamic allocation size\n",
3396 id(), Mnemonic(), dominator->id(), dominator->Mnemonic()); 3405 id(), Mnemonic(), dominator->id(), dominator->Mnemonic());
(...skipping 1019 matching lines...) Expand 10 before | Expand all | Expand 10 after
4416 break; 4425 break;
4417 case kExternalMemory: 4426 case kExternalMemory:
4418 stream->Add("[external-memory]"); 4427 stream->Add("[external-memory]");
4419 break; 4428 break;
4420 } 4429 }
4421 4430
4422 stream->Add("@%d", offset()); 4431 stream->Add("@%d", offset());
4423 } 4432 }
4424 4433
4425 } } // namespace v8::internal 4434 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/hydrogen-instructions.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698