S390: IC: Eliminate initialization_state as a factor in IC installation.
Port 56d90782a5
Original commit message:
In Crankshaft, we would install special ICs that didn't need a vector and slot
in the MEGAMORPHIC case. This optimization limits our hand against future
improvements.
R=mvstanton@chromium.org, joransiu@ca.ibm.com, michael_dawson@ca.ibm.com, mbrandy@us.ibm.com, bjaideep@ca.ibm.com
BUG=
Review-Url: https://codereview.chromium.org/2028663002
Cr-Commit-Position: refs/heads/master@{#36620}
This commit is contained in:
parent
2f5ba83bc0
commit
0ac67d74c6
@ -2676,9 +2676,9 @@ void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) {
|
||||
|
||||
__ mov(LoadDescriptor::NameRegister(), Operand(instr->name()));
|
||||
EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr);
|
||||
Handle<Code> ic = CodeFactory::LoadICInOptimizedCode(
|
||||
isolate(), instr->typeof_mode(), PREMONOMORPHIC)
|
||||
.code();
|
||||
Handle<Code> ic =
|
||||
CodeFactory::LoadICInOptimizedCode(isolate(), instr->typeof_mode())
|
||||
.code();
|
||||
CallCode(ic, RelocInfo::CODE_TARGET, instr);
|
||||
}
|
||||
|
||||
@ -2779,10 +2779,8 @@ void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) {
|
||||
// Name is always in r4.
|
||||
__ mov(LoadDescriptor::NameRegister(), Operand(instr->name()));
|
||||
EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr);
|
||||
Handle<Code> ic = CodeFactory::LoadICInOptimizedCode(
|
||||
isolate(), NOT_INSIDE_TYPEOF,
|
||||
instr->hydrogen()->initialization_state())
|
||||
.code();
|
||||
Handle<Code> ic =
|
||||
CodeFactory::LoadICInOptimizedCode(isolate(), NOT_INSIDE_TYPEOF).code();
|
||||
CallCode(ic, RelocInfo::CODE_TARGET, instr);
|
||||
}
|
||||
|
||||
@ -3129,14 +3127,9 @@ void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) {
|
||||
DCHECK(ToRegister(instr->context()).is(cp));
|
||||
DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister()));
|
||||
DCHECK(ToRegister(instr->key()).is(LoadDescriptor::NameRegister()));
|
||||
EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr);
|
||||
|
||||
if (instr->hydrogen()->HasVectorAndSlot()) {
|
||||
EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr);
|
||||
}
|
||||
|
||||
Handle<Code> ic = CodeFactory::KeyedLoadICInOptimizedCode(
|
||||
isolate(), instr->hydrogen()->initialization_state())
|
||||
.code();
|
||||
Handle<Code> ic = CodeFactory::KeyedLoadICInOptimizedCode(isolate()).code();
|
||||
CallCode(ic, RelocInfo::CODE_TARGET, instr);
|
||||
}
|
||||
|
||||
@ -3990,15 +3983,12 @@ void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) {
|
||||
DCHECK(ToRegister(instr->object()).is(StoreDescriptor::ReceiverRegister()));
|
||||
DCHECK(ToRegister(instr->value()).is(StoreDescriptor::ValueRegister()));
|
||||
|
||||
if (instr->hydrogen()->HasVectorAndSlot()) {
|
||||
EmitVectorStoreICRegisters<LStoreNamedGeneric>(instr);
|
||||
}
|
||||
EmitVectorStoreICRegisters<LStoreNamedGeneric>(instr);
|
||||
|
||||
__ mov(StoreDescriptor::NameRegister(), Operand(instr->name()));
|
||||
Handle<Code> ic = CodeFactory::StoreICInOptimizedCode(
|
||||
isolate(), instr->language_mode(),
|
||||
instr->hydrogen()->initialization_state())
|
||||
.code();
|
||||
Handle<Code> ic =
|
||||
CodeFactory::StoreICInOptimizedCode(isolate(), instr->language_mode())
|
||||
.code();
|
||||
CallCode(ic, RelocInfo::CODE_TARGET, instr);
|
||||
}
|
||||
|
||||
@ -4291,13 +4281,10 @@ void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) {
|
||||
DCHECK(ToRegister(instr->key()).is(StoreDescriptor::NameRegister()));
|
||||
DCHECK(ToRegister(instr->value()).is(StoreDescriptor::ValueRegister()));
|
||||
|
||||
if (instr->hydrogen()->HasVectorAndSlot()) {
|
||||
EmitVectorStoreICRegisters<LStoreKeyedGeneric>(instr);
|
||||
}
|
||||
EmitVectorStoreICRegisters<LStoreKeyedGeneric>(instr);
|
||||
|
||||
Handle<Code> ic = CodeFactory::KeyedStoreICInOptimizedCode(
|
||||
isolate(), instr->language_mode(),
|
||||
instr->hydrogen()->initialization_state())
|
||||
isolate(), instr->language_mode())
|
||||
.code();
|
||||
CallCode(ic, RelocInfo::CODE_TARGET, instr);
|
||||
}
|
||||
|
@ -1814,10 +1814,7 @@ LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) {
|
||||
LOperand* context = UseFixed(instr->context(), cp);
|
||||
LOperand* global_object =
|
||||
UseFixed(instr->global_object(), LoadDescriptor::ReceiverRegister());
|
||||
LOperand* vector = NULL;
|
||||
if (instr->HasVectorAndSlot()) {
|
||||
vector = FixedTemp(LoadWithVectorDescriptor::VectorRegister());
|
||||
}
|
||||
LOperand* vector = FixedTemp(LoadWithVectorDescriptor::VectorRegister());
|
||||
LLoadGlobalGeneric* result =
|
||||
new (zone()) LLoadGlobalGeneric(context, global_object, vector);
|
||||
return MarkAsCall(DefineFixed(result, r2), instr);
|
||||
@ -1859,10 +1856,7 @@ LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) {
|
||||
LOperand* context = UseFixed(instr->context(), cp);
|
||||
LOperand* object =
|
||||
UseFixed(instr->object(), LoadDescriptor::ReceiverRegister());
|
||||
LOperand* vector = NULL;
|
||||
if (instr->HasVectorAndSlot()) {
|
||||
vector = FixedTemp(LoadWithVectorDescriptor::VectorRegister());
|
||||
}
|
||||
LOperand* vector = FixedTemp(LoadWithVectorDescriptor::VectorRegister());
|
||||
|
||||
LInstruction* result =
|
||||
DefineFixed(new (zone()) LLoadNamedGeneric(context, object, vector), r2);
|
||||
@ -1928,10 +1922,7 @@ LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) {
|
||||
LOperand* object =
|
||||
UseFixed(instr->object(), LoadDescriptor::ReceiverRegister());
|
||||
LOperand* key = UseFixed(instr->key(), LoadDescriptor::NameRegister());
|
||||
LOperand* vector = NULL;
|
||||
if (instr->HasVectorAndSlot()) {
|
||||
vector = FixedTemp(LoadWithVectorDescriptor::VectorRegister());
|
||||
}
|
||||
LOperand* vector = FixedTemp(LoadWithVectorDescriptor::VectorRegister());
|
||||
|
||||
LInstruction* result = DefineFixed(
|
||||
new (zone()) LLoadKeyedGeneric(context, object, key, vector), r2);
|
||||
@ -1988,12 +1979,8 @@ LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) {
|
||||
DCHECK(instr->key()->representation().IsTagged());
|
||||
DCHECK(instr->value()->representation().IsTagged());
|
||||
|
||||
LOperand* slot = NULL;
|
||||
LOperand* vector = NULL;
|
||||
if (instr->HasVectorAndSlot()) {
|
||||
slot = FixedTemp(VectorStoreICDescriptor::SlotRegister());
|
||||
vector = FixedTemp(VectorStoreICDescriptor::VectorRegister());
|
||||
}
|
||||
LOperand* slot = FixedTemp(VectorStoreICDescriptor::SlotRegister());
|
||||
LOperand* vector = FixedTemp(VectorStoreICDescriptor::VectorRegister());
|
||||
|
||||
LStoreKeyedGeneric* result =
|
||||
new (zone()) LStoreKeyedGeneric(context, obj, key, val, slot, vector);
|
||||
@ -2076,13 +2063,8 @@ LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) {
|
||||
LOperand* obj =
|
||||
UseFixed(instr->object(), StoreDescriptor::ReceiverRegister());
|
||||
LOperand* val = UseFixed(instr->value(), StoreDescriptor::ValueRegister());
|
||||
LOperand* slot = NULL;
|
||||
LOperand* vector = NULL;
|
||||
if (instr->HasVectorAndSlot()) {
|
||||
slot = FixedTemp(VectorStoreICDescriptor::SlotRegister());
|
||||
vector = FixedTemp(VectorStoreICDescriptor::VectorRegister());
|
||||
}
|
||||
|
||||
LOperand* slot = FixedTemp(VectorStoreICDescriptor::SlotRegister());
|
||||
LOperand* vector = FixedTemp(VectorStoreICDescriptor::VectorRegister());
|
||||
LStoreNamedGeneric* result =
|
||||
new (zone()) LStoreNamedGeneric(context, obj, val, slot, vector);
|
||||
return MarkAsCall(result, instr);
|
||||
|
Loading…
Reference in New Issue
Block a user