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

    <tr>
        <th>Summary</th>
        <td>
            Alignment for working memory in JITLink.
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            jitlink
      </td>
    </tr>

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

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

<pre>
    The JITLink APIs are currently silent on the issue of alignment in working memory*: no guarantees are provided, and there's no way to specify alignment when requesting working memory on the JIT's allocator. This means that JITLink must use unaligned loads/stores during linking to be safe.

As more programs start adopting JITLink we should try to quantify the overhead caused by this and, if it turns out to be significant, investigate a fix.

* Executor memory alignment requirements seem to be well covered -- care will need to be taken to distinguish the two in the APIs.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxdks9yozAMxp8GLpowYEgoBw7Z7XamO3vYQ19AgAC3xk79JzRvvzJp2m1nGBC2LP2-T-7McGmfZoLfj09_pH6B499HB2gJ-mAtaa8u4KTiAIwGz4nSuUBgRkAlJ73EHalhNfZF6gkWWoy9JOKYlEfQBqaAFrUnuhY9WXOWAw2J-Amoh1jQUiJqF3NXvIA34E7Uy_HyX_11Jg2WXgM5H5t8bXYDYwVbJVTK9OiNzeBplo6zUDvOQP8hcgnOQ3AEQW9daABlcHCJeHB8kGGHYGMHxdnxy1gdgcORsiS_T_Lj9X3k6uYqa7K4OHAerQcczGkDvfVb-exsgmLBdtP4GtiUKDKCmzPZmXCAHplpgC4uMzgbFH2SI0gPPlhWYYK_sTC2HGXPdbYkfY7mTOgJEEb59oWT5wG_3qgPLO7m2qe90VlpKcasgGh5b7GSUtBHOoba7RiPpa6SFzXxyjXJ4wsPh-NBbsMJ0s2bKr-aeDFiGO9UllJbHA6HoijqWqRDWw5N2WDqpVfUHj9gRib8Nl-u8m5klgar2tn7k-P7xdPiZ5J-Dl3Wm4V_lDrfPjseyjP17M7DdmXjcPd3VXVI51bs64J6FH1T93d1XjbUMVuXN3UlOlEWqcKOlGuT_Y9EiGdG5OYcJfv7VLYiF6LIi7viUDWlyA5lLap9NRZdtxeiqZIqpwWlyiJFZuyU2nYD6sLkeFOxUe5zE10cJdHWjOtj8LPhEzMu5NINvd24_wHc1kEg">