diff options
author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2020-09-17 17:50:42 -0400 |
---|---|---|
committer | Matt Arsenault <Matthew.Arsenault@amd.com> | 2020-09-18 09:55:47 -0400 |
commit | 751a6c5760b8de591cf241effbdad1b1cae67814 (patch) | |
tree | cafb70d01ad906c5796b33ce642519eebbd41826 /llvm/lib/CodeGen/MachineFunction.cpp | |
parent | 05c02eda4552076dc08ce34866b3d8ee33bbf842 (diff) | |
download | llvm-751a6c5760b8de591cf241effbdad1b1cae67814.zip llvm-751a6c5760b8de591cf241effbdad1b1cae67814.tar.gz llvm-751a6c5760b8de591cf241effbdad1b1cae67814.tar.bz2 |
IR: Move denormal mode parsing from MachineFunction to Function
This was just inspecting the IR to begin with, and is useful to check
in some places in the IR.
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunction.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineFunction.cpp | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/llvm/lib/CodeGen/MachineFunction.cpp b/llvm/lib/CodeGen/MachineFunction.cpp index e4473fd..87c66c0 100644 --- a/llvm/lib/CodeGen/MachineFunction.cpp +++ b/llvm/lib/CodeGen/MachineFunction.cpp @@ -273,20 +273,7 @@ getOrCreateJumpTableInfo(unsigned EntryKind) { } DenormalMode MachineFunction::getDenormalMode(const fltSemantics &FPType) const { - if (&FPType == &APFloat::IEEEsingle()) { - Attribute Attr = F.getFnAttribute("denormal-fp-math-f32"); - StringRef Val = Attr.getValueAsString(); - if (!Val.empty()) - return parseDenormalFPAttribute(Val); - - // If the f32 variant of the attribute isn't specified, try to use the - // generic one. - } - - // TODO: Should probably avoid the connection to the IR and store directly - // in the MachineFunction. - Attribute Attr = F.getFnAttribute("denormal-fp-math"); - return parseDenormalFPAttribute(Attr.getValueAsString()); + return F.getDenormalMode(FPType); } /// Should we be emitting segmented stack stuff for the function |