<div dir="ltr">Hi Colin,<div><br></div><div>AMDGPU assembler would definetely benefit from this, sounds very interesting. Year ago I tried to make MC->MI conversion but stopped at some point, so I didn't faced with other potential difficulties there such as building BBs etc.</div><div><br></div><div>Valery</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, May 24, 2017 at 10:01 PM, Colin LeMahieu via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="#0563C1" vlink="#954F72"><div class="m_8838796153317213706WordSection1"><p class="MsoNormal">Hi everyone, we’ve been prototyping an optimizing assembler for Hexagon for the purpose of updating legacy assembly for new architectures, packet rules, and instruction latencies.  It seems like others would be interested in using this and we’re looking for any related feedback: has it been attempted before, who’s interested, or any general suggestions. <u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">We’re using the MachineFunctionInitializer created to support MIR in order to process the MC and construct MachineFunctions.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Currently the workflow sketch is:<u></u><u></u></p><p class="m_8838796153317213706MsoListParagraph"><u></u><span>-<span style="font:7.0pt "Times New Roman"">        </span></span><u></u>Use flags and code from llvm-mc to assemble a file in to an MC representation.<u></u><u></u></p><p class="m_8838796153317213706MsoListParagraph"><u></u><span>-<span style="font:7.0pt "Times New Roman"">        </span></span><u></u>Use a target-specific MachineFunctionInitializer to convert the MC -> MI and write out the contents to a MachineFunction.  <u></u><u></u></p><p class="m_8838796153317213706MsoListParagraph"><u></u><span>-<span style="font:7.0pt "Times New Roman"">        </span></span><u></u>Use flags and code from llc to run the MI through compiler passes for reemission.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">We’d need to either attach it to an existing tool or create a new one and pick somewhere in the pass pipeline to start running passes. <u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"><span style="color:black">Qualcomm Innovation Center, Inc.</span><span style="font-size:10.0pt;font-family:"Tahoma",sans-serif;color:black"><br></span><span style="color:black">The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, </span><span style="font-size:10.0pt;font-family:"Tahoma",sans-serif;color:black"><br></span><span style="color:black">a Linux Foundation Collaborative Project</span><u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p></div></div><br>______________________________<wbr>_________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><br>
<br></blockquote></div><br></div>