Cache the result of Function::getIntrinsicID() in a DenseMap attached to the LLVMContext.
authorMichael Ilseman <milseman@apple.com>
Fri, 1 Mar 2013 18:48:54 +0000 (18:48 +0000)
committerMichael Ilseman <milseman@apple.com>
Fri, 1 Mar 2013 18:48:54 +0000 (18:48 +0000)
commit516d70399e8d83b10039d59d9c7f8d3aedf5b980
tree0213ef72aeb3eb11850d4b81610d9ac014bab4df
parent6af16fc3b7d0355ca43b838ef79faaa63c44b6b5
Cache the result of Function::getIntrinsicID() in a DenseMap attached to the LLVMContext.

This reduces the time actually spent doing string to ID conversion and shows a 10% improvement in compile time for a particularly bad case that involves ARM Neon intrinsics (these have many overloads).

Patch by Jean-Luc Duprat!

llvm-svn: 176365
llvm/include/llvm/IR/Function.h
llvm/lib/IR/Function.cpp
llvm/lib/IR/LLVMContextImpl.h
llvm/lib/IR/Module.cpp
llvm/lib/IR/Value.cpp