summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
diff options
context:
space:
mode:
authorLang Hames <lhames@gmail.com>2012-11-15 07:51:26 +0000
committerLang Hames <lhames@gmail.com>2012-11-15 07:51:26 +0000
commit65992f454c994d126e57704e74ffb1b7a01914d9 (patch)
tree0f9cd6f59e1243a2d51aa0939f100a854e94a51a /clang/lib/CodeGen
parent22a6503df6b0e7567b5c03249790e5d4b31bc8f4 (diff)
downloadbcm5719-llvm-65992f454c994d126e57704e74ffb1b7a01914d9.tar.gz
bcm5719-llvm-65992f454c994d126e57704e74ffb1b7a01914d9.zip
Make -ffp-contract a codegen option, rather than a laguage option. This makes
more sense anyway - it determines how expressions are codegen'd. It also ensures that -ffp-contract=fast has the intended effect when compiling LLVM IR. llvm-svn: 168027
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r--clang/lib/CodeGen/BackendUtil.cpp8
-rw-r--r--clang/lib/CodeGen/CGExprScalar.cpp2
2 files changed, 5 insertions, 5 deletions
diff --git a/clang/lib/CodeGen/BackendUtil.cpp b/clang/lib/CodeGen/BackendUtil.cpp
index 62f87c983bf..c6981022785 100644
--- a/clang/lib/CodeGen/BackendUtil.cpp
+++ b/clang/lib/CodeGen/BackendUtil.cpp
@@ -381,14 +381,14 @@ TargetMachine *EmitAssemblyHelper::CreateTargetMachine(bool MustCreateTM) {
}
// Set FP fusion mode.
- switch (LangOpts.getFPContractMode()) {
- case LangOptions::FPC_Off:
+ switch (CodeGenOpts.getFPContractMode()) {
+ case CodeGenOptions::FPC_Off:
Options.AllowFPOpFusion = llvm::FPOpFusion::Strict;
break;
- case LangOptions::FPC_On:
+ case CodeGenOptions::FPC_On:
Options.AllowFPOpFusion = llvm::FPOpFusion::Standard;
break;
- case LangOptions::FPC_Fast:
+ case CodeGenOptions::FPC_Fast:
Options.AllowFPOpFusion = llvm::FPOpFusion::Fast;
break;
}
diff --git a/clang/lib/CodeGen/CGExprScalar.cpp b/clang/lib/CodeGen/CGExprScalar.cpp
index b429b1d6e47..ed8b9c69ecd 100644
--- a/clang/lib/CodeGen/CGExprScalar.cpp
+++ b/clang/lib/CodeGen/CGExprScalar.cpp
@@ -2217,7 +2217,7 @@ static Value* tryEmitFMulAdd(const BinOpInfo &op,
// Check whether -ffp-contract=on. (If -ffp-contract=off/fast, fusing is
// either disabled, or handled entirely by the LLVM backend).
- if (CGF.getLangOpts().getFPContractMode() != LangOptions::FPC_On)
+ if (CGF.CGM.getCodeGenOpts().getFPContractMode() != CodeGenOptions::FPC_On)
return 0;
// We have a potentially fusable op. Look for a mul on one of the operands.
OpenPOWER on IntegriCloud