nv50/ir: Remove Function.stackPtr

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23006>
This commit is contained in:
M Henning 2023-05-12 22:08:50 -04:00 committed by Marge Bot
parent cd2c314ee0
commit 3c0f8aec84
3 changed files with 5 additions and 13 deletions

View file

@ -1289,8 +1289,6 @@ public:
uint32_t binPos;
uint32_t binSize;
Value *stackPtr;
uint32_t tlsBase; // base address for l[] space (if no stack pointer is used)
uint32_t tlsSize;

View file

@ -41,7 +41,6 @@ Function::Function(Program *p, const char *fnName, uint32_t label)
binPos = 0;
binSize = 0;
stackPtr = NULL;
tlsBase = 0;
tlsSize = 0;

View file

@ -1580,14 +1580,10 @@ SpillCodeInserter::assignSlot(const Interval &livei, const unsigned int size)
int32_t offset;
std::list<SpillSlot>::iterator pos = slots.end(), it = slots.begin();
if (!func->stackPtr) {
// Later, we compute the address as (offsetBase + tlsBase)
// tlsBase might not be size-aligned, so we add just enough
// to give the final address the correct alignment
offsetBase = align(offsetBase + func->tlsBase, size) - func->tlsBase;
} else {
offsetBase = align(offsetBase, size);
}
// Later, we compute the address as (offsetBase + tlsBase)
// tlsBase might not be size-aligned, so we add just enough
// to give the final address the correct alignment
offsetBase = align(offsetBase + func->tlsBase, size) - func->tlsBase;
slot.sym = NULL;
@ -1619,8 +1615,7 @@ SpillCodeInserter::assignSlot(const Interval &livei, const unsigned int size)
stackSize = offset + size;
slot.offset = offset;
slot.sym = new_Symbol(func->getProgram(), FILE_MEMORY_LOCAL);
if (!func->stackPtr)
offset += func->tlsBase;
offset += func->tlsBase;
slot.sym->setAddress(NULL, offset);
slot.sym->reg.size = size;
slots.insert(pos, slot)->occup.insert(livei);