search for: floatingpointchang

Displaying 7 results from an estimated 7 matches for "floatingpointchang".

Did you mean: floatingpointchanges
2010 Mar 03
2
[LLVMdev] folding x * 0 = 0
> You should check out the -enable-finite-only-fp-math and -enable-unsafe-fp-math options. Good hint, but llvm::UnsafeFPMath = true; llvm::FiniteOnlyFPMathOption = true; at the beginning of my code does not help. I found llvm::Reassociate::OptimizeExpression in llvm\lib\Transforms\Scalar\Reassociate.cpp which looks like it does X * 0 = 0 for int, but it does not get called for
2010 Mar 03
0
[LLVMdev] folding x * 0 = 0
...flags only affect the code generator. If you want to add this optimization to your copy of llvm, you can do so by adding it to the instcombine pass. We'd need IR enhancements to do this sort of thing for real in the mid-level optimizer, some thoughts are here: http://nondot.org/sabre/LLVMNotes/FloatingPointChanges.txt However, this is far from being a concrete proposal. -Chris
2010 Nov 21
0
[LLVMdev] Poor floating point optimizations?
...me applications those are not as important as performance (for example graphics calculation). But as I understand, LLVM currently does not have such unsafe/fast math optimizations built in and support of such is yet being planned? I've found this document: http://nondot.org/sabre/LLVMNotes/FloatingPointChanges.txt but I suppose it was not implemented yet? Bob
2010 Mar 03
3
[LLVMdev] folding x * 0 = 0
...only affect the code generator. If you want to add this optimization to your copy of llvm, you can do so by adding it to the instcombine pass. We'd need IR enhancements to do this sort of thing for real in the mid-level optimizer, some thoughts are here: > http://nondot.org/sabre/LLVMNotes/FloatingPointChanges.txt > Thanks, now it works. I inserted if (Op1F->isNullValue()) return ReplaceInstUsesWith(I, Op1C); // X * 0 == 0 into llvm::InstCombiner::visitFMul Why not at first create a compile time option for this so that the code is already available for special purposes?...
2010 Nov 21
2
[LLVMdev] Poor floating point optimizations?
Hi Bob, > For example expressions like "1+x+1+x+1+x+1+x" (basically adding a lot of > constants and variables) are complied to a long series off<add>s both in IR > and > assembly code. > Both GCC and MSVC generates C1*x +C2 (mov + mul + add). > > I am new to using LLVM. I am using Visual Studio 2008 on Windows, targeting > 32-bit X86 code. I'm using
2010 Mar 03
0
[LLVMdev] folding x * 0 = 0
...y affect the code generator. If you want to add this optimization to your copy of llvm, you can do so by adding it to the instcombine pass. We'd need IR enhancements to do this sort of thing for real in the mid-level optimizer, some thoughts are here: >> http://nondot.org/sabre/LLVMNotes/FloatingPointChanges.txt >> > > Thanks, now it works. I inserted > > if (Op1F->isNullValue()) > return ReplaceInstUsesWith(I, Op1C); // X * 0 == 0 > > into llvm::InstCombiner::visitFMul > > Why not at first create a compile time option for this so that the >...
2010 Jan 14
4
[LLVMdev] Presenting Unsafe Math Flag to Optimizer
On Jan 13, 2010, at 4:50 PM, Devang Patel wrote: > On Wed, Jan 13, 2010 at 4:20 PM, Bill Wendling <wendling at apple.com> wrote: >> Hi all, >> >> A quick question: >> >> The current implementation of the "allow unsafe math" option is to specify it via the TargetOptions object. However, this prevents the target-independent optimizer from using it.