<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/57827>57827</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            Add a sample operation pass to standalone-opt
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          nicholaiTukanov
      </td>
    </tr>
</table>

<pre>
    Hi, 

I am requesting a feature for the standalone optimizer driver example. 

I am trying to learn how to write an Operation pass for a simple dialect in order to learn more about MLIR. Thus, I figured the standalone optimizer driver is the easiest route for this, since I do not have to write an entire compiler for it (also, I believe this is closer to how it is done in LLVM where a shared object with a pass is loaded into the opt tool).

Is this possible?

Also, is there a place for a newbie to learn more about Operation passes? I am somewhat familiar with LLVM passes, but not writing entire compilers. 

Specifically, I am looking for a more detailed tutorial than what is in the [mlir docs](https://mlir.llvm.org/docs/PassManagement/#operation-pass). Ideally, I would like to see the specific files that needed to be included or general directory organization.

Apologies if this is a dumb question.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyFU01v4zYQ_TXSZRBDlmM7PujgdhE0QIIW7aL3kTiSpqE4KknFzf76Dilvdt0WKGDYpkS-eV9sxbw3P3FR_whF9amozuv3E-AEnv5cKER2AyD0hHHxBL14iCNBiOgMWnEEMkee-At5MJ7f9If-wmm2tPk3ZPTvCS4KWELvYJRLWlw8RwJ08PNMHiOLgxlDyMMQAic0MIyWugjsQLzRMR8okygxbGWJ8PL89OsGPo9LSJKeoOdBWZv_pcwhbyEMrJLBK9ZXrZyhAruOFNAIOIkw4hvdMCcXWVl0Ms1sFTCd5QhF_YA2yEqmJcuUzilmmthZCauO5IPu1mcm0VOJz8-_v8BlpKQMwohJhLR_JAMuHEd9mB3SE1bQ6Et2ipM0qDaFFFvUp81NAGEdPEsI3Foqdo_fvz5faa5O5LGzxY6uITi6tEz_6fltaBQUGHLaQSa6jBihx4kto1-pZ2nXrTqwVYhkabIyleMfTobbGv02U8c9d2jt--qqDrIir-noSjVTMxRRj2vySxSv1VFVGlOmk9x32ati_8NkWVsgXSj2nzStMcZZFZyL-lE_6eXG2rdpI37Qdd5XP_6i5F_Q4UCTss1bd_LVhbskLZkPT4a-0bzIYg1Yfs0mBqK1k1c5WlRLyXml54hSoLqrTVXo7JKWKm0gpzOs3gSvPRD_rg8HdPwlz70J-zyLlUG7DNx_9A3BLFML663WAyU128Nhd9geDw-H0jQ7c9qdsIwcLTVnY1Lz8k0Gub2XScDHZbrTwpWLt82tdYNGvbQbjVEXycLrz93sJdVYlxzCkjrwuD8-1MdyVDZ0OFZddb-tq_td32Jv9qY22xPSdls_3JcW9Q6FRmMr6lorCRlC_2t4JTd1VdfVaXuqq2pb7zc10b46VrtTf9zvDh0W9xVN2oqPREvfZErtMgR9aTnE8O2lKuVBw8jjFB-XOIpvHHejWOTPyys6eSszhSZL-Bu63M0s">