PPC: [turbofan] Materialize JSFunction from frame if possible.
Port 725cdc533c
Original commit message:
This reduces the overhead of recursive calls when context specialization
is enabled. Based on this it might be possible to further reduce the
overhead by also specializing the call itself.
As a drive-by-fix, port the fast context materialization optimization to
arm and arm64, that was previously only supported on x64 and ia32.
R=mbrandy@us.ibm.com
BUG=
Review URL: https://codereview.chromium.org/1078183002
Cr-Commit-Position: refs/heads/master@{#27762}
This commit is contained in:
parent
3ab8a50244
commit
d646fcc2f0
@ -1348,9 +1348,25 @@ void CodeGenerator::AssembleMove(InstructionOperand* source,
|
||||
case Constant::kExternalReference:
|
||||
__ mov(dst, Operand(src.ToExternalReference()));
|
||||
break;
|
||||
case Constant::kHeapObject:
|
||||
__ Move(dst, src.ToHeapObject());
|
||||
case Constant::kHeapObject: {
|
||||
Handle<HeapObject> src_object = src.ToHeapObject();
|
||||
if (info()->IsOptimizing() &&
|
||||
src_object.is_identical_to(info()->context())) {
|
||||
// Loading the context from the frame is way cheaper than
|
||||
// materializing the actual context heap object address.
|
||||
__ LoadP(dst,
|
||||
MemOperand(fp, StandardFrameConstants::kContextOffset));
|
||||
} else if (info()->IsOptimizing() &&
|
||||
src_object.is_identical_to(info()->closure())) {
|
||||
// Loading the JSFunction from the frame is way cheaper than
|
||||
// materializing the actual JSFunction heap object address.
|
||||
__ LoadP(dst,
|
||||
MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset));
|
||||
} else {
|
||||
__ Move(dst, src_object);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case Constant::kRpoNumber:
|
||||
UNREACHABLE(); // TODO(dcarney): loading RPO constants on PPC.
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user