On Wed, Feb 6, 2013 at 9:07 AM, Jordan Rose <span dir="ltr"><<a href="mailto:jordan_rose@apple.com" target="_blank">jordan_rose@apple.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im"><br>
<br>
================<br>
Comment at: include/clang/Basic/CharInfo.h:29<br>
@@ +28,3 @@<br>
+/// Returns true if this is an ASCII character.<br>
+LLVM_ATTRIBUTE_ALWAYS_INLINE<br>
+static inline bool isASCII(char c) {<br>
----------------<br>
</div><div class="im">Richard Smith wrote:<br>
> Do these attributes make a measurable difference? 'static inline' is already a pretty big hint to inline, especially for a single-call-site function.<br>
</div>I didn't measure it at all; I just figured it wouldn't hurt and would keep people from directly accessing InfoTable unless they //really// needed it. I can easily take them out again.</blockquote><div><br></div>
<div>Well, it might hurt if we're force-inlining cold functions into hot functions; this might prevent some important part of the lexer from getting inlined appropriately. Generally, I think that ALWAYS_INLINE should only be added if we have some reason to think the inliner would otherwise do the wrong thing and we would get worse code -- and even in that case, we should look at whether we can fix the optimizer before adding such a hint.</div>
</div>