mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-13 09:39:33 +01:00
IR JIT: Remove what's left of function preloading
FindPreloadBlock (and HashMatches, which only it used) had no callers, and a few comments still mentioned preloading. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
f3eb70aac4
commit
16bb808a56
3 files changed
+1
-27
No files matched your search
@@ -359,7 +359,6 @@ void IRFrontend::Comp_Jump(MIPSOpcode op) {
|
||||
|
||||
// Might be a stubbed address or something?
|
||||
if (space_ ? !space_->IsValidAddress(targetAddr) : !Memory::IsValidAddress(targetAddr)) {
|
||||
// If preloading, flush - this block will likely be fixed later.
|
||||
// Usually code that never runs, like a call through an import that isn't linked yet.
|
||||
DEBUG_LOG(Log::JIT, "Compiled jump to %08x (probably benign)", targetAddr);
|
||||
// TODO: Mark this block dirty or something? May be indication it will be changed by imports.
|
||||
|
||||
+1
-22
@@ -318,7 +318,6 @@ void IRJit::TimedClearCache() {
|
||||
g_jitCompileTimes.clears++;
|
||||
}
|
||||
|
||||
// WARNING! This can be called from IRInterpret / the JIT, through the function preload stuff!
|
||||
IRJit::CompileResult IRJit::CompileBlock(u32 em_address, std::vector<IRInst> &instructions, u32 &mipsBytes) {
|
||||
_dbg_assert_(compilerEnabled_);
|
||||
|
||||
@@ -585,7 +584,6 @@ std::vector<int> JitBlockTable::FindInvalidatedBlockNumbers(u32 address, u32 len
|
||||
}
|
||||
|
||||
void JitBlockTable::FinalizeBlock(int blockIndex) {
|
||||
// TODO: What's different about preload blocks?
|
||||
JitBlock &block = blocks_[blockIndex];
|
||||
block.Finalize(*space_);
|
||||
|
||||
@@ -627,24 +625,6 @@ u32 JitBlockTable::AddressToPage(u32 addr) const {
|
||||
return (addr & 0x3FFFFFFF) >> 10;
|
||||
}
|
||||
|
||||
int JitBlockTable::FindPreloadBlock(u32 em_address) {
|
||||
u32 page = AddressToPage(em_address);
|
||||
auto iter = byPage_.find(page);
|
||||
if (iter == byPage_.end())
|
||||
return -1;
|
||||
|
||||
const std::vector<int> &blocksInPage = iter->second;
|
||||
for (int i : blocksInPage) {
|
||||
if (blocks_[i].GetOriginalStart() == em_address) {
|
||||
if (blocks_[i].HashMatches()) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
int JitBlockTable::GetBlockNumberFromStartAddress(u32 em_address) const {
|
||||
u32 page = AddressToPage(em_address);
|
||||
|
||||
@@ -666,8 +646,7 @@ int JitBlockTable::GetBlockNumberFromStartAddress(u32 em_address) const {
|
||||
}
|
||||
|
||||
void JitBlock::Finalize(const Memory::AddressSpace &space) {
|
||||
// Check it wasn't invalidated, in case this is after preload.
|
||||
// TODO: Allow reusing blocks when the code matches hash_ again, instead.
|
||||
// Check it wasn't invalidated.
|
||||
if (origAddr_ && space.IsValid4AlignedAddress(origAddr_)) {
|
||||
origFirstOpcode_ = space.IsMediaEngine() ? MIPSOpcode(space.ReadUnchecked_U32(origAddr_)) : Memory::ReadUnchecked_Instruction(origAddr_);
|
||||
_dbg_assert_(entry_ != 0);
|
||||
|
||||
@@ -65,9 +65,6 @@ public:
|
||||
void UpdateHash() {
|
||||
hash_ = CalculateHash();
|
||||
}
|
||||
bool HashMatches() const {
|
||||
return origAddr_ && hash_ == CalculateHash();
|
||||
}
|
||||
bool OverlapsRange(u32 addr, u32 size) const;
|
||||
|
||||
void GetRange(u32 *start, u32 *size) const {
|
||||
@@ -144,7 +141,6 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
int FindPreloadBlock(u32 em_address);
|
||||
|
||||
int GetBlockNumberFromStartAddress(u32 em_address) const;
|
||||
|
||||
|
||||
Reference in new issue
Block a user