<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>On Dec 1, 2014, at 12:34 PM, Rui Ueyama <<a href="mailto:ruiu@google.com">ruiu@google.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr"><div>That sounds like we really need a new property of Atom.</div><div><br></div><div>1. If we run LLD in Release build, the roundtrip passes don't run, so everything works fine.</div><div>2. If we run LLD in Debug build (and from the unit tests), the information is dropped during the round-trip conversion, and it fails.</div><div>3. RoundTrip tests should't drop any information.</div><div><br></div><div>2 and 3 conflicts.</div></div></blockquote><div><br></div><div>I have a different view. </div><div><br></div><div>I think of those Passes as a quick way to exercise the YAML and native formats.  The mechanism is as if you went through the test cases and added a line which ran “ld -r” to merge all input files into one file, then ran the rest of the test with that merged input file.  That works everywhere except in tests that care about the name of the input file (which is now changed).  So, for those cases you would not do the merge step.  But since the round trip is implicit, there is no way to turn it off.  Shankar is adding a way to turn it off.</div><br><blockquote type="cite"><div dir="ltr"><div><br></div><div>I should note that, again, I don't actually like the idea of YAML/Native format, though. It feels like it doesn't worth the cost of maintaining two more different outputs.</div></div></blockquote><div><br></div><div>Those formats exist for different reasons:</div><div><br></div><div>YAML exists because it is the preferred way to write core test cases.</div><div><br></div><div>“Native” exists because eventually we want a way to improve linker performance by reducing the parsing overhead in the front end of the linker. During development, the compiler writes each .o file once, but the linker reads it many times (e.g. each time you one file and run ‘make’, the linker has to re-parse every .o file again).  So the ideal .o format is one that is fast to parse (not one that is fast to write.  The native format "keeps us honest” that the atom/reference model can be flattened to disk.   </div><br></div><div>-Nick</div><div><br></div><div><br><blockquote type="cite"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Dec 1, 2014 at 12:20 PM, Shankar Easwaran <span dir="ltr"><<a href="mailto:shankare@codeaurora.org" target="_blank">shankare@codeaurora.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Rui,<br>
<br>
We discussed to add a new property to the atom, but its really not needed as the original filename from where the atom was parsed is available in release mode(roundtrip passes dont get called in release mode).<br>
<br>
The discussion was here, <a href="http://lists.cs.uiuc.edu/pipermail/llvmdev/2014-November/078910.html" target="_blank">http://lists.cs.uiuc.edu/<u></u>pipermail/llvmdev/2014-<u></u>November/078910.html</a>.<span class="HOEnZb"><font color="#888888"><br>
<br>
Shankar Easwaran</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
On 12/1/2014 2:14 PM, Rui Ueyama wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Mon, Dec 1, 2014 at 12:11 PM, Shankar Easwaran <<a href="mailto:shankare@codeaurora.org" target="_blank">shankare@codeaurora.org</a>><br>
wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 12/1/2014 2:04 PM, Rui Ueyama wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I'm not sure if I got what you mean... So, just to make sure we are on the<br>
same page, the reason to have the round-trip passes is to make sure all<br>
output can be serialized and de-serialized, right? I think you added these<br>
tests because of that reason.<br>
<br>
Because the YAML/Native are guaranteed compatible, we can dump an<br>
intermediate results to YAML/Native files and then resume processing by<br>
reading them back.<br>
<br>
And then looks like you are now adding a way to bypass that. So they are<br>
no<br>
longer compatible. That is exactly what you wanted to avoid, no?<br>
<br>
</blockquote>
Yes, I thought of adding a way to bypass that but you are right, we should<br>
not allow the RoundTripPasses to be bypassed. I will remove the<br>
setRunRoundTripPass function in LinkingContext.<br>
<br>
But I do need lld to preserve the filename of the atom using references if<br>
the round trip passes were going to be run. So the reader and the writer<br>
would read the information using references if the round trip passes were<br>
being run.<br>
</blockquote>
<br>
If you need a new property, you can add that to Atom. (Code review would be<br>
needed though.)<br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Shankar Easwaran<br>
<br>
<br>
--<br>
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted<br>
by the Linux Foundation<br>
<br>
<br>
</blockquote></blockquote>
<br>
<br>
-- <br>
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by the Linux Foundation<br>
<br>
</div></div></blockquote></div><br></div>
_______________________________________________<br>llvm-commits mailing list<br><a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits<br></blockquote></div><br></body></html>