[IR] Convert null-pointer-is-valid into an enum attribute
The "null-pointer-is-valid" attribute needs to be checked by many pointer-related combines. To make the check more efficient, convert it from a string into an enum attribute. In the future, this attribute may be replaced with data layout properties. Differential Revision: https://reviews.llvm.org/D78862
This commit is contained in:
@@ -667,6 +667,8 @@ static uint64_t getAttrKindEncoding(Attribute::AttrKind Kind) {
|
||||
return bitc::ATTR_KIND_NOCF_CHECK;
|
||||
case Attribute::NoUnwind:
|
||||
return bitc::ATTR_KIND_NO_UNWIND;
|
||||
case Attribute::NullPointerIsValid:
|
||||
return bitc::ATTR_KIND_NULL_POINTER_IS_VALID;
|
||||
case Attribute::OptForFuzzing:
|
||||
return bitc::ATTR_KIND_OPT_FOR_FUZZING;
|
||||
case Attribute::OptimizeForSize:
|
||||
|
||||
Reference in New Issue
Block a user