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

Unified Diff: src/crankshaft/x87/lithium-codegen-x87.cc

Issue 1969553003: X87: [crankshaft] Fragmentation-free allocation folding. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/x87/macro-assembler-x87.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/crankshaft/x87/lithium-codegen-x87.cc
diff --git a/src/crankshaft/x87/lithium-codegen-x87.cc b/src/crankshaft/x87/lithium-codegen-x87.cc
index f4159a65b0c0c4bc12685e0b82f84236fe72a960..7444ff0e0e29e547135332dd0c610d1d9f483710 100644
--- a/src/crankshaft/x87/lithium-codegen-x87.cc
+++ b/src/crankshaft/x87/lithium-codegen-x87.cc
@@ -5456,6 +5456,30 @@ void LCodeGen::DoAllocate(LAllocate* instr) {
}
}
+void LCodeGen::DoFastAllocate(LFastAllocate* instr) {
Hannes Payer (out of office) 2016/05/11 07:44:41 Why do you move that piece of code? I would like t
+ DCHECK(instr->hydrogen()->IsAllocationFolded());
+ Register result = ToRegister(instr->result());
+ Register temp = ToRegister(instr->temp());
+
+ AllocationFlags flags = NO_ALLOCATION_FLAGS;
+ if (instr->hydrogen()->MustAllocateDoubleAligned()) {
+ flags = static_cast<AllocationFlags>(flags | DOUBLE_ALIGNMENT);
+ }
+ if (instr->hydrogen()->IsOldSpaceAllocation()) {
+ DCHECK(!instr->hydrogen()->IsNewSpaceAllocation());
+ flags = static_cast<AllocationFlags>(flags | PRETENURE);
+ }
+ if (!instr->hydrogen()->IsAllocationFoldingDominator()) {
+ if (instr->size()->IsConstantOperand()) {
+ int32_t size = ToInteger32(LConstantOperand::cast(instr->size()));
+ CHECK(size <= Page::kMaxRegularHeapObjectSize);
+ __ FastAllocate(size, result, temp, flags);
+ } else {
+ Register size = ToRegister(instr->size());
+ __ FastAllocate(size, result, temp, flags);
+ }
+ }
+}
void LCodeGen::DoDeferredAllocate(LAllocate* instr) {
Register result = ToRegister(instr->result());
@@ -5513,31 +5537,6 @@ void LCodeGen::DoDeferredAllocate(LAllocate* instr) {
}
}
-void LCodeGen::DoFastAllocate(LFastAllocate* instr) {
- DCHECK(instr->hydrogen()->IsAllocationFolded());
- Register result = ToRegister(instr->result());
- Register temp = ToRegister(instr->temp());
-
- AllocationFlags flags = NO_ALLOCATION_FLAGS;
- if (instr->hydrogen()->MustAllocateDoubleAligned()) {
- flags = static_cast<AllocationFlags>(flags | DOUBLE_ALIGNMENT);
- }
- if (instr->hydrogen()->IsOldSpaceAllocation()) {
- DCHECK(!instr->hydrogen()->IsNewSpaceAllocation());
- flags = static_cast<AllocationFlags>(flags | PRETENURE);
- }
- if (!instr->hydrogen()->IsAllocationFoldingDominator()) {
- if (instr->size()->IsConstantOperand()) {
- int32_t size = ToInteger32(LConstantOperand::cast(instr->size()));
- CHECK(size <= Page::kMaxRegularHeapObjectSize);
- __ FastAllocate(size, result, temp, flags);
- } else {
- Register size = ToRegister(instr->size());
- __ FastAllocate(size, result, temp, flags);
- }
- }
-}
-
void LCodeGen::DoTypeof(LTypeof* instr) {
DCHECK(ToRegister(instr->context()).is(esi));
« no previous file with comments | « no previous file | src/x87/macro-assembler-x87.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698