[llvm-bugs] [Bug 25016] New: Register Spills Caused by the Machine Reassociation Optimization
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Oct 1 12:57:53 PDT 2015
https://llvm.org/bugs/show_bug.cgi?id=25016
Bug ID: 25016
Summary: Register Spills Caused by the Machine Reassociation
Optimization
Product: libraries
Version: trunk
Hardware: All
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Scalar Optimizations
Assignee: unassignedbugs at nondot.org
Reporter: haicheng at codeaurora.org
CC: llvm-bugs at lists.llvm.org, mssimpso at codeaurora.org,
spatel+llvm at rotateright.com
Classification: Unclassified
Created attachment 14976
--> https://llvm.org/bugs/attachment.cgi?id=14976&action=edit
a .ll test case that delays the addition of the first number
I observed some extra register spills when applying the reassociation pass on
some programs.
For example, code like this
…
X=a+b
…
Y=X+c
…
Z=Y+d
…
There are some other instructions between these float adds. The reassociation
pass first swaps a and c when checking the second add, and then swaps a and d
when checking the third add. The transformed code looks like
…
X=c+b
…
Y=X+d
…
Z=Y+a
a is pushed all the way down to the bottom and its live range is much larger
now.
A .ll test case is attached which computes a+b+c+d+e+f+g+h. The transformation
delays the computation of a to the end and it becomes b+c+d+e+f+g+h+a
--
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/20151001/539eb929/attachment.html>
More information about the llvm-bugs
mailing list