Displaying 6 results from an estimated 6 matches for "createfastfpmath".
2012 Apr 16
2
[LLVMdev] Representing -ffast-math at the IR level
...ch like 'getDefault...' above.
+ Instruction *AddFPMathTag(Instruction *I, MDNode *FPMathTag) const {
Another bad case, but I think this instruction is gone...
+ MDString *GetFastString() const {
+ return CreateString("fast");
+ }
'getFastString'.
+ /// CreateFastFPMath - Return metadata with appropriate settings for
'fast
+ /// math'.
I would prefer the more modern doxygen style:
/// \brief Return metadata ...
+ MDNode *CreateFastFPMath() {
Capitalization.
The capitalization and doxygen style comments apply to the next function as
well.
Both...
2012 Apr 16
0
[LLVMdev] Representing -ffast-math at the IR level
...and is also capitalized like that for consistency with the rest
of IRBuilder.
>
> + MDString *GetFastString() const {
> + return CreateString("fast");
> + }
>
> 'getFastString'.
OK, done - same for the others that are not in IRBuilder.
> + /// CreateFastFPMath - Return metadata with appropriate settings for 'fast
> + /// math'.
>
> I would prefer the more modern doxygen style:
>
> /// \brief Return metadata ...
>
> + MDNode *CreateFastFPMath() {
>
> Capitalization.
>
> The capitalization and doxygen style co...
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 16
1
[LLVMdev] Representing -ffast-math at the IR level
...is as a single "fast" mode flag,
it isn't a single flag, that's the whole point of using metadata. OK, right
now there is only one option (the "accuracy"), true, but the intent 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'...
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
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