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

Unified Diff: src/compiler/simplified-operator.cc

Issue 1926023002: [turbofan] Run everything after representation selection concurrently. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Remove some dead code. Created 4 years, 8 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 | « src/compiler/simplified-lowering.cc ('k') | src/handles.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/simplified-operator.cc
diff --git a/src/compiler/simplified-operator.cc b/src/compiler/simplified-operator.cc
index d341391bc00f7d263d8392a6153a5e8c19d23776..e720343fb370b108817171c834fb0cf6788bdda9 100644
--- a/src/compiler/simplified-operator.cc
+++ b/src/compiler/simplified-operator.cc
@@ -214,6 +214,15 @@ struct SimplifiedOperatorGlobalCache final {
PURE_OP_LIST(PURE)
#undef PURE
+ template <PretenureFlag kPretenure>
+ struct AllocateOperator final : public Operator1<PretenureFlag> {
+ AllocateOperator()
+ : Operator1<PretenureFlag>(IrOpcode::kAllocate, Operator::kNoThrow,
+ "Allocate", 1, 1, 1, 1, 1, 0, kPretenure) {}
+ };
+ AllocateOperator<NOT_TENURED> kAllocateNotTenuredOperator;
+ AllocateOperator<TENURED> kAllocateTenuredOperator;
+
#define BUFFER_ACCESS(Type, type, TYPE, ctype, size) \
struct LoadBuffer##Type##Operator final : public Operator1<BufferAccess> { \
LoadBuffer##Type##Operator() \
@@ -258,9 +267,14 @@ const Operator* SimplifiedOperatorBuilder::ReferenceEqual(Type* type) {
const Operator* SimplifiedOperatorBuilder::Allocate(PretenureFlag pretenure) {
- return new (zone())
- Operator1<PretenureFlag>(IrOpcode::kAllocate, Operator::kNoThrow,
- "Allocate", 1, 1, 1, 1, 1, 0, pretenure);
+ switch (pretenure) {
+ case NOT_TENURED:
+ return &cache_.kAllocateNotTenuredOperator;
+ case TENURED:
+ return &cache_.kAllocateTenuredOperator;
+ }
+ UNREACHABLE();
+ return nullptr;
}
« no previous file with comments | « src/compiler/simplified-lowering.cc ('k') | src/handles.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698