mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-24 22:24:54 +00:00
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
This commit is contained in:
@@ -1000,11 +1000,6 @@ public:
|
||||
/// instructions in different blocks at the same location.
|
||||
DenseMap<std::pair<const char *, unsigned>, unsigned> DiscriminatorTable;
|
||||
|
||||
/// IntrinsicIDCache - Cache of intrinsic name (string) to numeric ID mappings
|
||||
/// requested in this context
|
||||
typedef DenseMap<const Function*, unsigned> IntrinsicIDCacheTy;
|
||||
IntrinsicIDCacheTy IntrinsicIDCache;
|
||||
|
||||
/// \brief Mapping from a function to its prefix data, which is stored as the
|
||||
/// operand of an unparented ReturnInst so that the prefix data has a Use.
|
||||
typedef DenseMap<const Function *, ReturnInst *> PrefixDataMapTy;
|
||||
|
Reference in New Issue
Block a user