[llvm-bugs] [Bug 41342] New: [Subreg liveness] Enabling subreg liveness increases spilling significantly

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Apr 2 02:24:06 PDT 2019


https://bugs.llvm.org/show_bug.cgi?id=41342

            Bug ID: 41342
           Summary: [Subreg liveness]  Enabling subreg liveness increases
                    spilling significantly
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Register Allocator
          Assignee: unassignedbugs at nondot.org
          Reporter: paulsson at linux.vnet.ibm.com
                CC: llvm-bugs at lists.llvm.org, quentin.colombet at gmail.com

Created attachment 21715
  --> https://bugs.llvm.org/attachment.cgi?id=21715&action=edit
unreduced test case, llc input

I found that the bzip2 benchmark regressed slightly when enabling subreg
liveness due to one particular function (decompress). It seems that for some
reason subreg liveness increases spilling instead of decreasing it:

./bin/llc -mtriple=s390x-linux-gnu -mcpu=z13 ./decompress.ll -o out.s --stats
|& grep spill
   1 regalloc              - Number of rematerialized defs for spilling
   9 regalloc              - Number of spilled snippets
  30 regalloc              - Number of spill slots allocated
  79 regalloc              - Number of spilled live ranges
 128 regalloc              - Number of spills inserted
  21 regalloc              - Number of spills removed

./bin/llc -mtriple=s390x-linux-gnu -mcpu=z13 ./decompress.ll -o out.subr.s 
-systemz-subreg-liveness --stats |& grep spill
   1 regalloc              - Number of rematerialized defs for spilling
  25 regalloc              - Number of spilled snippets
  27 regalloc              - Number of spill slots allocated
 168 regalloc              - Number of spilled live ranges
 173 regalloc              - Number of spills inserted
 149 regalloc              - Number of spills removed

I made a reduced test case also from this file:

./bin/llc -mtriple=s390x-linux-gnu -mcpu=z13 ./tc_decompress_reduced.ll -o
out.subr.s  --stats |& grep spill
  9 regalloc              - Number of spill slots allocated
  9 regalloc              - Number of spilled live ranges
 10 regalloc              - Number of spills inserted

./bin/llc -mtriple=s390x-linux-gnu -mcpu=z13 ./tc_decompress_reduced.ll -o
out.subr.s  -systemz-subreg-liveness --stats |& grep spill
  2 regalloc              - Number of spilled snippets
 11 regalloc              - Number of spill slots allocated
 11 regalloc              - Number of spilled live ranges
 13 regalloc              - Number of spills inserted

I wonder if anyone might be able to help me in understanding why this happens?

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190402/4ece7915/attachment.html>


More information about the llvm-bugs mailing list