<div dir="ltr"><div><div>First, surely the right place for this discussion is the cfe-dev mailing list?<br><br></div>Second, have you determined that this is a noticeable amount of time when compiling? I have no idea - in my Pascal compiler, parsing the code is ~0.1%, codegen to IR ~1.9% and LLVM 98%. But I'm sure Clang is more complex in many ways, so the proportion is probably a bit different - a measurement of the time spent expanding macros would probably help determine if it's worth doing or not. <br><br>--<br></div>Mats<br></div><div class="gmail_extra"><br><div class="gmail_quote">On 24 March 2016 at 22:17, Andy 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 text="#000000" bgcolor="#FFFFFF">
    Hello, folks!<br>
    <br>
    Currently me with one other guy are trying to play with clang. The
    proposal may seem stupid, excuse me, if it was already discussed, we
    just want to try to implement something useful which seems absent
    for now.<br>
    <br>
    Ok, the idea. It seems interesting to try to make lexer a little bit
    more efficient in terms of macro expanding by applying partial
    expansion of macros. the idea is that some libraries have rather
    deeply nested macro definitions, and each time lexer sees it in
    code, it reexpands definition fully. This seems to be overkill
    sometimes, for rather often macros are not redefined in code, so
    expansion can be reused. <br>
    <br>
    Of course, the typical nesting is rather low, but for example
    BOOST_PP_REPEAT can cause such situations. <br>
    <br>
    So, the question is, what do you think about possible utility of
    such research and the reasons for you think so?<br>
    <a href="https://www.google.ru/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0ahUKEwii-ZW4oNrLAhWrCXMKHcFpA1wQFggfMAA&url=http%3A%2F%2Fwww.boost.org%2Fdoc%2Flibs%2F1_43_0%2Flibs%2Fpreprocessor%2Fdoc%2Fref%2Frepeat.html&usg=AFQjCNEicOX9h6Dsd1M82MOjMV5148Rtkg&sig2=p0GM1-YQQGGwaDMHbeHuiA&cad=rja" style="color:rgb(102,0,153);text-decoration:none" target="_blank"></a>
    
  </div>

<br>_______________________________________________<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/mailman/listinfo/llvm-dev</a><br>
<br></blockquote></div><br></div>