X86 intrinsics running out of IdentifierInfo Builtin IDs

Hi all,

My team is working on adding some more X86 intrinsics to Clang/LLVM, and we are hitting the limit of the number of builtins supported by Clang. The “ObjCOrBuiltinID” field in the IdentifierInfo class is 11 bits wide, which is not sufficient to represent all the new intrinsics, and we are getting the “ID too large for field!” assertion.

The easiest fix seems to be to increase the size of this “ObjCOrBuiltinID” field to 12 bits, but that will make the bitfield in IdentifierInfo 33 bits wide, consuming an additional 32 bits in some architectures for each instance. A quick check shows, that this fix works without any functional regressions, but we have no performance numbers yet.

Please let me know if anyone is opposed to adding this additional bit, or if there are any other concerns/suggestions on this issue.

Thanks

image001.png

It seems increasingly true that we care less about optimizing for size on 32-bit architectures. On a 64-bit platform, we had 32-bits of padding there already, so we can probably afford the extra space on 32-bit.

image001.png

Thanks, that sounds reasonable. Let’s see if there is any other input. If no one is opposed to it, we will include this change with the implementation of the new ISA intrinsics.

Thanks

Guy

image001.png