diff options
author | Oliver Stannard <oliver.stannard@linaro.org> | 2019-07-19 10:37:37 +0000 |
---|---|---|
committer | Oliver Stannard <oliver.stannard@linaro.org> | 2019-07-19 10:37:37 +0000 |
commit | 8780c0dda21c1ab685adc58e1522f90e90c1667c (patch) | |
tree | 9b33557d16d95fd2bddb14a519f25b5188c7f426 /llvm/lib/Target/TargetMachine.cpp | |
parent | cf2aca0aaea5e3f75da77b1f93800a50b5879909 (diff) | |
download | bcm5719-llvm-8780c0dda21c1ab685adc58e1522f90e90c1667c.tar.gz bcm5719-llvm-8780c0dda21c1ab685adc58e1522f90e90c1667c.zip |
Don't update NoTrappingFPMath and FPDenormalMode in resetTargetOptions
We'd like to remove this whole function, because these are properties of
functions, not the target as a whole. These two are easy to remove
because they are only used for emitting ARM build attributes, which
expects them to represent the defaults for the whole module, not just
the last function generated.
This is needed to get correct build attributes when using IPRA on ARM,
because IPRA causes resetTargetOptions to get called before
ARMAsmPrinter::emitAttributes.
Differential revision: https://reviews.llvm.org/D64929
llvm-svn: 366562
Diffstat (limited to 'llvm/lib/Target/TargetMachine.cpp')
-rw-r--r-- | llvm/lib/Target/TargetMachine.cpp | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/llvm/lib/Target/TargetMachine.cpp b/llvm/lib/Target/TargetMachine.cpp index 634866d9357..9ee71c41bc9 100644 --- a/llvm/lib/Target/TargetMachine.cpp +++ b/llvm/lib/Target/TargetMachine.cpp @@ -63,18 +63,6 @@ void TargetMachine::resetTargetOptions(const Function &F) const { RESET_OPTION(NoInfsFPMath, "no-infs-fp-math"); RESET_OPTION(NoNaNsFPMath, "no-nans-fp-math"); RESET_OPTION(NoSignedZerosFPMath, "no-signed-zeros-fp-math"); - RESET_OPTION(NoTrappingFPMath, "no-trapping-math"); - - StringRef Denormal = - F.getFnAttribute("denormal-fp-math").getValueAsString(); - if (Denormal == "ieee") - Options.FPDenormalMode = FPDenormal::IEEE; - else if (Denormal == "preserve-sign") - Options.FPDenormalMode = FPDenormal::PreserveSign; - else if (Denormal == "positive-zero") - Options.FPDenormalMode = FPDenormal::PositiveZero; - else - Options.FPDenormalMode = DefaultOptions.FPDenormalMode; } /// Returns the code generation relocation model. The choices are static, PIC, |