mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-14 14:24:05 +00:00
Add CodeGen support for functions that always return arguments via a new parameter attribute 'returned', which is taken advantage of in target-independent tail call opportunity detection and in ARM call lowering (when placed on an integral first parameter).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179925 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -195,6 +195,8 @@ std::string Attribute::getAsString(bool InAttrGrp) const {
|
||||
return "readnone";
|
||||
if (hasAttribute(Attribute::ReadOnly))
|
||||
return "readonly";
|
||||
if (hasAttribute(Attribute::Returned))
|
||||
return "returned";
|
||||
if (hasAttribute(Attribute::ReturnsTwice))
|
||||
return "returns_twice";
|
||||
if (hasAttribute(Attribute::SExt))
|
||||
@ -393,6 +395,7 @@ uint64_t AttributeImpl::getAttrMask(Attribute::AttrKind Val) {
|
||||
case Attribute::SanitizeThread: return 1ULL << 36;
|
||||
case Attribute::SanitizeMemory: return 1ULL << 37;
|
||||
case Attribute::NoBuiltin: return 1ULL << 38;
|
||||
case Attribute::Returned: return 1ULL << 39;
|
||||
}
|
||||
llvm_unreachable("Unsupported attribute type");
|
||||
}
|
||||
|
Reference in New Issue
Block a user