<div dir="ltr"><span style="font-family:arial,sans-serif;font-size:14.399999618530273px">Stepan,</span><div style="font-family:arial,sans-serif;font-size:14.399999618530273px"><br></div><div style="font-family:arial,sans-serif;font-size:14.399999618530273px">
Looking at all codes in function ARMLoadStoreOpt::LoadStoreMultipleOpti, I think the newly added class MemOpsTracker seems to be splitting the change of MemOps for the 1st half and the 2nd half of this function, which would make this function hard to be understood.</div>
<div style="font-family:arial,sans-serif;font-size:14.399999618530273px"><br></div><div style="font-family:arial,sans-serif;font-size:14.399999618530273px">Why can't we simply add a new method/function to check the register overlap? For example, simply modify one line of Hao's code</div>
<div style="font-family:arial,sans-serif;font-size:14.399999618530273px"><br></div><div style="font-family:arial,sans-serif;font-size:14.399999618530273px">+            if (Reg == It->MBBI->getOperand(0).getReg()) {<br>
</div><div style="font-family:arial,sans-serif;font-size:14.399999618530273px"><br></div><div style="font-family:arial,sans-serif;font-size:14.399999618530273px">to be like,</div><div style="font-family:arial,sans-serif;font-size:14.399999618530273px">
<br></div><div style="font-family:arial,sans-serif;font-size:14.399999618530273px">+            if (RegsAreOverlapped(Reg, It->MBBI->getOperand(0).getReg())) {<br></div><div style="font-family:arial,sans-serif;font-size:14.399999618530273px">
<br></div><div style="font-family:arial,sans-serif;font-size:14.399999618530273px">Otherwise, I would feel your code change is a little bit over designed.</div><div style="font-family:arial,sans-serif;font-size:14.399999618530273px">
<br></div><div style="font-family:arial,sans-serif;font-size:14.399999618530273px">Also, the function isIntersected looks strange, and why don't we naturally use a set to help this?</div><div style="font-family:arial,sans-serif;font-size:14.399999618530273px">
<br></div><div style="font-family:arial,sans-serif;font-size:14.399999618530273px">Thanks,</div><div style="font-family:arial,sans-serif;font-size:14.399999618530273px">-Jiangning</div></div><div class="gmail_extra"><br><br>
<div class="gmail_quote">2013/3/19 Stepan Dyatkovskiy <span dir="ltr"><<a href="mailto:stpworld@narod.ru" target="_blank">stpworld@narod.ru</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
ping<div class="HOEnZb"><div class="h5"><br>
Stepan Dyatkovskiy wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello Hao,<br>
<br>
hao liu wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
But I just have one question: do we need to consider about the mix<br>
situation of registers of S, D and Q?  I just wonder the existence of<br>
some<br>
code like:<br>
       S1 = ldr r0, #4;<br>
       D1 = ldr r0, #8;<br>
       Q1 = ldr r0, #16;<br>
       ...<br>
</blockquote>
<br>
I checked this case.<br>
By now, it is possible to get llc emit code like this:<br>
         ...<br>
         vldr    s4, [r0, #400]<br>
         vldr    d16, [r1]<br>
         vldr    s0, [r0, #432]<br>
         ...<br>
<br>
I suppose there is case, where D0 is used instead of D16, and then for<br>
example S0 and S1 are implicitly reused.<br>
<br>
In Jiangning's Liu attachment:<br>
<a href="http://llvm.org/bugs/attachment.cgi?id=9821" target="_blank">http://llvm.org/bugs/<u></u>attachment.cgi?id=9821</a><br>
<br>
try to insert code like this (somewhere in middle):<br>
<br>
   %d_ptr = bitcast <8 x i64> * %source to <8 x double> *<br>
   %doubles = getelementptr inbounds <8 x double> * %d_ptr, i32 0, i32 0<br>
   %initial_double = load double * %doubles, align 64<br>
   %modified_double = fadd double %initial_double, %initial_double<br>
   store double %modified_double, double * %doubles<br>
<br>
It would emit the mix of vldrs and vldrd instructions.<br>
<br>
I attached modified test case. Try to run it with command:<br>
"./llc ldst_opt_bug-q.ll -mcpu=cortex-a9 -mattr=+neon,+neonfp"<br>
<br>
-Stepan.<br>
<br>
</blockquote>
<br></div></div><div class="HOEnZb"><div class="h5">
______________________________<u></u>_________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailman/listinfo/llvm-commits</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Thanks,<div>-Jiangning</div>
</div>