mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-21 02:24:22 +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:
@ -124,6 +124,13 @@ bool Argument::hasStructRetAttr() const {
|
||||
hasAttribute(1, Attribute::StructRet);
|
||||
}
|
||||
|
||||
/// hasReturnedAttr - Return true if this argument has the returned attribute on
|
||||
/// it in its containing function.
|
||||
bool Argument::hasReturnedAttr() const {
|
||||
return getParent()->getAttributes().
|
||||
hasAttribute(getArgNo()+1, Attribute::Returned);
|
||||
}
|
||||
|
||||
/// addAttr - Add attributes to an argument.
|
||||
void Argument::addAttr(AttributeSet AS) {
|
||||
assert(AS.getNumSlots() <= 1 &&
|
||||
|
Reference in New Issue
Block a user