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)
commit4c8e74f0b75cb10820c45c86399fbd02e4a8832a
treecc1f1cdb45bee8daff09970eaa0d992d952b6edf
parenta6b20ced765b67a85d9219d0c8547fc9c133e14f
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!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176365 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/IR/Function.h
lib/IR/Function.cpp
lib/IR/LLVMContextImpl.h
lib/IR/Module.cpp
lib/IR/Value.cpp