[LLVMdev] getIntrinsicID() optimization
Nicolas Capens
nicolas at capens.net
Fri Oct 16 05:50:05 PDT 2009
Hi all,
While profiling I discovered that the Function::getIntrinsicID() method is
called a lot, and every time it uses string comparison to recompute the ID
number. As far as I know the name of an intrinsic function doesn't change,
so the ID could be determined just once at Function construction time.
I've attached a patch that does this and it appears to work for the code I
tested it with. Could anyone look at potential caveats and if there are none
commit it?
Thanks,
Nicolas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20091016/480f2c24/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: FastIntrinsicID.patch
Type: application/octet-stream
Size: 1569 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20091016/480f2c24/attachment.obj>
More information about the llvm-dev
mailing list