diff options
author | Andrew Kaylor <andrew.kaylor@intel.com> | 2017-08-14 21:15:13 +0000 |
---|---|---|
committer | Andrew Kaylor <andrew.kaylor@intel.com> | 2017-08-14 21:15:13 +0000 |
commit | 53a5fbb45fa45cba48963a6b17defa4c4f072d9d (patch) | |
tree | 750f3d0408337c88a5ee993680853096b47bbbdf /llvm/lib/AsmParser | |
parent | 8bf15723ae9cf59a7171981b1b0257de4d48e344 (diff) | |
download | bcm5719-llvm-53a5fbb45fa45cba48963a6b17defa4c4f072d9d.tar.gz bcm5719-llvm-53a5fbb45fa45cba48963a6b17defa4c4f072d9d.zip |
Add strictfp attribute to prevent unwanted optimizations of libm calls
Differential Revision: https://reviews.llvm.org/D34163
llvm-svn: 310885
Diffstat (limited to 'llvm/lib/AsmParser')
-rw-r--r-- | llvm/lib/AsmParser/LLLexer.cpp | 1 | ||||
-rw-r--r-- | llvm/lib/AsmParser/LLParser.cpp | 3 | ||||
-rw-r--r-- | llvm/lib/AsmParser/LLToken.h | 1 |
3 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/AsmParser/LLLexer.cpp b/llvm/lib/AsmParser/LLLexer.cpp index 90e0d6a216e..5ce55f52276 100644 --- a/llvm/lib/AsmParser/LLLexer.cpp +++ b/llvm/lib/AsmParser/LLLexer.cpp @@ -654,6 +654,7 @@ lltok::Kind LLLexer::LexIdentifier() { KEYWORD(ssp); KEYWORD(sspreq); KEYWORD(sspstrong); + KEYWORD(strictfp); KEYWORD(safestack); KEYWORD(sanitize_address); KEYWORD(sanitize_thread); diff --git a/llvm/lib/AsmParser/LLParser.cpp b/llvm/lib/AsmParser/LLParser.cpp index 13679ce1d25..828f873d37b 100644 --- a/llvm/lib/AsmParser/LLParser.cpp +++ b/llvm/lib/AsmParser/LLParser.cpp @@ -1121,6 +1121,7 @@ bool LLParser::ParseFnAttributeValuePairs(AttrBuilder &B, B.addAttribute(Attribute::SanitizeThread); break; case lltok::kw_sanitize_memory: B.addAttribute(Attribute::SanitizeMemory); break; + case lltok::kw_strictfp: B.addAttribute(Attribute::StrictFP); break; case lltok::kw_uwtable: B.addAttribute(Attribute::UWTable); break; case lltok::kw_writeonly: B.addAttribute(Attribute::WriteOnly); break; @@ -1446,6 +1447,7 @@ bool LLParser::ParseOptionalParamAttrs(AttrBuilder &B) { case lltok::kw_sspreq: case lltok::kw_sspstrong: case lltok::kw_safestack: + case lltok::kw_strictfp: case lltok::kw_uwtable: HaveError |= Error(Lex.getLoc(), "invalid use of function-only attribute"); break; @@ -1537,6 +1539,7 @@ bool LLParser::ParseOptionalReturnAttrs(AttrBuilder &B) { case lltok::kw_sspreq: case lltok::kw_sspstrong: case lltok::kw_safestack: + case lltok::kw_strictfp: case lltok::kw_uwtable: HaveError |= Error(Lex.getLoc(), "invalid use of function-only attribute"); break; diff --git a/llvm/lib/AsmParser/LLToken.h b/llvm/lib/AsmParser/LLToken.h index 0f3707ba0d1..09e502d7a35 100644 --- a/llvm/lib/AsmParser/LLToken.h +++ b/llvm/lib/AsmParser/LLToken.h @@ -207,6 +207,7 @@ enum Kind { kw_sret, kw_sanitize_thread, kw_sanitize_memory, + kw_strictfp, kw_swifterror, kw_swiftself, kw_uwtable, |