<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 03/11/2013 03:23 PM, Jiong WANG
      wrote:<br>
    </div>
    <blockquote
cite="mid:differential-rev-PHID-DREV-va4fka24ne5r4nzyvu4i-req@llvm-reviews.chandlerc.com"
      type="cite">
      <pre wrap="">This patch implement the instruction definiation XXXInstrInfo.td file and XXXInstrInfo.cpp for TILE-Gx.

Generally, the implementation is straightforward, most of the work is done by referencing TILE-Gx ISA manual.

On thing tilegx backend different from other target is it's VLIW. and the instruction bundle for contains either 2 (X mode) or 3 (Y mode) instructions depending on the hardware resources.

For example, for the "add reg, reg, reg" instruction, it can be  issued in either X mode or Y mode.  This cause some trouble for MC Layer, because one instruction have several encoding candidates. The tilegx's way is to define one template for instruction matching, and several other for instruction encoding.

defm ADD: TileADD

multiclass TileADD {

  def #NAME#
     /* this is for instruction matching */

  def #0_X0#
  def #0_X1#
  def #0_Y0#
  def #0_Y1#
    /* these are for instruction encoding only */
    /* for the purpose that tablegen could exact necessary encoding info */
}

take one instruction bundle issued in Y mode for example:

Normal LLVM
          \
           \
            V
           scheduled instruction sequences
                \
                 \  TileGX bundling pass
                  \
                   V
                  bundled instruction sequences
                    |
                    |
                    V
      { opcode: ADD   | opcode: ADDI | opcode: LD }
                    |
                    |  Lower MachineInstr
                    |   to Machine Code Instr
                    V
      { opcode: ADD_Y0   | opcode: ADDI_Y1 | opcode: LD_Y2 }
                    |
                    |  final pass to encode
                   V
                  binary

Please review, thanks</pre>
    </blockquote>
    <br>
      Ping, could anyone please review this and the other tilegx
    patches?<br>
    <br>
      Currently what should I do to make tilegx merged to community
    repository?<br>
    <br>
      Another thing is, I have confirmed with the company,  we are
    willing to offer a tilegx buildbot once the backend merged to
    community repository.<br>
    <br>
      thanks<br>
    <br>
    ---<br>
    Regards,<br>
    Jiong<br>
    Tilera Corporation<br>
    <blockquote
cite="mid:differential-rev-PHID-DREV-va4fka24ne5r4nzyvu4i-req@llvm-reviews.chandlerc.com"
      type="cite">
      <pre wrap="">

---
Regards,
Jiong
Tilera Corporation.

<a class="moz-txt-link-freetext" href="http://llvm-reviews.chandlerc.com/D513">http://llvm-reviews.chandlerc.com/D513</a>
</pre>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
llvm-commits mailing list
<a class="moz-txt-link-abbreviated" href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a>
<a class="moz-txt-link-freetext" href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a>
</pre>
    </blockquote>
    <br>
    <br>
    <pre class="moz-signature" cols="72">-- 
Regards,
Jiong. Wang
Tilera Corporation.</pre>
  </body>
</html>