[PATCH] D34163: Add strictfp attribute to prevent unwanted optimizations of libm calls
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 23 13:42:24 PDT 2017
craig.topper added inline comments.
================
Comment at: include/llvm/Bitcode/LLVMBitCodes.h:552
+ ATTR_KIND_SPECULATABLE = 53,
+ ATTR_KIND_STRICT_FP = 54
};
----------------
Maybe just leave a trailnig comma on the end here so the next guy doesn't have to add one. Looks like the 2 enums below have a trailing comma.
================
Comment at: lib/AsmParser/LLParser.cpp:1124
B.addAttribute(Attribute::SanitizeMemory); break;
+ case lltok::kw_strictfp: B.addAttribute(Attribute::StrictFP); break;
case lltok::kw_uwtable: B.addAttribute(Attribute::UWTable); break;
----------------
Should this be after sspstrong to match the order in LLLexer.cpp which seems to be mostly alphabetical except for the sanitize and safestack?
================
Comment at: lib/AsmParser/LLToken.h:212
kw_swifterror,
kw_swiftself,
kw_uwtable,
----------------
Wow how many different not alphabetical orders do we have on these keywords?
================
Comment at: lib/Transforms/Utils/SimplifyLibCalls.cpp:2055
+ // Check for floating point library functions.
+ if (!TLI->getLibFunc(*Callee, Func) || !TLI->has(Func))
+ return nullptr;
----------------
Doesnt' the caller already check getLibFunc and TLI->has?
Repository:
rL LLVM
https://reviews.llvm.org/D34163
More information about the llvm-commits
mailing list