<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div>Hi Daniel,</div><div><br></div>minor stylistic nitpicks:<div>  - Local variables should start with an upper case letter</div><div>  - cnstrn: What about a more descriptive variable name here? :)<br><div><br></div><div><div>diff --git a/lib/Target/ARM/Thumb2InstrInfo.cpp b/lib/Target/ARM/Thumb2InstrInfo.cpp</div><div>index 286eaa0..8861eef 100644</div><div>--- a/lib/Target/ARM/Thumb2InstrInfo.cpp</div><div>+++ b/lib/Target/ARM/Thumb2InstrInfo.cpp</div><div>@@ -152,7 +152,13 @@ storeRegToStackSlot(MachineBasicBlock &MBB, MachineBasicBlock::iterator I,</div><div>     // gsub_0, but needs an extra constraint for gsub_1 (which could be sp</div><div>     // otherwise).</div><div>     MachineRegisterInfo *MRI = &MF.getRegInfo();</div><div>-    MRI->constrainRegClass(SrcReg, &ARM::GPRPair_with_gsub_1_in_rGPRRegClass);</div><div>+    const TargetRegisterClass* targetClass = TRI->getMatchingSuperRegClass(RC,</div><div>+                                &ARM::rGPRRegClass,</div><div>+                                ARM::gsub_1);</div><div>+    assert(targetClass && "No Matching GPRPair with gsub_1 in rGPRRegClass");</div><div>+    const TargetRegisterClass* cnstrn =</div><div>+                                MRI->constrainRegClass(SrcReg, targetClass);</div><div>+    assert(cnstrn && "Couldn't constrain the register class");</div><div> </div><div>     MachineInstrBuilder MIB = BuildMI(MBB, I, DL, get(ARM::t2STRDi8));</div><div>     AddDReg(MIB, SrcReg, ARM::gsub_0, getKillRegState(isKill), TRI);</div><div>@@ -193,7 +199,13 @@ loadRegFromStackSlot(MachineBasicBlock &MBB, MachineBasicBlock::iterator I,</div><div>     // gsub_0, but needs an extra constraint for gsub_1 (which could be sp</div><div>     // otherwise).</div><div>     MachineRegisterInfo *MRI = &MF.getRegInfo();</div><div>-    MRI->constrainRegClass(DestReg, &ARM::GPRPair_with_gsub_1_in_rGPRRegClass);</div><div>+    const TargetRegisterClass* targetClass = TRI->getMatchingSuperRegClass(RC,</div><div>+                                &ARM::rGPRRegClass,</div><div>+                                ARM::gsub_1);</div><div>+    assert(targetClass && "No Matching GPRPair with gsub_1 in rGPRRegClass");</div><div>+    const TargetRegisterClass* cnstrn =</div><div>+                                MRI->constrainRegClass(DestReg, targetClass);</div><div>+    assert(cnstrn && "Couldn't constrain the register class");</div><div> </div><div>     MachineInstrBuilder MIB = BuildMI(MBB, I, DL, get(ARM::t2LDRDi8));</div><div>     AddDReg(MIB, DestReg, ARM::gsub_0, RegState::DefineNoRead, TRI);</div><div><br></div><div>Regards,</div><div><br></div><div>Tilmann</div><div><br></div><div><div>On Sep 4, 2013, at 5:50 PM, Daniel Stewart <<a href="mailto:stewartd@codeaurora.org">stewartd@codeaurora.org</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div lang="EN-US" link="blue" vlink="purple" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div class="WordSection1" style="page: WordSection1;"><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);">Attached is the patch with the added test case. My apologies for the delay.<o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);"> </span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);">Daniel<o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);"> </span></div><div><div style="border-style: solid none none; border-top-color: rgb(181, 196, 223); border-top-width: 1pt; padding: 3pt 0in 0in;"><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;"><b><span style="font-size: 10pt; font-family: Tahoma, sans-serif;">From:</span></b><span style="font-size: 10pt; font-family: Tahoma, sans-serif;"><span class="Apple-converted-space"> </span><a href="mailto:llvm-commits-bounces@cs.uiuc.edu" style="color: purple; text-decoration: underline;">llvm-commits-bounces@cs.uiuc.edu</a><span class="Apple-converted-space"> </span>[<a href="mailto:llvm-commits-bounces@cs.uiuc.edu" style="color: purple; text-decoration: underline;">mailto:llvm-commits-bounces@cs.uiuc.edu</a>]<span class="Apple-converted-space"> </span><b>On Behalf Of<span class="Apple-converted-space"> </span></b>Daniel Stewart<br><b>Sent:</b><span class="Apple-converted-space"> </span>Friday, August 30, 2013 4:47 PM<br><b>To:</b><span class="Apple-converted-space"> </span>'Renato Golin'<br><b>Cc:</b><span class="Apple-converted-space"> </span>'Commits'<br><b>Subject:</b><span class="Apple-converted-space"> </span>RE: [PATCH] Added a new register class for Thumb PC-rel loads<o:p></o:p></span></div></div></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;"><o:p> </o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);">Yes, I’ll add a test case.<o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);"> </span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);">Daniel<o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);"> </span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;"><b><span style="font-size: 10pt; font-family: Tahoma, sans-serif;">From:</span></b><span style="font-size: 10pt; font-family: Tahoma, sans-serif;"><span class="Apple-converted-space"> </span>Renato Golin [<a href="mailto:renato.golin@linaro.org" style="color: purple; text-decoration: underline;">mailto:renato.golin@linaro.org</a>]<span class="Apple-converted-space"> </span><br><b>Sent:</b><span class="Apple-converted-space"> </span>Friday, August 30, 2013 4:43 PM<br><b>To:</b><span class="Apple-converted-space"> </span>Daniel Stewart<br><b>Cc:</b><span class="Apple-converted-space"> </span>Commits; Jim Grosbach; Evan Cheng<br><b>Subject:</b><span class="Apple-converted-space"> </span>Re: [PATCH] Added a new register class for Thumb PC-rel loads<o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;"><o:p> </o:p></div><div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;">On 30 August 2013 21:14, Daniel Stewart <<a href="mailto:stewartd@codeaurora.org" target="_blank" style="color: purple; text-decoration: underline;">stewartd@codeaurora.org</a>> wrote:<o:p></o:p></div><div><div><blockquote style="border-style: none none none solid; border-left-color: rgb(204, 204, 204); border-left-width: 1pt; padding: 0in 0in 0in 6pt; margin: 5pt 0in 5pt 4.8pt;"><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);">I updated the patch per Jim’s suggestions.</span><o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);"> </span><o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);">If this is acceptable, could someone commit it for me, as I do not have permissions.</span><o:p></o:p></div></blockquote></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;"><o:p> </o:p></div></div><div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;">Hi Daniel,<o:p></o:p></div></div><div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;"><o:p> </o:p></div></div><div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;">Is it possible to add a test?<o:p></o:p></div></div><div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;"><o:p> </o:p></div></div><div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;">cheers,<o:p></o:p></div></div><div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;">--renato<o:p></o:p></div></div></div></div><span><0001-Added-register-class-with-no-LR-used-by-PC-rel-load.patch></span>_______________________________________________<br>llvm-commits mailing list<br><a href="mailto:llvm-commits@cs.uiuc.edu" style="color: purple; text-decoration: underline;">llvm-commits@cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" style="color: purple; text-decoration: underline;">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a></div></blockquote></div><br></div></div></body></html>