<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><BR><DIV><DIV>On Apr 24, 2007, at 12:01 PM, Chris Lattner wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite"><P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Lucida Sans Typewriter" size="2" style="font: 10.0px Lucida Sans Typewriter">Yes, we need those.<SPAN class="Apple-converted-space">  </SPAN>I think these are the major pieces needed.<SPAN class="Apple-converted-space">  </SPAN>These are<SPAN class="Apple-converted-space"> </SPAN></FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Lucida Sans Typewriter" size="2" style="font: 10.0px Lucida Sans Typewriter">all relatively small and independent pieces, so we can tackle these one at<SPAN class="Apple-converted-space"> </SPAN></FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Lucida Sans Typewriter" size="2" style="font: 10.0px Lucida Sans Typewriter">a time.</FONT></P> </BLOCKQUOTE><DIV><BR class="khtml-block-placeholder"></DIV><DIV><snip></DIV><BR><BLOCKQUOTE type="cite"><P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT class="Apple-style-span" face="Lucida Sans Typewriter" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;"></SPAN></FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Lucida Sans Typewriter" size="2" style="font: 10.0px Lucida Sans Typewriter">4. The DAG scheduler pass (which creates machine instrs from dag nodes)</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Lucida Sans Typewriter" size="2" style="font: 10.0px Lucida Sans Typewriter"><SPAN class="Apple-converted-space">    </SPAN>currently thinks of register operands as simple unsigned's for vreg</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Lucida Sans Typewriter" size="2" style="font: 10.0px Lucida Sans Typewriter"><SPAN class="Apple-converted-space">    </SPAN>#'s.<SPAN class="Apple-converted-space">  </SPAN>This needs to be extended to be vreg+subreg pairs (see</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Lucida Sans Typewriter" size="2" style="font: 10.0px Lucida Sans Typewriter"><SPAN class="Apple-converted-space">    </SPAN>'CreateVirtualRegisters').</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Lucida Sans Typewriter" size="2" style="font: 10.0px Lucida Sans Typewriter">5. We need to decide how to represent subregs in the DAG.<SPAN class="Apple-converted-space">  </SPAN>Your</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Lucida Sans Typewriter" size="2" style="font: 10.0px Lucida Sans Typewriter"><SPAN class="Apple-converted-space">    </SPAN>SDSubOperand idea is fine, but I don't think it needs to be an actual</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Lucida Sans Typewriter" size="2" style="font: 10.0px Lucida Sans Typewriter"><SPAN class="Apple-converted-space">    </SPAN>new subclass of SDOperand.<SPAN class="Apple-converted-space">  </SPAN>Instead, it could just be a binary SDNode,</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Lucida Sans Typewriter" size="2" style="font: 10.0px Lucida Sans Typewriter"><SPAN class="Apple-converted-space">    </SPAN>where the LHS is the register input and the RHS is a TargetConstant</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Lucida Sans Typewriter" size="2" style="font: 10.0px Lucida Sans Typewriter"><SPAN class="Apple-converted-space">    </SPAN>specifying the subreg#.</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Lucida Sans Typewriter" size="2" style="font: 10.0px Lucida Sans Typewriter">6. [optional] We would like syntax to create these things for writting</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Lucida Sans Typewriter" size="2" style="font: 10.0px Lucida Sans Typewriter"><SPAN class="Apple-converted-space">    </SPAN>patterns in the .td file instead of requiring custom matching code.<SPAN class="Apple-converted-space"> </SPAN></FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Lucida Sans Typewriter" size="2" style="font: 10.0px Lucida Sans Typewriter">7. The register allocator needs to rewrite subreg references using</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Lucida Sans Typewriter" size="2" style="font: 10.0px Lucida Sans Typewriter"><SPAN class="Apple-converted-space">    </SPAN>#1.<SPAN class="Apple-converted-space">  </SPAN>This should be very simple.</FONT></P> </BLOCKQUOTE></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>For 5 I am currently creating new binary SDNodes for 'from_subreg' and 'to_subreg' in ISD, is this in line with your thinking for the design Chris? The issue I ran into is that you essentially need subreg insert and extract.</DIV><BR><DIV> <SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><DIV>--</DIV><DIV>Christopher Lamb</DIV><DIV><BR class="khtml-block-placeholder"></DIV><BR class="Apple-interchange-newline"></SPAN></SPAN> </DIV><BR></BODY></HTML>