nv50/ir: Remove Function.stackPtr
authorM Henning <drawoc@darkrefraction.com>
Sat, 13 May 2023 02:08:50 +0000 (22:08 -0400)
committerMarge Bot <emma+marge@anholt.net>
Wed, 19 Jul 2023 11:47:10 +0000 (11:47 +0000)
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23006>

src/nouveau/codegen/nv50_ir.h
src/nouveau/codegen/nv50_ir_bb.cpp
src/nouveau/codegen/nv50_ir_ra.cpp

index d734528..decc7b9 100644 (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;
 
index df5b222..94c0f14 100644 (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;
 
index 666e220..fff32b5 100644 (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);