aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/LLVMContext.cpp
diff options
context:
space:
mode:
authorTyler Nowicki <tyler.nowicki@gmail.com>2015-08-10 19:51:46 +0000
committerTyler Nowicki <tyler.nowicki@gmail.com>2015-08-10 19:51:46 +0000
commitc1a86f586617f8127eaf5024d27238a92a735db1 (patch)
treeda915860da5199e699a372a22cefd4a4bd1b476a /llvm/lib/IR/LLVMContext.cpp
parentc2e3ba48e315312560a2fb26cbb8e8045ab9991e (diff)
downloadllvm-c1a86f586617f8127eaf5024d27238a92a735db1.zip
llvm-c1a86f586617f8127eaf5024d27238a92a735db1.tar.gz
llvm-c1a86f586617f8127eaf5024d27238a92a735db1.tar.bz2
Late evaluation of the fast-math vectorization requirement.
This patch moves the verification of fast-math to just before vectorization is done. This way we can tell clang to append the command line options would that allow floating-point commutativity. Specifically those are enableing fast-math or specifying a loop hint. llvm-svn: 244489
Diffstat (limited to 'llvm/lib/IR/LLVMContext.cpp')
-rw-r--r--llvm/lib/IR/LLVMContext.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/IR/LLVMContext.cpp b/llvm/lib/IR/LLVMContext.cpp
index 59680f5..803d24b 100644
--- a/llvm/lib/IR/LLVMContext.cpp
+++ b/llvm/lib/IR/LLVMContext.cpp
@@ -199,6 +199,11 @@ static bool isDiagnosticEnabled(const DiagnosticInfo &DI) {
if (!cast<DiagnosticInfoOptimizationRemarkAnalysis>(DI).isEnabled())
return false;
break;
+ case llvm::DK_OptimizationRemarkAnalysisFPCommute:
+ if (!cast<DiagnosticInfoOptimizationRemarkAnalysisFPCommute>(DI)
+ .isEnabled())
+ return false;
+ break;
default:
break;
}