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

Unified Diff: src/IceTargetLoweringMIPS32.cpp

Issue 1418853005: Subzero: Refactor some common TargetLowering initializations. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Code review changes Created 5 years, 1 month 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/IceTargetLoweringMIPS32.h ('k') | src/IceTargetLoweringX8632.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceTargetLoweringMIPS32.cpp
diff --git a/src/IceTargetLoweringMIPS32.cpp b/src/IceTargetLoweringMIPS32.cpp
index 2bfdf7252acd2e832757fc42d5024e7319b1e45c..54c9267d976bcd1c25e66836fa8dc7a8d0bd6fae 100644
--- a/src/IceTargetLoweringMIPS32.cpp
+++ b/src/IceTargetLoweringMIPS32.cpp
@@ -41,10 +41,9 @@ constexpr uint32_t MIPS32_MAX_GPR_ARG = 4;
} // end of anonymous namespace
-TargetMIPS32::TargetMIPS32(Cfg *Func) : TargetLowering(Func) {
- // TODO: Don't initialize IntegerRegisters and friends every time. Instead,
- // initialize in some sort of static initializer for the class.
+TargetMIPS32::TargetMIPS32(Cfg *Func) : TargetLowering(Func) {}
+void TargetMIPS32::staticInit() {
llvm::SmallBitVector IntegerRegisters(RegMIPS32::Reg_NUM);
llvm::SmallBitVector I64PairRegisters(RegMIPS32::Reg_NUM);
llvm::SmallBitVector Float32Registers(RegMIPS32::Reg_NUM);
@@ -1055,4 +1054,8 @@ void TargetHeaderMIPS32::lower() {
Str << "\t.set\tnomips16\n";
}
+llvm::SmallBitVector TargetMIPS32::TypeToRegisterSet[IceType_NUM];
+llvm::SmallBitVector TargetMIPS32::RegisterAliases[RegMIPS32::Reg_NUM];
+llvm::SmallBitVector TargetMIPS32::ScratchRegs;
+
} // end of namespace Ice
« no previous file with comments | « src/IceTargetLoweringMIPS32.h ('k') | src/IceTargetLoweringX8632.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698