<div dir="ltr">Carving up Support with #ifdefs to support .cpp file inclusion at a distance doesn't seem right.<div><br></div><div>Why is lli-child-target so large in the first place?  If it links statically and only calls a few helpers out of Support, the linker should avoid linking in unreferenced object files from the static library.  If the .cpp files in Support reference each other too much, maybe we can find a way to factor them differently.</div>
<div><br></div><div>Alternatively, we could bring back System for this kind of low-level stuff.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Dec 3, 2013 at 9:34 AM, Alp Toker <span dir="ltr"><<a href="mailto:alp@nuanti.com" target="_blank">alp@nuanti.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">This is a bumper patch to fix assorted MCJIT remote issues, split into two parts for ease of review.<br>

<br>
Minor tweaks outside of lli were necessary to support reuse of LLVM's Support implementation by inclusion without having to link to LLVM.<br>
<br>
  9 files changed, 157 insertions(+), 253 deletions(-)<br>
<br>
Patch 1:<br>
<br>
Provide LLVM_STANDALONE for lightweight Support embedders<br>
<br>
This is sufficient to build lli-child-target in a standalone configuration<br>
without having to link any LLVM libraries.<br>
<br>
Also fixes a problem in AllocateRWX() where process::get_self()->page_<u></u>size()<br>
was being called repeatedly.<br>
<br>
Patch 2:<br>
<br>
Share a single IPC transport implementation between the child and parent<br>
instead of duplicating the code.<br>
<br>
Share the existing LLVM memory management and cache invalidation code instead<br>
of copy-and-pasting it. This is complicated; we don't want to maintain two<br>
versions but at the same time need to keep lli-child-target free of<br>
dependencies.<br>
<br>
Make memory management and instruction cache flushing portable in the child<br>
application using LLVM's Support headers in standalone mode. Eliminate lots of<br>
copy-and-pasted code.<br>
<br>
Fix a typo that caused the instruction cache invalidation never to run on<br>
executable pages, which could be a problem on ARM, PowerPC etc.<br>
<br>
Add assertions for piped read/write. This should help cut down on needless<br>
assertions at the callsites.<br>
<br>
Build lli-child-target in a standalone configuration, reducing binary size to<br>
24KB down from ~500KB.<br>
<br>
These fixes pave the way for a Windows implementation.<br>
<br>
Alp.<br>
<br>
-- <br>
<a href="http://www.nuanti.com" target="_blank">http://www.nuanti.com</a><br>
the browser experts<br>
<br>
<br>
</div></div><br>_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
<br></blockquote></div><br></div>