[llvm-bugs] [Bug 33311] New: Spills of implicit-defs seem useless

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Jun 5 07:29:16 PDT 2017


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

            Bug ID: 33311
           Summary: Spills of implicit-defs seem useless
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Register Allocator
          Assignee: unassignedbugs at nondot.org
          Reporter: mcrosier at codeaurora.org
                CC: llvm-bugs at lists.llvm.org

While analyzing the hottest function in SPEC2000/mesa I noticed the following
code sequence:

str w8, sp,#260
str w8, sp,#244
str w8, sp,#256
str w8, sp,#248
str w8, sp,#252

str s1, sp,#284
str s1, sp,#280
str s1, sp,#288
str s1, sp,#276
str s1, sp,#272

At first it wasn't clear to me why these instructions weren't being paired by
the load store optimizer.  These stores are spills of implicit-defs being
inserted by the register allocator. AFAICT these implicit-defs are coming from
variables that are undefined on some path in the CFG. I think the fix would be
to not spill these implicit-defs and update the register allocator's internal
data structures accordingly, but this is well outside my area of expertise.

To better understand how frequently this issue occurs I inserted a statistic in
the InlineSpiller to count the number of implicit-def spills. Across SPEC200X
there were ~200 static spills of which 61 came from SPEC2000/mesa.

-- 
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/20170605/3c4fe556/attachment-0001.html>


More information about the llvm-bugs mailing list