Cleanup allocation folding states in lithium.
BUG=chromium:580959 LOG=n Review-Url: https://codereview.chromium.org/1972553002 Cr-Commit-Position: refs/heads/master@{#36163}
This commit is contained in:
parent
9cda0abdde
commit
6e15433db4
@ -5112,10 +5112,7 @@ void LCodeGen::DoAllocate(LAllocate* instr) {
|
||||
if (instr->hydrogen()->IsAllocationFoldingDominator()) {
|
||||
flags = static_cast<AllocationFlags>(flags | ALLOCATION_FOLDING_DOMINATOR);
|
||||
}
|
||||
|
||||
if (instr->hydrogen()->IsAllocationFolded()) {
|
||||
flags = static_cast<AllocationFlags>(flags | ALLOCATION_FOLDED);
|
||||
}
|
||||
DCHECK(!instr->hydrogen()->IsAllocationFolded());
|
||||
|
||||
if (instr->size()->IsConstantOperand()) {
|
||||
int32_t size = ToInteger32(LConstantOperand::cast(instr->size()));
|
||||
@ -5206,11 +5203,12 @@ void LCodeGen::DoDeferredAllocate(LAllocate* instr) {
|
||||
|
||||
void LCodeGen::DoFastAllocate(LFastAllocate* instr) {
|
||||
DCHECK(instr->hydrogen()->IsAllocationFolded());
|
||||
DCHECK(!instr->hydrogen()->IsAllocationFoldingDominator());
|
||||
Register result = ToRegister(instr->result());
|
||||
Register scratch1 = ToRegister(instr->temp1());
|
||||
Register scratch2 = ToRegister(instr->temp2());
|
||||
|
||||
AllocationFlags flags = NO_ALLOCATION_FLAGS;
|
||||
AllocationFlags flags = ALLOCATION_FOLDED;
|
||||
if (instr->hydrogen()->MustAllocateDoubleAligned()) {
|
||||
flags = static_cast<AllocationFlags>(flags | DOUBLE_ALIGNMENT);
|
||||
}
|
||||
@ -5218,15 +5216,13 @@ void LCodeGen::DoFastAllocate(LFastAllocate* instr) {
|
||||
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, scratch1, scratch2, flags);
|
||||
} else {
|
||||
Register size = ToRegister(instr->size());
|
||||
__ FastAllocate(size, result, scratch1, scratch2, flags);
|
||||
}
|
||||
if (instr->size()->IsConstantOperand()) {
|
||||
int32_t size = ToInteger32(LConstantOperand::cast(instr->size()));
|
||||
CHECK(size <= Page::kMaxRegularHeapObjectSize);
|
||||
__ FastAllocate(size, result, scratch1, scratch2, flags);
|
||||
} else {
|
||||
Register size = ToRegister(instr->size());
|
||||
__ FastAllocate(size, result, scratch1, scratch2, flags);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1429,10 +1429,7 @@ void LCodeGen::DoAllocate(LAllocate* instr) {
|
||||
if (instr->hydrogen()->IsAllocationFoldingDominator()) {
|
||||
flags = static_cast<AllocationFlags>(flags | ALLOCATION_FOLDING_DOMINATOR);
|
||||
}
|
||||
|
||||
if (instr->hydrogen()->IsAllocationFolded()) {
|
||||
flags = static_cast<AllocationFlags>(flags | ALLOCATION_FOLDED);
|
||||
}
|
||||
DCHECK(!instr->hydrogen()->IsAllocationFolded());
|
||||
|
||||
if (instr->size()->IsConstantOperand()) {
|
||||
int32_t size = ToInteger32(LConstantOperand::cast(instr->size()));
|
||||
@ -1517,11 +1514,12 @@ void LCodeGen::DoDeferredAllocate(LAllocate* instr) {
|
||||
|
||||
void LCodeGen::DoFastAllocate(LFastAllocate* instr) {
|
||||
DCHECK(instr->hydrogen()->IsAllocationFolded());
|
||||
DCHECK(!instr->hydrogen()->IsAllocationFoldingDominator());
|
||||
Register result = ToRegister(instr->result());
|
||||
Register scratch1 = ToRegister(instr->temp1());
|
||||
Register scratch2 = ToRegister(instr->temp2());
|
||||
|
||||
AllocationFlags flags = NO_ALLOCATION_FLAGS;
|
||||
AllocationFlags flags = ALLOCATION_FOLDED;
|
||||
if (instr->hydrogen()->MustAllocateDoubleAligned()) {
|
||||
flags = static_cast<AllocationFlags>(flags | DOUBLE_ALIGNMENT);
|
||||
}
|
||||
@ -1529,15 +1527,13 @@ void LCodeGen::DoFastAllocate(LFastAllocate* instr) {
|
||||
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, scratch1, scratch2, flags);
|
||||
} else {
|
||||
Register size = ToRegister(instr->size());
|
||||
__ FastAllocate(size, result, scratch1, scratch2, flags);
|
||||
}
|
||||
if (instr->size()->IsConstantOperand()) {
|
||||
int32_t size = ToInteger32(LConstantOperand::cast(instr->size()));
|
||||
CHECK(size <= Page::kMaxRegularHeapObjectSize);
|
||||
__ FastAllocate(size, result, scratch1, scratch2, flags);
|
||||
} else {
|
||||
Register size = ToRegister(instr->size());
|
||||
__ FastAllocate(size, result, scratch1, scratch2, flags);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4869,14 +4869,10 @@ void LCodeGen::DoAllocate(LAllocate* instr) {
|
||||
DCHECK(!instr->hydrogen()->IsNewSpaceAllocation());
|
||||
flags = static_cast<AllocationFlags>(flags | PRETENURE);
|
||||
}
|
||||
|
||||
if (instr->hydrogen()->IsAllocationFoldingDominator()) {
|
||||
flags = static_cast<AllocationFlags>(flags | ALLOCATION_FOLDING_DOMINATOR);
|
||||
}
|
||||
|
||||
if (instr->hydrogen()->IsAllocationFolded()) {
|
||||
flags = static_cast<AllocationFlags>(flags | ALLOCATION_FOLDED);
|
||||
}
|
||||
DCHECK(!instr->hydrogen()->IsAllocationFolded());
|
||||
|
||||
if (instr->size()->IsConstantOperand()) {
|
||||
int32_t size = ToInteger32(LConstantOperand::cast(instr->size()));
|
||||
@ -4909,10 +4905,11 @@ void LCodeGen::DoAllocate(LAllocate* instr) {
|
||||
|
||||
void LCodeGen::DoFastAllocate(LFastAllocate* instr) {
|
||||
DCHECK(instr->hydrogen()->IsAllocationFolded());
|
||||
DCHECK(!instr->hydrogen()->IsAllocationFoldingDominator());
|
||||
Register result = ToRegister(instr->result());
|
||||
Register temp = ToRegister(instr->temp());
|
||||
|
||||
AllocationFlags flags = NO_ALLOCATION_FLAGS;
|
||||
AllocationFlags flags = ALLOCATION_FOLDED;
|
||||
if (instr->hydrogen()->MustAllocateDoubleAligned()) {
|
||||
flags = static_cast<AllocationFlags>(flags | DOUBLE_ALIGNMENT);
|
||||
}
|
||||
@ -4920,15 +4917,13 @@ void LCodeGen::DoFastAllocate(LFastAllocate* instr) {
|
||||
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);
|
||||
}
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5080,10 +5080,7 @@ void LCodeGen::DoAllocate(LAllocate* instr) {
|
||||
if (instr->hydrogen()->IsAllocationFoldingDominator()) {
|
||||
flags = static_cast<AllocationFlags>(flags | ALLOCATION_FOLDING_DOMINATOR);
|
||||
}
|
||||
|
||||
if (instr->hydrogen()->IsAllocationFolded()) {
|
||||
flags = static_cast<AllocationFlags>(flags | ALLOCATION_FOLDED);
|
||||
}
|
||||
DCHECK(!instr->hydrogen()->IsAllocationFolded());
|
||||
|
||||
if (instr->size()->IsConstantOperand()) {
|
||||
int32_t size = ToInteger32(LConstantOperand::cast(instr->size()));
|
||||
@ -5175,11 +5172,12 @@ void LCodeGen::DoDeferredAllocate(LAllocate* instr) {
|
||||
|
||||
void LCodeGen::DoFastAllocate(LFastAllocate* instr) {
|
||||
DCHECK(instr->hydrogen()->IsAllocationFolded());
|
||||
DCHECK(!instr->hydrogen()->IsAllocationFoldingDominator());
|
||||
Register result = ToRegister(instr->result());
|
||||
Register scratch1 = ToRegister(instr->temp1());
|
||||
Register scratch2 = ToRegister(instr->temp2());
|
||||
|
||||
AllocationFlags flags = NO_ALLOCATION_FLAGS;
|
||||
AllocationFlags flags = ALLOCATION_FOLDED;
|
||||
if (instr->hydrogen()->MustAllocateDoubleAligned()) {
|
||||
flags = static_cast<AllocationFlags>(flags | DOUBLE_ALIGNMENT);
|
||||
}
|
||||
@ -5187,15 +5185,13 @@ void LCodeGen::DoFastAllocate(LFastAllocate* instr) {
|
||||
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, scratch1, scratch2, flags);
|
||||
} else {
|
||||
Register size = ToRegister(instr->size());
|
||||
__ FastAllocate(size, result, scratch1, scratch2, flags);
|
||||
}
|
||||
if (instr->size()->IsConstantOperand()) {
|
||||
int32_t size = ToInteger32(LConstantOperand::cast(instr->size()));
|
||||
CHECK(size <= Page::kMaxRegularHeapObjectSize);
|
||||
__ FastAllocate(size, result, scratch1, scratch2, flags);
|
||||
} else {
|
||||
Register size = ToRegister(instr->size());
|
||||
__ FastAllocate(size, result, scratch1, scratch2, flags);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5284,10 +5284,7 @@ void LCodeGen::DoAllocate(LAllocate* instr) {
|
||||
if (instr->hydrogen()->IsAllocationFoldingDominator()) {
|
||||
flags = static_cast<AllocationFlags>(flags | ALLOCATION_FOLDING_DOMINATOR);
|
||||
}
|
||||
|
||||
if (instr->hydrogen()->IsAllocationFolded()) {
|
||||
flags = static_cast<AllocationFlags>(flags | ALLOCATION_FOLDED);
|
||||
}
|
||||
DCHECK(!instr->hydrogen()->IsAllocationFolded());
|
||||
|
||||
if (instr->size()->IsConstantOperand()) {
|
||||
int32_t size = ToInteger32(LConstantOperand::cast(instr->size()));
|
||||
@ -5381,11 +5378,12 @@ void LCodeGen::DoDeferredAllocate(LAllocate* instr) {
|
||||
|
||||
void LCodeGen::DoFastAllocate(LFastAllocate* instr) {
|
||||
DCHECK(instr->hydrogen()->IsAllocationFolded());
|
||||
DCHECK(!instr->hydrogen()->IsAllocationFoldingDominator());
|
||||
Register result = ToRegister(instr->result());
|
||||
Register scratch1 = ToRegister(instr->temp1());
|
||||
Register scratch2 = ToRegister(instr->temp2());
|
||||
|
||||
AllocationFlags flags = NO_ALLOCATION_FLAGS;
|
||||
AllocationFlags flags = ALLOCATION_FOLDED;
|
||||
if (instr->hydrogen()->MustAllocateDoubleAligned()) {
|
||||
flags = static_cast<AllocationFlags>(flags | DOUBLE_ALIGNMENT);
|
||||
}
|
||||
@ -5393,15 +5391,13 @@ void LCodeGen::DoFastAllocate(LFastAllocate* instr) {
|
||||
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, scratch1, scratch2, flags);
|
||||
} else {
|
||||
Register size = ToRegister(instr->size());
|
||||
__ FastAllocate(size, result, scratch1, scratch2, flags);
|
||||
}
|
||||
if (instr->size()->IsConstantOperand()) {
|
||||
int32_t size = ToInteger32(LConstantOperand::cast(instr->size()));
|
||||
CHECK(size <= Page::kMaxRegularHeapObjectSize);
|
||||
__ FastAllocate(size, result, scratch1, scratch2, flags);
|
||||
} else {
|
||||
Register size = ToRegister(instr->size());
|
||||
__ FastAllocate(size, result, scratch1, scratch2, flags);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5173,10 +5173,7 @@ void LCodeGen::DoAllocate(LAllocate* instr) {
|
||||
if (instr->hydrogen()->IsAllocationFoldingDominator()) {
|
||||
flags = static_cast<AllocationFlags>(flags | ALLOCATION_FOLDING_DOMINATOR);
|
||||
}
|
||||
|
||||
if (instr->hydrogen()->IsAllocationFolded()) {
|
||||
flags = static_cast<AllocationFlags>(flags | ALLOCATION_FOLDED);
|
||||
}
|
||||
DCHECK(!instr->hydrogen()->IsAllocationFolded());
|
||||
|
||||
if (instr->size()->IsConstantOperand()) {
|
||||
int32_t size = ToInteger32(LConstantOperand::cast(instr->size()));
|
||||
@ -5209,10 +5206,11 @@ void LCodeGen::DoAllocate(LAllocate* instr) {
|
||||
|
||||
void LCodeGen::DoFastAllocate(LFastAllocate* instr) {
|
||||
DCHECK(instr->hydrogen()->IsAllocationFolded());
|
||||
DCHECK(!instr->hydrogen()->IsAllocationFoldingDominator());
|
||||
Register result = ToRegister(instr->result());
|
||||
Register temp = ToRegister(instr->temp());
|
||||
|
||||
AllocationFlags flags = NO_ALLOCATION_FLAGS;
|
||||
AllocationFlags flags = ALLOCATION_FOLDED;
|
||||
if (instr->hydrogen()->MustAllocateDoubleAligned()) {
|
||||
flags = static_cast<AllocationFlags>(flags | DOUBLE_ALIGNMENT);
|
||||
}
|
||||
@ -5220,15 +5218,13 @@ void LCodeGen::DoFastAllocate(LFastAllocate* instr) {
|
||||
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);
|
||||
}
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5422,10 +5422,7 @@ void LCodeGen::DoAllocate(LAllocate* instr) {
|
||||
if (instr->hydrogen()->IsAllocationFoldingDominator()) {
|
||||
flags = static_cast<AllocationFlags>(flags | ALLOCATION_FOLDING_DOMINATOR);
|
||||
}
|
||||
|
||||
if (instr->hydrogen()->IsAllocationFolded()) {
|
||||
flags = static_cast<AllocationFlags>(flags | ALLOCATION_FOLDED);
|
||||
}
|
||||
DCHECK(!instr->hydrogen()->IsAllocationFolded());
|
||||
|
||||
if (instr->size()->IsConstantOperand()) {
|
||||
int32_t size = ToInteger32(LConstantOperand::cast(instr->size()));
|
||||
@ -5458,10 +5455,11 @@ void LCodeGen::DoAllocate(LAllocate* instr) {
|
||||
|
||||
void LCodeGen::DoFastAllocate(LFastAllocate* instr) {
|
||||
DCHECK(instr->hydrogen()->IsAllocationFolded());
|
||||
DCHECK(!instr->hydrogen()->IsAllocationFoldingDominator());
|
||||
Register result = ToRegister(instr->result());
|
||||
Register temp = ToRegister(instr->temp());
|
||||
|
||||
AllocationFlags flags = NO_ALLOCATION_FLAGS;
|
||||
AllocationFlags flags = ALLOCATION_FOLDED;
|
||||
if (instr->hydrogen()->MustAllocateDoubleAligned()) {
|
||||
flags = static_cast<AllocationFlags>(flags | DOUBLE_ALIGNMENT);
|
||||
}
|
||||
@ -5469,15 +5467,13 @@ void LCodeGen::DoFastAllocate(LFastAllocate* instr) {
|
||||
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);
|
||||
}
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user