IR: Use std::array instead of raw C arrays
This commit is contained in:
parent
ef3e6de875
commit
a8b2dd7fc3
|
@ -149,22 +149,17 @@ void IRBuilder::Reset()
|
|||
MarkUsed.clear();
|
||||
MarkUsed.reserve(100000);
|
||||
|
||||
for (unsigned i = 0; i < 32; i++)
|
||||
{
|
||||
GRegCache[i] = nullptr;
|
||||
GRegCacheStore[i] = nullptr;
|
||||
FRegCache[i] = nullptr;
|
||||
FRegCacheStore[i] = nullptr;
|
||||
}
|
||||
GRegCache = {};
|
||||
GRegCacheStore = {};
|
||||
|
||||
FRegCache = {};
|
||||
FRegCacheStore = {};
|
||||
|
||||
CarryCache = nullptr;
|
||||
CarryCacheStore = nullptr;
|
||||
|
||||
for (unsigned i = 0; i < 8; i++)
|
||||
{
|
||||
CRCache[i] = nullptr;
|
||||
CRCacheStore[i] = nullptr;
|
||||
}
|
||||
CRCache = {};
|
||||
CRCacheStore = {};
|
||||
|
||||
CTRCache = nullptr;
|
||||
CTRCacheStore = nullptr;
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <array>
|
||||
#include <vector>
|
||||
|
||||
#include "Common/CommonTypes.h"
|
||||
|
@ -427,15 +428,15 @@ private:
|
|||
std::vector<bool> MarkUsed; // Used for IRWriter
|
||||
std::vector<u64> ConstList;
|
||||
InstLoc curReadPtr;
|
||||
InstLoc GRegCache[32];
|
||||
InstLoc GRegCacheStore[32];
|
||||
InstLoc FRegCache[32];
|
||||
InstLoc FRegCacheStore[32];
|
||||
std::array<InstLoc, 32> GRegCache;
|
||||
std::array<InstLoc, 32> GRegCacheStore;
|
||||
std::array<InstLoc, 32> FRegCache;
|
||||
std::array<InstLoc, 32> FRegCacheStore;
|
||||
InstLoc CarryCache;
|
||||
InstLoc CarryCacheStore;
|
||||
InstLoc CTRCache;
|
||||
InstLoc CTRCacheStore;
|
||||
InstLoc CRCache[8];
|
||||
InstLoc CRCacheStore[8];
|
||||
std::array<InstLoc, 8> CRCache;
|
||||
std::array<InstLoc, 8> CRCacheStore;
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue