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

Unified Diff: src/compiler/instruction.cc

Issue 904693002: [turbofan] Remove global InstructionOperand caches. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 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/instruction.h ('k') | src/compiler/instruction-selector.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/instruction.cc
diff --git a/src/compiler/instruction.cc b/src/compiler/instruction.cc
index 9ec2fb9c977134d983118daafa9e7cb742382902..23f33ac740e1d2db6d422c90fd3e5ee5c87c60e8 100644
--- a/src/compiler/instruction.cc
+++ b/src/compiler/instruction.cc
@@ -58,44 +58,6 @@ std::ostream& operator<<(std::ostream& os,
}
-template <InstructionOperand::Kind kOperandKind, int kNumCachedOperands>
-SubKindOperand<kOperandKind, kNumCachedOperands>*
- SubKindOperand<kOperandKind, kNumCachedOperands>::cache = NULL;
-
-
-template <InstructionOperand::Kind kOperandKind, int kNumCachedOperands>
-void SubKindOperand<kOperandKind, kNumCachedOperands>::SetUpCache() {
- if (cache) return;
- cache = new SubKindOperand[kNumCachedOperands];
- for (int i = 0; i < kNumCachedOperands; i++) {
- cache[i].ConvertTo(kOperandKind, i);
- }
-}
-
-
-template <InstructionOperand::Kind kOperandKind, int kNumCachedOperands>
-void SubKindOperand<kOperandKind, kNumCachedOperands>::TearDownCache() {
- delete[] cache;
- cache = NULL;
-}
-
-
-void InstructionOperand::SetUpCaches() {
-#define INSTRUCTION_OPERAND_SETUP(name, type, number) \
- name##Operand::SetUpCache();
- INSTRUCTION_OPERAND_LIST(INSTRUCTION_OPERAND_SETUP)
-#undef INSTRUCTION_OPERAND_SETUP
-}
-
-
-void InstructionOperand::TearDownCaches() {
-#define INSTRUCTION_OPERAND_TEARDOWN(name, type, number) \
- name##Operand::TearDownCache();
- INSTRUCTION_OPERAND_LIST(INSTRUCTION_OPERAND_TEARDOWN)
-#undef INSTRUCTION_OPERAND_TEARDOWN
-}
-
-
std::ostream& operator<<(std::ostream& os,
const PrintableMoveOperands& printable) {
const MoveOperands& mo = *printable.move_operands_;
@@ -488,7 +450,7 @@ InstructionSequence::InstructionSequence(Isolate* isolate,
int InstructionSequence::NextVirtualRegister() {
int virtual_register = next_virtual_register_++;
- CHECK_NE(virtual_register, UnallocatedOperand::kInvalidVirtualRegister);
+ CHECK_NE(virtual_register, InstructionOperand::kInvalidVirtualRegister);
return virtual_register;
}
« no previous file with comments | « src/compiler/instruction.h ('k') | src/compiler/instruction-selector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698