[llvm-dev] Register Spill Caused by the Reassociation pass

Haicheng Wu via llvm-dev llvm-dev at lists.llvm.org
Thu Oct 1 08:10:27 PDT 2015


Hi Sanjay,

 

I observed some extra register spills when applying the reassociation pass
on spec2006 benchmarks and I would like to listen to your advice.  

 

For example, function get_new_point_on_quad() of tria_boundary.cc in
spec2006/dealII has a sequences of code like this

 

.

X=a+b

.

Y=X+c

.

Z=Y+d

.

 

There are many 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.  

 

Best,

 

Haicheng

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20151001/79c5f2a7/attachment.html>


More information about the llvm-dev mailing list