<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Jim<div><br></div><div>We do already have this in Function::getIntrinsicID():</div><div><br></div><div><div style="margin: 0px; font-size: 11px; font-family: Menlo; "><span style="color: #bb2ca2">if</span> (Len < <span style="color: #272ad8">5</span> || Name[<span style="color: #272ad8">4</span>] != <span style="color: #272ad8">'.'</span> || Name[<span style="color: #272ad8">0</span>] != <span style="color: #272ad8">'l'</span> || Name[<span style="color: #272ad8">1</span>] != <span style="color: #272ad8">'l'</span></div><div style="margin: 0px; font-size: 11px; font-family: Menlo; ">      || Name[<span style="color: #272ad8">2</span>] != <span style="color: #272ad8">'v'</span> || Name[<span style="color: #272ad8">3</span>] != <span style="color: #272ad8">'m'</span>)</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(0, 132, 0); "><span style="color: #000000">    </span><span style="color: #bb2ca2">return</span><span style="color: #000000"> </span><span style="color: #272ad8">0</span><span style="color: #000000">;  </span>// All intrinsics start with 'llvm.'</div></div><div><br></div><div>So all intrinsics do start with "llvm.", but yes, this doesn't cover the point you raised that this would reserve all names starting with "llvm." as intrinsics.</div><div><br></div><div>Pete<br><div><div>On Dec 17, 2012, at 3:35 PM, Jim Grosbach <<a href="mailto:grosbach@apple.com">grosbach@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Hi Michael,<br><br>This assumes that a) all intrinsics have names starting with "llvm." and b) every function name starting with "llvm." is an intrinsic. 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>http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits<br></blockquote><br>_______________________________________________<br>llvm-commits mailing list<br><a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits<br></blockquote></div><br></div></body></html>