search for: op1f

Displaying 4 results from an estimated 4 matches for "op1f".

Did you mean: op1
2010 Mar 03
3
[LLVMdev] folding x * 0 = 0
...py 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? -Jochen
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
On Mar 3, 2010, at 10:23 AM, Jochen Wilhelmy wrote: > >> 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 >
2010 Mar 03
0
[LLVMdev] folding x * 0 = 0
...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? I'm not sure how that would work,...