Store intrinsic ID by value in Function instead of a string lookup. NFC.
authorPete Cooper <peter_cooper@apple.com>
Tue, 19 May 2015 00:24:26 +0000 (00:24 +0000)
committerPete Cooper <peter_cooper@apple.com>
Tue, 19 May 2015 00:24:26 +0000 (00:24 +0000)
commita641a4a89eaed4589962f9bdb18bfd88e1d8360a
tree79a4bc9bf786370f97f761a4e79b6d4d158322fc
parentd42228154fc11813e0f91fee978ac6576402b374
Store intrinsic ID by value in Function instead of a string lookup.  NFC.

On 64-bit targets, Function has 4-bytes of padding in its struct layout.

This uses the space for the intrinsic ID. It is set and recalculated whenever the function name is set.  This is similar to the current behavior which clears the function from the intrinsic ID cache when its renamed.

The intrinsic cache itself is removed as the only purpose was to speedup calls to getIntrinsicID() which now just reading the new field in the struct.

Reviewed by Duncan.  http://reviews.llvm.org/D9836

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