<div dir="ltr"><div><div><div><div>Hi, <br><br>I've been working on a Blackfin backend (llvm-3.6.0) based on the previous one that was removed in llvm-3.1.<br></div>llc generates codes like this:<br><br> 29 p1 = r2;<br> 30 r5 = [p1];<br> 31 p1 = r2;<br> 32 r6 = [p1 + 4];<br> 33 r5 = r6 + r5;<br> 34 r6 = [p0 + -4];<br> 35 r5 *= r6;<br> 36 p1 = r2;<br> 37 r6 = [p1 + 8];<br> 38 p1 = r2;<br><br></div><div>p1 and r2 are in different register classes.<br></div><div>A p* register can be used for load/stroe values from memory while a r* register can not.<br></div><div><br></div>As
we can see, line 31, 36, 38 can be deleted. How can I configure llc to
do this? Or do I have to write a custom pass to do this optimization?
Any suggestion is welcome.<br><br></div>Thanks,<br><br></div>Huang</div>