Displaying 3 results from an estimated 3 matches for "clearfpmathtag".
2012 Apr 16
3
[LLVMdev] Representing -ffast-math at the IR level
...hTag)
+ FPMathTag = DefaultFPMathTag;
+ if (FPMathTag)
+ I->setMetadata(LLVMContext::MD_fpmath, FPMathTag);
+ return I;
+ }
If you want to keep it as only Add, then make FPMathTag = 0 so that
you can easily add the default by just calling AddFPMathTag(instr);
But I'd add a ClearFPMathTag function for optimisations/inlining. Maybe later.
Also, would be good to make sure the instruction is, in fact, a
floating point operation. Either via restricting the type or asserting
on it.
--
cheers,
--renato
http://systemcall.org/
2012 Apr 16
0
[LLVMdev] Representing -ffast-math at the IR level
Here's a revised patch, plus patches showing how fpmath metadata could be
turned on in clang and dragonegg (it seemed safest for the moment to
condition on -ffast-math rather than on one of the flags implied by
-ffast-math).
Major changes:
- The FPMathOperator class can no longer be used to change math settings,
only to read them. Currently it can be queried for accuracy info. I split
the
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