[NVPTX] Replace PTX's ManagedStringPool with StringSaver
In use ManagedStringPool caused a lot of heap allocations. At least one for every register name lookup in NVPTXTargetRegisterInfo and one for every symbol lookup in the target machine and isel lowering. There already exists an llvm/Support string interning-class that has better memory performance. Use LLVM's and delete ManagedStringPool which was unique to PTX llc Binary Size (.text only; bss and data were unchanged): MinsizeRel: Before: 31219884 After: 31219796 Release: Before: 42961872 After: 42960656 Total heap allocations by the NVPTX string saving code running check-llvm-codegen-nvptx Total bytes allocated: Before: 2431825 After: 2288151 (All numbers on x86-64-linux-gnu / gcc-12 / lld14) I didn't see obvious time differences when running the tests. Reviewers: tra, avasonic Differential Revision: https://reviews.llvm.org/D140704
Loading
Please sign in to comment