[llvm] [NVPTX] use incomplete aggregate initializers (PR #79062)

Alex MacLean via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 23 08:27:11 PST 2024


================
@@ -1292,10 +1292,20 @@ void NVPTXAsmPrinter::AggBuffer::printSymbol(unsigned nSym, raw_ostream &os) {
 
 void NVPTXAsmPrinter::AggBuffer::printBytes(raw_ostream &os) {
   unsigned int ptrSize = AP.MAI->getCodePointerSize();
-  symbolPosInBuffer.push_back(size);
+  // Do not emit trailing zero initializers. They will be zero-initialized by
+  // ptxas. This saves on both space requirements for the generated PTX and on
+  // memory use by ptxas.
+  unsigned int InitializerCount = size;
----------------
AlexMaclean wrote:

Added.

https://github.com/llvm/llvm-project/pull/79062


More information about the llvm-commits mailing list