<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; ">Excellent! Thanks for digging in and confirming. LGTM!<div><br></div><div>-j</div><div><br><div><div>On Dec 18, 2012, at 10:37 AM, Michael Ilseman <<a href="mailto:milseman@apple.com">milseman@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><meta http-equiv="Content-Type" content="text/html charset=windows-1252"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Dec 17, 2012, at 3:44 PM, Michael Ilseman <<a href="mailto:milseman@apple.com">milseman@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">On Dec 17, 2012, at 3:35 PM, Jim Grosbach <<a href="mailto:grosbach@apple.com">grosbach@apple.com</a>> wrote:<br><br><blockquote type="cite">Hi Michael,<br><br>This assumes that a) all intrinsics have names starting with "llvm."<br></blockquote><br>The existing code in getIntrinsicID() has this assumption already, I'm just migrating it out into isIntrinsic().<br><br><blockquote type="cite">and b) every function name starting with "llvm." is an intrinsic.<br></blockquote><br>I agree, this is a new assumption with my patch. I'll look into the docs, but it feels like "llvm.*" should be reserved for intrinsics. For example, if a user defines a function with that prefix, it might be auto-magically made into an intrinsic should LLVM ever introduce an intrinsic with that name. This would even happen should LLVM ever introduce an intrinsic with a similar enough prefix to that name.<br></blockquote><div><br></div><div>From LangRef[1]:</div><div><span style="font-family: 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: left; background-color: rgb(255, 255, 255); ">"Intrinsic function names must all start with an “</span><tt class="docutils literal" style="font-family: Consolas, 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace; font-size: 0.95em; line-height: 21px; text-align: left; background-color: rgb(255, 255, 255); "><span class="pre">llvm.</span></tt><span style="font-family: 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: left; background-color: rgb(255, 255, 255); ">” prefix. This prefix is reserved in LLVM for intrinsic names; thus, function names may not begin with this prefix."</span></div><div><span style="font-family: 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: left; background-color: rgb(255, 255, 255); ">[1] </span><a href="http://llvm.org/docs/LangRef.html#intrinsic-functions">http://llvm.org/docs/LangRef.html#intrinsic-functions</a></div><div><br></div><div><br></div><br><blockquote type="cite"><br><blockquote type="cite">Both of those seem pretty strong to me. I don't suppose there's any chance there's docs to that effect in LangRef or anything like that?<br><br>-Jim<br><br>On Dec 17, 2012, at 1:13 PM, Michael Ilseman <<a href="mailto:milseman@apple.com">milseman@apple.com</a>> wrote:<br><br><blockquote type="cite">Refactor isIntrinsic() to be quicker, and change classof() (and thus, isa<IntrinsicInst>()) to use it. This decreases the number of occurrences of the slow-path string matching performed by getIntrinsicID().<br><br><0001-Refactor-isIntrinsic-to-be-quicker-and-change-classo.patch>_______________________________________________<br>llvm-commits mailing list<br><a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br></blockquote><br></blockquote><br>_______________________________________________<br>llvm-commits mailing list<br><a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br></blockquote></div><br></div></blockquote></div><br></div></body></html>