mirror of
https://github.com/llvm/llvm-project.git
synced 2025-05-03 11:06:06 +00:00
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
This commit is contained in:
parent
cf2aca0aae
commit
8780c0dda2
@ -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,
|
||||
|
@ -5,6 +5,7 @@
|
||||
; functions have inconsistent values, and that a default is returned.
|
||||
|
||||
; RUN: llc < %s -mtriple=armv7-linux-gnueabi -mcpu=cortex-a15 | FileCheck %s
|
||||
; RUN: llc < %s -mtriple=armv7-linux-gnueabi -mcpu=cortex-a15 -enable-ipra | FileCheck %s
|
||||
|
||||
; CHECK: .eabi_attribute 20, 1
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user