[Turbofan] Make GenericLowering operate concurrently.
R=epertoso@chromium.org BUG=5428 Review-Url: https://codereview.chromium.org/2607243002 Cr-Commit-Position: refs/heads/master@{#42003}
This commit is contained in:
parent
b211993740
commit
a93aab375a
@ -31,11 +31,26 @@ Node* JSGraph::ToNumberBuiltinConstant() {
|
|||||||
|
|
||||||
Node* JSGraph::CEntryStubConstant(int result_size, SaveFPRegsMode save_doubles,
|
Node* JSGraph::CEntryStubConstant(int result_size, SaveFPRegsMode save_doubles,
|
||||||
ArgvMode argv_mode, bool builtin_exit_frame) {
|
ArgvMode argv_mode, bool builtin_exit_frame) {
|
||||||
if (save_doubles == kDontSaveFPRegs && argv_mode == kArgvOnStack &&
|
if (save_doubles == kDontSaveFPRegs && argv_mode == kArgvOnStack) {
|
||||||
result_size == 1) {
|
DCHECK(result_size >= 1 && result_size <= 3);
|
||||||
|
if (!builtin_exit_frame) {
|
||||||
|
CachedNode key;
|
||||||
|
if (result_size == 1) {
|
||||||
|
key = kCEntryStub1Constant;
|
||||||
|
} else if (result_size == 2) {
|
||||||
|
key = kCEntryStub2Constant;
|
||||||
|
} else {
|
||||||
|
DCHECK(result_size == 3);
|
||||||
|
key = kCEntryStub3Constant;
|
||||||
|
}
|
||||||
|
return CACHED(
|
||||||
|
key, HeapConstant(CEntryStub(isolate(), result_size, save_doubles,
|
||||||
|
argv_mode, builtin_exit_frame)
|
||||||
|
.GetCode()));
|
||||||
|
}
|
||||||
CachedNode key = builtin_exit_frame
|
CachedNode key = builtin_exit_frame
|
||||||
? kCEntryStubWithBuiltinExitFrameConstant
|
? kCEntryStub1WithBuiltinExitFrameConstant
|
||||||
: kCEntryStubConstant;
|
: kCEntryStub1Constant;
|
||||||
return CACHED(key,
|
return CACHED(key,
|
||||||
HeapConstant(CEntryStub(isolate(), result_size, save_doubles,
|
HeapConstant(CEntryStub(isolate(), result_size, save_doubles,
|
||||||
argv_mode, builtin_exit_frame)
|
argv_mode, builtin_exit_frame)
|
||||||
|
@ -162,8 +162,10 @@ class V8_EXPORT_PRIVATE JSGraph : public NON_EXPORTED_BASE(ZoneObject) {
|
|||||||
kAllocateInNewSpaceStubConstant,
|
kAllocateInNewSpaceStubConstant,
|
||||||
kAllocateInOldSpaceStubConstant,
|
kAllocateInOldSpaceStubConstant,
|
||||||
kToNumberBuiltinConstant,
|
kToNumberBuiltinConstant,
|
||||||
kCEntryStubConstant,
|
kCEntryStub1Constant,
|
||||||
kCEntryStubWithBuiltinExitFrameConstant,
|
kCEntryStub2Constant,
|
||||||
|
kCEntryStub3Constant,
|
||||||
|
kCEntryStub1WithBuiltinExitFrameConstant,
|
||||||
kEmptyFixedArrayConstant,
|
kEmptyFixedArrayConstant,
|
||||||
kEmptyLiteralsArrayConstant,
|
kEmptyLiteralsArrayConstant,
|
||||||
kEmptyStringConstant,
|
kEmptyStringConstant,
|
||||||
|
@ -20,7 +20,7 @@ VectorSlotPair::VectorSlotPair() {}
|
|||||||
|
|
||||||
|
|
||||||
int VectorSlotPair::index() const {
|
int VectorSlotPair::index() const {
|
||||||
return vector_.is_null() ? -1 : vector_->GetIndex(slot_);
|
return vector_.is_null() ? -1 : TypeFeedbackVector::GetIndex(slot_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -979,6 +979,17 @@ struct LoopExitEliminationPhase {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct GenericLoweringPrepPhase {
|
||||||
|
static const char* phase_name() { return "generic lowering prep"; }
|
||||||
|
|
||||||
|
void Run(PipelineData* data, Zone* temp_zone) {
|
||||||
|
// Make sure we cache these code stubs.
|
||||||
|
data->jsgraph()->CEntryStubConstant(1);
|
||||||
|
data->jsgraph()->CEntryStubConstant(2);
|
||||||
|
data->jsgraph()->CEntryStubConstant(3);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
struct GenericLoweringPhase {
|
struct GenericLoweringPhase {
|
||||||
static const char* phase_name() { return "generic lowering"; }
|
static const char* phase_name() { return "generic lowering"; }
|
||||||
|
|
||||||
@ -1565,9 +1576,8 @@ bool PipelineImpl::CreateGraph() {
|
|||||||
RunPrintAndVerify("Untyped", true);
|
RunPrintAndVerify("Untyped", true);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Run generic lowering pass.
|
// Do some hacky things to prepare generic lowering.
|
||||||
Run<GenericLoweringPhase>();
|
Run<GenericLoweringPrepPhase>();
|
||||||
RunPrintAndVerify("Generic lowering", true);
|
|
||||||
|
|
||||||
data->EndPhaseKind();
|
data->EndPhaseKind();
|
||||||
|
|
||||||
@ -1577,6 +1587,10 @@ bool PipelineImpl::CreateGraph() {
|
|||||||
bool PipelineImpl::OptimizeGraph(Linkage* linkage) {
|
bool PipelineImpl::OptimizeGraph(Linkage* linkage) {
|
||||||
PipelineData* data = this->data_;
|
PipelineData* data = this->data_;
|
||||||
|
|
||||||
|
// Run generic lowering pass.
|
||||||
|
Run<GenericLoweringPhase>();
|
||||||
|
RunPrintAndVerify("Generic lowering", true);
|
||||||
|
|
||||||
data->BeginPhaseKind("block building");
|
data->BeginPhaseKind("block building");
|
||||||
|
|
||||||
// Run early optimization pass.
|
// Run early optimization pass.
|
||||||
|
Loading…
Reference in New Issue
Block a user