[llvm-commits] Patch: Have isa<IntrinsicInst> do a string prefix compare

Jim Grosbach grosbach at apple.com
Mon Dec 17 15:35:36 PST 2012


Hi Michael,

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?

-Jim

On Dec 17, 2012, at 1:13 PM, Michael Ilseman <milseman at apple.com> wrote:

> 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().
> 
> <0001-Refactor-isIntrinsic-to-be-quicker-and-change-classo.patch>_______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list