[PATCH] Store intrinsic ID by value in Function instead of a string lookup. NFC

Pete Cooper peter_cooper at apple.com
Mon May 18 14:53:38 PDT 2015


Hi dexonsmith,

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.

http://reviews.llvm.org/D9836

Files:
  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

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D9836.26018.patch
Type: text/x-patch
Size: 8654 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150518/dda9c5b0/attachment.bin>


More information about the llvm-commits mailing list