<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Oct 14, 2013 at 2:48 PM, Thompson, John <span dir="ltr"><<a href="mailto:John_Thompson@playstation.sony.com" target="_blank">John_Thompson@playstation.sony.com</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="blue" vlink="purple">
<div>
<p class="MsoNormal">Hi,<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I’m trying to set up modules for some platform headers that are found in 3 separate subdirectories:<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">(platform)/target/include<u></u><u></u></p>
<p class="MsoNormal">(platform)/target/include_common<u></u><u></u></p>
<p class="MsoNormal">(platform)/host_tools/lib/clang/include<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Unfortunately various headers include headers from other directories and visa/versa, such that having a module.map in each of these directories fails to build, giving me an errors such as:<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">(file): fatal error: cyclic dependency in module 'platform_include': platform _include -> platform _host_tools -> platform _include<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Is there a way to address this without fixing the circular dependencies?<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">One way that seems to work is to put it all in one module map, at the (platform) level, with relative paths in the header directives. It appears the compiler will walk up the directories until it finds the module.map file, right?<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Regarding the #include to module mechanism, can I assume the compiler matches the module even if the path given in the #include doesn’t match the path in the “header” directives in the module.map file, but does refer to the same absolute
file? I.e. the #include references “stdio.h”, and a “-I(platform)/target/include” option is given to the compiler, but the (platform)/module.map “header” directive references “target/include/stdio.h”.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I have a test bed that includes over 400 stub files that just #include one header, and a makefile to build them. As a rough performance test, with or without the –fmodules option, they all compile okay in a clean make, but the –fmodules
version is about 15% slower (in a run after the modules are compiled). (Note that I have the compiler output using –emit-llvm because I’m coercing it to think it’s a ps4 compiler, since our version doesn’t have modules support yet, and the .o output seems
to be broken for x86_64.) I heard others got better performance, but I don’t know how it’s measured. Any thoughts?<u></u><u></u></p>
<p class="MsoNormal"><u></u> </p></div></div></blockquote><div><br></div><div>How much is actually in the header? If it's not much, then I wouldn't expect to see a speedup, and a slowdown doesn't surprise me. Isn't the speed advantage for modules meant to be in avoiding redoing parsing/sema for the header on each inclusion? (i.e., it's basically caching the results). If there isn't much to cache, then I wouldn't expect a speed improvement.</div>
<div><br></div><div>-- Sean Silva</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="blue" vlink="purple"><div><p class="MsoNormal">
<u></u></p>
<p class="MsoNormal">Thanks.<span class="HOEnZb"><font color="#888888"><u></u><u></u></font></span></p><span class="HOEnZb"><font color="#888888">
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">-John<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
</font></span></div>
</div>
<br>_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br></div></div>