summaryrefslogtreecommitdiff
path: root/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
commit9224227bc2310ddda5e4bf7bc8aebde48fae7f4d (patch)
treed375848cdc513ca667b5bf7cb9c5a39a26ab6e24 /lib/IR/LLVMContext.cpp
parentbeb8a9efb779a5692909248aa9a7f3b17289838e (diff)
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244489 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/IR/LLVMContext.cpp')
-rw-r--r--lib/IR/LLVMContext.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/IR/LLVMContext.cpp b/lib/IR/LLVMContext.cpp
index 59680f5eef5..803d24bcb76 100644
--- a/lib/IR/LLVMContext.cpp
+++ b/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;
}