mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-03-14 19:21:24 +00:00
PPU Analyzer: Remove ppu_function::name to lower sizeof(ppu_function)
This commit is contained in:
parent
f0fa8e3bc3
commit
857eac3d10
rpcs3/Emu/Cell
@ -14,7 +14,7 @@
|
||||
#include "PPUOpcodes.h"
|
||||
|
||||
// PPU Function Attributes
|
||||
enum class ppu_attr : u32
|
||||
enum class ppu_attr : u8
|
||||
{
|
||||
known_size,
|
||||
no_return,
|
||||
@ -38,7 +38,6 @@ struct ppu_function
|
||||
std::map<u32, u32> blocks{}; // Basic blocks: addr -> size
|
||||
std::set<u32> calls{}; // Set of called functions
|
||||
std::set<u32> callers{};
|
||||
mutable std::string name{}; // Function name
|
||||
|
||||
struct iterator
|
||||
{
|
||||
|
@ -4908,9 +4908,6 @@ bool ppu_initialize(const ppu_module<lv2_obj>& info, bool check_only, u64 file_s
|
||||
part.local_bounds.first = std::min<u32>(part.local_bounds.first, func.addr);
|
||||
part.local_bounds.second = std::max<u32>(part.local_bounds.second, func.addr + func.size);
|
||||
|
||||
// Fixup some information
|
||||
func.name = fmt::format("__0x%x", func.addr - reloc);
|
||||
|
||||
bsize += func.size;
|
||||
|
||||
fpos++;
|
||||
@ -5473,7 +5470,7 @@ static void ppu_initialize2(jit_compiler& jit, const ppu_module<lv2_obj>& module
|
||||
{
|
||||
if (func.size)
|
||||
{
|
||||
const auto f = cast<Function>(_module->getOrInsertFunction(func.name, _func).getCallee());
|
||||
const auto f = cast<Function>(_module->getOrInsertFunction(fmt::format("__0x%x", func.addr - reloc), _func).getCallee());
|
||||
f->setCallingConv(CallingConv::GHC);
|
||||
f->addParamAttr(1, llvm::Attribute::NoAlias);
|
||||
f->addFnAttr(Attribute::NoUnwind);
|
||||
|
@ -185,7 +185,12 @@ bool ppu_test_address_may_be_mmio(std::span<const be_t<u32>> insts);
|
||||
|
||||
Function* PPUTranslator::Translate(const ppu_function& info)
|
||||
{
|
||||
m_function = m_module->getFunction(info.name);
|
||||
// Instruction address is (m_addr + base)
|
||||
const u64 base = m_reloc ? m_reloc->addr : 0;
|
||||
m_addr = info.addr - base;
|
||||
m_attr = m_info.attr + info.attr;
|
||||
|
||||
m_function = m_module->getFunction(fmt::format("__0x%x", m_addr));
|
||||
|
||||
std::fill(std::begin(m_globals), std::end(m_globals), nullptr);
|
||||
std::fill(std::begin(m_locals), std::end(m_locals), nullptr);
|
||||
@ -193,11 +198,6 @@ Function* PPUTranslator::Translate(const ppu_function& info)
|
||||
IRBuilder<> irb(BasicBlock::Create(m_context, "__entry", m_function));
|
||||
m_ir = &irb;
|
||||
|
||||
// Instruction address is (m_addr + base)
|
||||
const u64 base = m_reloc ? m_reloc->addr : 0;
|
||||
m_addr = info.addr - base;
|
||||
m_attr = m_info.attr + info.attr;
|
||||
|
||||
// Don't emit check in small blocks without terminator
|
||||
bool need_check = info.size >= 16;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user