def IntrNoReturn : IntrinsicProperty;
+def IntrNoFree : IntrinsicProperty;
+
def IntrWillReturn : IntrinsicProperty;
// IntrCold - Calls to this intrinsic are cold.
canThrow = false;
isNoReturn = false;
isNoSync = false;
+ isNoFree = false;
isWillReturn = false;
isCold = false;
isNoDuplicate = false;
isNoReturn = true;
else if (Property->getName() == "IntrNoSync")
isNoSync = true;
+ else if (Property->getName() == "IntrNoFree")
+ isNoFree = true;
else if (Property->getName() == "IntrWillReturn")
isWillReturn = true;
else if (Property->getName() == "IntrCold")
if (L->isNoSync != R->isNoSync)
return R->isNoSync;
+ if (L->isNoFree != R->isNoFree)
+ return R->isNoFree;
+
if (L->isWillReturn != R->isWillReturn)
return R->isWillReturn;
}
if (!intrinsic.canThrow ||
- (intrinsic.ModRef != CodeGenIntrinsic::ReadWriteMem && !intrinsic.hasSideEffects) ||
- intrinsic.isNoReturn || intrinsic.isNoSync || intrinsic.isWillReturn ||
- intrinsic.isCold || intrinsic.isNoDuplicate || intrinsic.isConvergent ||
- intrinsic.isSpeculatable) {
+ (intrinsic.ModRef != CodeGenIntrinsic::ReadWriteMem &&
+ !intrinsic.hasSideEffects) ||
+ intrinsic.isNoReturn || intrinsic.isNoSync || intrinsic.isNoFree ||
+ intrinsic.isWillReturn || intrinsic.isCold || intrinsic.isNoDuplicate ||
+ intrinsic.isConvergent || intrinsic.isSpeculatable) {
OS << " const Attribute::AttrKind Atts[] = {";
bool addComma = false;
if (!intrinsic.canThrow) {
OS << "Attribute::NoSync";
addComma = true;
}
+ if (intrinsic.isNoFree) {
+ if (addComma)
+ OS << ",";
+ OS << "Attribute::NoFree";
+ addComma = true;
+ }
if (intrinsic.isWillReturn) {
if (addComma)
OS << ",";