diff options
| author | Lioncash <mathew1800@gmail.com> | 2017-01-16 18:21:09 -0500 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2017-01-16 18:36:11 -0500 |
| commit | ef3e6de875155f09561e07edb27ad2fd4374b582 (patch) | |
| tree | 10494c67808f2d8e982ce50bb011ca7501f3229e /Source/Core | |
| parent | 47fc72f0a86ebce869b77c7083e911ea97ad569a (diff) | |
IR: Move implementation of the constructor and Reset into the cpp file
Neither of these are intended to be called extremely frequently to warrant
this.
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/Core/PowerPC/JitILCommon/IR.cpp | 33 | ||||
| -rw-r--r-- | Source/Core/Core/PowerPC/JitILCommon/IR.h | 33 |
2 files changed, 37 insertions, 29 deletions
diff --git a/Source/Core/Core/PowerPC/JitILCommon/IR.cpp b/Source/Core/Core/PowerPC/JitILCommon/IR.cpp index 6fe5843c8c..9e58e3fc3b 100644 --- a/Source/Core/Core/PowerPC/JitILCommon/IR.cpp +++ b/Source/Core/Core/PowerPC/JitILCommon/IR.cpp @@ -137,6 +137,39 @@ using namespace Gen; namespace IREmitter { +IRBuilder::IRBuilder() +{ + Reset(); +} + +void IRBuilder::Reset() +{ + InstList.clear(); + InstList.reserve(100000); + MarkUsed.clear(); + MarkUsed.reserve(100000); + + for (unsigned i = 0; i < 32; i++) + { + GRegCache[i] = nullptr; + GRegCacheStore[i] = nullptr; + FRegCache[i] = nullptr; + FRegCacheStore[i] = nullptr; + } + + CarryCache = nullptr; + CarryCacheStore = nullptr; + + for (unsigned i = 0; i < 8; i++) + { + CRCache[i] = nullptr; + CRCacheStore[i] = nullptr; + } + + CTRCache = nullptr; + CTRCacheStore = nullptr; +} + InstLoc IRBuilder::EmitZeroOp(unsigned Opcode, unsigned extra = 0) { InstLoc curIndex = InstList.data() + InstList.size(); diff --git a/Source/Core/Core/PowerPC/JitILCommon/IR.h b/Source/Core/Core/PowerPC/JitILCommon/IR.h index 7e5bbcd11c..7125fdc954 100644 --- a/Source/Core/Core/PowerPC/JitILCommon/IR.h +++ b/Source/Core/Core/PowerPC/JitILCommon/IR.h @@ -229,7 +229,10 @@ InstLoc inline getOp2(InstLoc i) class IRBuilder { public: - IRBuilder() { Reset(); } + IRBuilder(); + + void Reset(); + InstLoc EmitIntConst(unsigned value) { return EmitIntConst64(value); } InstLoc EmitIntConst64(u64 value); @@ -382,34 +385,6 @@ public: bool IsMarkUsed(InstLoc I) const; void WriteToFile(u64 codeHash); - void Reset() - { - InstList.clear(); - InstList.reserve(100000); - MarkUsed.clear(); - MarkUsed.reserve(100000); - - for (unsigned i = 0; i < 32; i++) - { - GRegCache[i] = nullptr; - GRegCacheStore[i] = nullptr; - FRegCache[i] = nullptr; - FRegCacheStore[i] = nullptr; - } - - CarryCache = nullptr; - CarryCacheStore = nullptr; - - for (unsigned i = 0; i < 8; i++) - { - CRCache[i] = nullptr; - CRCacheStore[i] = nullptr; - } - - CTRCache = nullptr; - CTRCacheStore = nullptr; - } - private: IRBuilder(IRBuilder&); // DO NOT IMPLEMENT |
