<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Nov 6, 2013 at 5:10 AM, David Majnemer <span dir="ltr"><<a href="mailto:david.majnemer@gmail.com" target="_blank">david.majnemer@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
  From my experience,<br>
  `SkipUntil(EndKind, /*StopAtSemi=*/true, /*DontConsume=*/true);`<br>
  is more typical in clang than<br>
  `SkipUntil(EndKind, StopAtSemi | DontConsume);`<br>
<br>
  It seems that some of the calls that you changed were previously nasty (i.e. `SkipUntil(EndKind, true, true)`) which justifies a cleanup.<br>
  However I'm not sure we want a bitfield here.<br>
<br>
  What is your justification?<br></blockquote><div><br></div><div>Besides the general improved clarity in the source code (no more `true, false, false, true`-disease code), from a calling-convention perspective (at least on x86 where I'm familiar, but I'm pretty sure it holds for other architectures), passing N bools is extremely inefficient and will typically occupy as much of the register set as the passing N ints, and also require at least N instructions to load up the registers for the call and also on the callee side to read them, whereas a bitmask occupies one int's worth of registers and can be loaded efficiently with a single instruction (assuming all the parameters are constant at compile time, which I think is true in this case). Also, I don't think that our register allocator is smart enough to pack bools bitwise into a single register to decrease register pressure in the callee, and even if it were the extra code to do so would still present an overhead.</div>
<div><br></div><div>So basically, it's a win-win from both a human and machine perspective.</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">

<br>
<br>
================<br>
Comment at: include/clang/Parse/Parser.h:751<br>
@@ -741,3 +750,3 @@<br>
   /// token will ever occur, this skips to the next token, or to some likely<br>
-  /// good stopping point.  If StopAtSemi is true, skipping will stop at a ';'<br>
-  /// character.<br>
+  /// good stopping point.  If Flags has bit set at StopAtSemi, skipping will<br>
+  /// stop at a ';' character.<br>
----------------<br>
The wording "has bit set" seems strange.<br>
<br>
<br>
<a href="http://llvm-reviews.chandlerc.com/D2108" target="_blank">http://llvm-reviews.chandlerc.com/D2108</a><br>
<div class="HOEnZb"><div class="h5">_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
</div></div></blockquote></div><br></div></div>