<div dir="ltr">I'm OK-ish with this, though I will warn you, llvm-dwp is not, in my opinion (as the author of it), the best foundation for this sort of thing. In particular it uses significantly more memory (& probably CPU) than gold's dwp tool - building more things on top of this before addressing some of those scalability issues will build more technical debt that'll need to be paid down at some point. If you plan to use this in a production use case, I'd strongly encourage you to invest some time in improvements to llvm-dwp's scalability first, to create a better foundation to build on top of. I'm happy to help with/advise on that work.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jun 21, 2021 at 6:11 PM Alexander Yermolovich <<a href="mailto:ayermolo@fb.com">ayermolo@fb.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">




<div dir="ltr">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
Hello<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<br>
I am working on adding support for bolt (<a href="https://github.com/facebookincubator/BOLT/tree/rebased" id="gmail-m_2444646480630012211LPlnk635887" target="_blank">https://github.com/facebookincubator/BOLT/tree/rebased</a>) to write out DWP directly.  I want to re-use as much llvm-dwp functionality as
 possible. <br>
Plan is to move most of functionality that is now in llvm-dwp in to llvm/lib/DWP, with corresponding header file in llvm/include/llvm/DWP.<br>
In the header files have<br>
getContributionIndex<br>
handleSection<br>
parseCompileUnitHeader<br>
writeStringsAndOffsets<br>
getCUIdentifiers<br>
buildDuplicateError<br>
writeIndex<br>
<br>
<span style="background-color:rgb(255,255,255)">For structs that are passed around define in the header also.</span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<div style="color:rgb(212,212,212);background-color:rgb(30,30,30);font-family:Menlo,Monaco,"Courier New",monospace;font-weight:normal;font-size:12px;line-height:18px">
<span><span style="color:rgb(78,201,176);background-color:rgb(255,255,255)">UnitIndexEntry</span></span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<div style="color:rgb(212,212,212);background-color:rgb(30,30,30);font-family:Menlo,Monaco,"Courier New",monospace;font-weight:normal;font-size:12px;line-height:18px">
<span><span style="color:rgb(78,201,176);background-color:rgb(255,255,255)">CompileUnitHeader</span></span></div>
<div style="color:rgb(212,212,212);background-color:rgb(30,30,30);font-family:Menlo,Monaco,"Courier New",monospace;font-weight:normal;font-size:12px;line-height:18px">
<span><span style="color:rgb(78,201,176);background-color:rgb(255,255,255)">CompileUnitIdentifiers</span></span></div>
<br>
</div>
<br>
Thought I would solicit opinions before I dive too deep into this. <br>
<br>
Thank You<br>
Alex</div>
</div>

</blockquote></div>