[llvm-bugs] [Bug 25373] New: -fomit-frame-pointer introduces spills
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Nov 2 01:18:29 PST 2015
https://llvm.org/bugs/show_bug.cgi?id=25373
Bug ID: 25373
Summary: -fomit-frame-pointer introduces spills
Product: libraries
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Register Allocator
Assignee: unassignedbugs at nondot.org
Reporter: james.molloy at arm.com
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
Created attachment 15200
--> https://llvm.org/bugs/attachment.cgi?id=15200&action=edit
Reproducer
The attached IR compiles with no spills or reloads when the frame pointer is
enabled. However if the frame pointer is disabled,
$ llc -disable-fp-elim=true 2.ll -o - | grep -c Reload
0
$ llc -disable-fp-elim=false 2.ll -o - | grep -c Reload
2
This was reduced from a benchmark where our spill decisions were suboptimal.
Enabling FP omission (increasing the register bank by one) caused 10% more
spills. Even worse, reducing the register bank by one also caused 10% more
spills, but reducing it one further so there were only 10 registers reduced the
spill count again:
R0..R12: N+10% spills
R0..R11: N spills
R0..R10: N+10% spills
R0..R9: N spills
So actually we do just as good a job with 10 regs as we do with 12 regs, and
better than the job we do with 13 regs!
I hope the reduced testcase actually points to the same underlying problem.
--
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/20151102/fe4c1feb/attachment.html>
More information about the llvm-bugs
mailing list