turn off LLVM FMA discovery

This helps guarantee same-machine consistency
between the interpreter and the JIT.

2-3% perf loss on exemplar benches, which we think we can
recover with the following TODO:

TODO(herb): add Op::{fnma,fms,fnms}_f32 for the various ±xy ± z
combinations we can generate in the backends, peephole, etc.
just as we do Op::fma_f32 so we can recover the (tiny) performance
loss here we take from losing those discovered fused instructions.

Change-Id: Id30e1b9178a55e8072a30d2a34e7ed9188543d60
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/275139
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Herb Derby <herb@google.com>
This commit is contained in:
Mike Klein 2020-03-04 15:41:20 -06:00 committed by Skia Commit-Bot
parent 823d319f3b
commit 3b7b4d8216

View File

@ -2316,13 +2316,9 @@ namespace skvm {
SkAssertResult(false == llvm::InitializeNativeTargetAsmPrinter());
});
llvm::TargetOptions options;
options.AllowFPOpFusion = llvm::FPOpFusion::Fast;
if (llvm::ExecutionEngine* ee = llvm::EngineBuilder(std::move(mod))
.setEngineKind(llvm::EngineKind::JIT)
.setMCPU(llvm::sys::getHostCPUName())
.setTargetOptions(options)
.create()) {
fImpl->llvm_ctx = std::move(ctx);
fImpl->llvm_ee.reset(ee);