[PATCH] D139629: clang: Stop emitting "strictfp"
Zahira Ammarguellat via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Dec 8 13:54:25 PST 2022
zahiraam added inline comments.
================
Comment at: clang/lib/CodeGen/CodeGenModule.cpp:2135
- llvm::AttrBuilder FuncAttrs(F->getContext());
- FuncAttrs.addAttribute("strictfp");
- F->addFnAttrs(FuncAttrs);
----------------
I think it would better to fix this function instead of removing it entirely? The issue here is that there is the "strictfp" attribute and the llvm::Attribute::StrictFP. We could replace FuncAttrs.addAttribute("strictfp"); with
FuncAttrs.addAttribute(llvm::Attribute::StrictFP);
This function ensures that the function attribute is set when the FunctionDecl attribute is set. I am concerned that when it's removed, we will wind up with cases where the function attribute is missing! The only place where this function attribute is in CodeGenFunction::StartFunction. Is that enough? @andrew.w.kaylor Can you please weigh in on this?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D139629/new/
https://reviews.llvm.org/D139629
More information about the cfe-commits
mailing list