search for: createfpmath

Displaying 6 results from an estimated 6 matches for "createfpmath".

Did you mean: create_path
2012 Apr 16
3
[LLVMdev] Representing -ffast-math at the IR level
Hi Duncan, I like the changes to IRBuilder and how the operator can't change it. Looks a lot safer (mistake-wise) and more convenient. This function won't to remove a previously set tag, which could be used by optimisations or inlining. + Instruction *AddFPMathTag(Instruction *I, MDNode *FPMathTag) const { + if (!FPMathTag) + FPMathTag = DefaultFPMathTag; + if (FPMathTag) +
2012 Apr 16
0
[LLVMdev] Representing -ffast-math at the IR level
Btw, the assert in MDNode *CreateFPMath(float Accuracy) is unnecessary. Trichotomy guarantees it will be right. ;) -- cheers, --renato http://systemcall.org/
2012 Apr 16
1
[LLVMdev] Representing -ffast-math at the IR level
Hi Renato, > Btw, the assert in MDNode *CreateFPMath(float Accuracy) is > unnecessary. Trichotomy guarantees it will be right. ;) what if Accuracy is NaN? Ciao, Duncan.
2012 Apr 16
1
[LLVMdev] Representing -ffast-math at the IR level
...tent is that others will be added, and the meaning of accuracy tightened, later. MDBuilder has a createFastFPMath method which is intended to produce settings that match GCC's -ffast-math, however frontends will be able to specify whatever settings they like if that doesn't suit them (i.e. createFPMath will get more arguments as more settings become available). Note that as the current option isn't actually connected to any optimizations, there is nothing much to argue about for the moment. My plan is to introduce a few simple optimizations (x + 0.0 -> x for example) that introduce a fin...
2012 Apr 16
0
[LLVMdev] Representing -ffast-math at the IR level
Duncan, I have some issues with representing this as a single "fast" mode flag, which mostly boil down to the fact that this is a very C-centric view of the world. And, since C compilers are not generally known for their awesomeness on issues of numerics, I'm not sure that's a good idea. Having something called a "fast" or "relaxed" mode implies that it is
2012 Apr 14
9
[LLVMdev] Representing -ffast-math at the IR level
The attached patch is a first attempt at representing "-ffast-math" at the IR level, in fact on individual floating point instructions (fadd, fsub etc). It is done using metadata. We already have a "fpmath" metadata type which can be used to signal that reduced precision is OK for a floating point operation, eg %z = fmul float %x, %y, !fpmath !0 ... !0 = metadata