diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/AsmParser/LLLexer.cpp | 2 | ||||
-rw-r--r-- | lib/AsmParser/LLParser.cpp | 4 | ||||
-rw-r--r-- | lib/AsmParser/LLToken.h | 2 | ||||
-rw-r--r-- | lib/Target/ARM/ARMISelLowering.cpp | 8 | ||||
-rw-r--r-- | lib/Target/CppBackend/CPPBackend.cpp | 1 | ||||
-rw-r--r-- | lib/VMCore/Attributes.cpp | 6 |
6 files changed, 12 insertions, 11 deletions
diff --git a/lib/AsmParser/LLLexer.cpp b/lib/AsmParser/LLLexer.cpp index 91f973d..a60e4aa 100644 --- a/lib/AsmParser/LLLexer.cpp +++ b/lib/AsmParser/LLLexer.cpp @@ -558,7 +558,7 @@ lltok::Kind LLLexer::LexIdentifier() { KEYWORD(naked); KEYWORD(nonlazybind); KEYWORD(address_safety); - KEYWORD(forcesizeopt); + KEYWORD(minsize); KEYWORD(type); KEYWORD(opaque); diff --git a/lib/AsmParser/LLParser.cpp b/lib/AsmParser/LLParser.cpp index 75fc16c..ac803c5 100644 --- a/lib/AsmParser/LLParser.cpp +++ b/lib/AsmParser/LLParser.cpp @@ -953,7 +953,7 @@ bool LLParser::ParseOptionalAttrs(AttrBuilder &B, unsigned AttrKind) { case lltok::kw_naked: B.addAttribute(Attributes::Naked); break; case lltok::kw_nonlazybind: B.addAttribute(Attributes::NonLazyBind); break; case lltok::kw_address_safety: B.addAttribute(Attributes::AddressSafety); break; - case lltok::kw_forcesizeopt: B.addAttribute(Attributes::ForceSizeOpt); break; + case lltok::kw_minsize: B.addAttribute(Attributes::MinSize); break; case lltok::kw_alignstack: { unsigned Alignment; @@ -1012,7 +1012,7 @@ bool LLParser::ParseOptionalAttrs(AttrBuilder &B, unsigned AttrKind) { case lltok::kw_nonlazybind: case lltok::kw_returns_twice: case lltok::kw_address_safety: - case lltok::kw_forcesizeopt: + case lltok::kw_minsize: if (AttrKind != 2) HaveError |= Error(AttrLoc, "invalid use of function-only attribute"); break; diff --git a/lib/AsmParser/LLToken.h b/lib/AsmParser/LLToken.h index 6cffc52..036686d 100644 --- a/lib/AsmParser/LLToken.h +++ b/lib/AsmParser/LLToken.h @@ -110,7 +110,7 @@ namespace lltok { kw_naked, kw_nonlazybind, kw_address_safety, - kw_forcesizeopt, + kw_minsize, kw_type, kw_opaque, diff --git a/lib/Target/ARM/ARMISelLowering.cpp b/lib/Target/ARM/ARMISelLowering.cpp index e4bc31c..3b8d79b 100644 --- a/lib/Target/ARM/ARMISelLowering.cpp +++ b/lib/Target/ARM/ARMISelLowering.cpp @@ -1594,15 +1594,15 @@ ARMTargetLowering::LowerCall(TargetLowering::CallLoweringInfo &CLI, // FIXME: handle tail calls differently. unsigned CallOpc; - bool HasForceSizeAttr = MF.getFunction()->getFnAttributes(). - hasAttribute(Attributes::ForceSizeOpt); + bool HasMinSizeAttr = MF.getFunction()->getFnAttributes(). + hasAttribute(Attributes::MinSize); if (Subtarget->isThumb()) { if ((!isDirect || isARMFunc) && !Subtarget->hasV5TOps()) CallOpc = ARMISD::CALL_NOLINK; else if (doesNotRet && isDirect && !isARMFunc && Subtarget->hasRAS() && !Subtarget->isThumb1Only() && // Emit regular call when code size is the priority - !HasForceSizeAttr) + !HasMinSizeAttr) // "mov lr, pc; b _foo" to avoid confusing the RSP CallOpc = ARMISD::CALL_NOLINK; else @@ -1612,7 +1612,7 @@ ARMTargetLowering::LowerCall(TargetLowering::CallLoweringInfo &CLI, CallOpc = ARMISD::CALL_NOLINK; } else if (doesNotRet && isDirect && Subtarget->hasRAS() && // Emit regular call when code size is the priority - !HasForceSizeAttr) + !HasMinSizeAttr) // "mov lr, pc; b _foo" to avoid confusing the RSP CallOpc = ARMISD::CALL_NOLINK; else diff --git a/lib/Target/CppBackend/CPPBackend.cpp b/lib/Target/CppBackend/CPPBackend.cpp index dd00b7d..0f3efd8 100644 --- a/lib/Target/CppBackend/CPPBackend.cpp +++ b/lib/Target/CppBackend/CPPBackend.cpp @@ -507,6 +507,7 @@ void CppWriter::printAttributes(const AttrListPtr &PAL, HANDLE_ATTR(ReturnsTwice); HANDLE_ATTR(UWTable); HANDLE_ATTR(NonLazyBind); + HANDLE_ATTR(MinSize); #undef HANDLE_ATTR if (attrs.hasAttribute(Attributes::StackAlignment)) Out << " B.addStackAlignmentAttr(" << attrs.getStackAlignment() << ")\n"; diff --git a/lib/VMCore/Attributes.cpp b/lib/VMCore/Attributes.cpp index 642d4fc..5a552c3 100644 --- a/lib/VMCore/Attributes.cpp +++ b/lib/VMCore/Attributes.cpp @@ -201,8 +201,8 @@ std::string Attributes::getAsString() const { Result += "nonlazybind "; if (hasAttribute(Attributes::AddressSafety)) Result += "address_safety "; - if (hasAttribute(Attributes::ForceSizeOpt)) - Result += "forcesizeopt "; + if (hasAttribute(Attributes::MinSize)) + Result += "minsize "; if (hasAttribute(Attributes::StackAlignment)) { Result += "alignstack("; Result += utostr(getStackAlignment()); @@ -326,7 +326,7 @@ uint64_t AttributesImpl::getAttrMask(uint64_t Val) { case Attributes::UWTable: return 1 << 30; case Attributes::NonLazyBind: return 1U << 31; case Attributes::AddressSafety: return 1ULL << 32; - case Attributes::ForceSizeOpt: return 1ULL << 33; + case Attributes::MinSize: return 1ULL << 33; } llvm_unreachable("Unsupported attribute type"); } |