mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 21:37:52 -07:00
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.
This commit is contained in:
parent
47fc72f0a8
commit
ef3e6de875
@ -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();
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user