search for: getfastaccuracy

Displaying 3 results from an estimated 3 matches for "getfastaccuracy".

2012 Apr 14
0
[LLVMdev] Representing -ffast-math at the IR level
Hi Duncan, I'm not sure about this: + if (!Accuracy) + // If it's not a floating point number then it must be 'fast'. + return getFastAccuracy(); Since you allow accuracies bigger than 1 in setFPAccuracy(), integers should be treated as float. Or at least assert. Also, I'm thinking you should carry the annotation forward on all uses of an annotated result, or make sure the floating point library searches recursively for annotations...
2012 Apr 14
2
[LLVMdev] Representing -ffast-math at the IR level
Hi Renato, > I'm not sure about this: > > + if (!Accuracy) > + // If it's not a floating point number then it must be 'fast'. > + return getFastAccuracy(); > > Since you allow accuracies bigger than 1 in setFPAccuracy(), integers > should be treated as float. Or at least assert. the verifier checks that the accuracy operand is either a floating point number (ConstantFP) or the keyword "fast". If "Accuracy" is zero her...
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