Displaying 13 results from an estimated 13 matches for "fpmathtag".
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)
+ 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 defau...
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
2
[LLVMdev] Representing -ffast-math at the IR level
...cy not a positive number!", &I);
To be pedantic for a moment, zero is not a positive number. What about
asserting these individually to give us more clear asserts if they fire?
That also makes the string easier to write: "fpmath accuracy is a negative
number!".
+ /// SetDefaultFPMathTag - Set the floating point math metadata to be
used.
+ void SetDefaultFPMathTag(MDNode *FPMathTag) { DefaultFPMathTag =
FPMathTag; }
This should be 'setDefault...' much like 'getDefault...' above.
+ Instruction *AddFPMathTag(Instruction *I, MDNode *FPMathTag) const {
Another bad...
2012 Apr 16
0
[LLVMdev] Representing -ffast-math at the IR level
...ey fire? That also makes
> the string easier to write: "fpmath accuracy is a negative number!".
It will fire on: zero, negative numbers, NaN, +-infinity. Personally I reckon
"fpmath accuracy not a positive number!" is reasonable for all of these.
>
> + /// SetDefaultFPMathTag - Set the floating point math metadata to be used.
> + void SetDefaultFPMathTag(MDNode *FPMathTag) { DefaultFPMathTag = FPMathTag; }
>
> This should be 'setDefault...' much like 'getDefault...' above.
The rest of IRBuilder uses a capital S in its setters, so I was just tr...
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
2020 Aug 10
2
Orc JIT v2 breaks OpenMP in 11.x branch?
...Bundles=..., NameStr=...,
> InsertBefore=0x0) at
> /u/geoff/llvmrepo/llvm-project/llvm/include/llvm/IR/Instructions.h:1489
> #6 0x00007fb71171f1e0 in llvm::IRBuilderBase::CreateCall
> (this=0x7fffd4fdaac8, FTy=0x51fd280, Callee=0x51f6d28, Args=...,
> OpBundles=..., Name=..., FPMathTag=0x0) at
> /u/geoff/llvmrepo/llvm-project/llvm/include/llvm/IR/IRBuilder.h:2338
> #7 0x00007fb71171f2d5 in llvm::IRBuilderBase::CreateCall
> (this=0x7fffd4fdaac8, Callee=..., Args=..., OpBundles=..., Name=...,
> FPMathTag=0x0) at
> /u/geoff/llvmrepo/llvm-project/llvm/include/llvm...
2020 Aug 03
2
Orc JIT v2 breaks OpenMP in 11.x branch?
Greetings, Lang and other JITters,
Last week I moved our Orc v2-based app from top-of-tree to the new
11.x branch, and it no longer handles C++ code containing OpenMP
directives correctly.
More specifically, if I JIT compile a function containing OpenMP
parallel/for pragmas, using a release version of LLVM, the code
compiles and seems to work, but if I try to write the module's bitcode
to
2020 Aug 10
2
[EXTERNAL] Re: Orc JIT v2 breaks OpenMP in 11.x branch?
...=...,
>> InsertBefore=0x0) at
>> /u/geoff/llvmrepo/llvm-project/llvm/include/llvm/IR/Instructions.h:1489
>> #6 0x00007fb71171f1e0 in llvm::IRBuilderBase::CreateCall
>> (this=0x7fffd4fdaac8, FTy=0x51fd280, Callee=0x51f6d28, Args=...,
>> OpBundles=..., Name=..., FPMathTag=0x0) at
>> /u/geoff/llvmrepo/llvm-project/llvm/include/llvm/IR/IRBuilder.h:2338
>> #7 0x00007fb71171f2d5 in llvm::IRBuilderBase::CreateCall
>> (this=0x7fffd4fdaac8, Callee=..., Args=..., OpBundles=..., Name=...,
>> FPMathTag=0x0) at
>> /u/geoff/llvmrepo/llvm-proje...
2020 Aug 10
2
[EXTERNAL] Re: Orc JIT v2 breaks OpenMP in 11.x branch?
...at
> >>> /u/geoff/llvmrepo/llvm-project/llvm/include/llvm/IR/Instructions.h:1489
> >>> #6 0x00007fb71171f1e0 in llvm::IRBuilderBase::CreateCall
> >>> (this=0x7fffd4fdaac8, FTy=0x51fd280, Callee=0x51f6d28, Args=...,
> >>> OpBundles=..., Name=..., FPMathTag=0x0) at
> >>> /u/geoff/llvmrepo/llvm-project/llvm/include/llvm/IR/IRBuilder.h:2338
> >>> #7 0x00007fb71171f2d5 in llvm::IRBuilderBase::CreateCall
> >>> (this=0x7fffd4fdaac8, Callee=..., Args=..., OpBundles=..., Name=...,
> >>> FPMathTag=0x0) at...
2020 Aug 10
2
[EXTERNAL] Re: Orc JIT v2 breaks OpenMP in 11.x branch?
...eoff/llvmrepo/llvm-project/llvm/include/llvm/IR/Instructions.h:1489
> >>>>> #6 0x00007fb71171f1e0 in llvm::IRBuilderBase::CreateCall
> >>>>> (this=0x7fffd4fdaac8, FTy=0x51fd280, Callee=0x51f6d28, Args=...,
> >>>>> OpBundles=..., Name=..., FPMathTag=0x0) at
> >>>>> /u/geoff/llvmrepo/llvm-project/llvm/include/llvm/IR/IRBuilder.h:2338
> >>>>> #7 0x00007fb71171f2d5 in llvm::IRBuilderBase::CreateCall
> >>>>> (this=0x7fffd4fdaac8, Callee=..., Args=..., OpBundles=..., Name=...,
> >>>...
2020 Aug 10
2
[EXTERNAL] Re: Orc JIT v2 breaks OpenMP in 11.x branch?
...epo/llvm-project/llvm/include/llvm/IR/Instructions.h:1489
>>>>>>> #6 0x00007fb71171f1e0 in llvm::IRBuilderBase::CreateCall
>>>>>>> (this=0x7fffd4fdaac8, FTy=0x51fd280, Callee=0x51f6d28, Args=...,
>>>>>>> OpBundles=..., Name=..., FPMathTag=0x0) at
>>>>>>> /u/geoff/llvmrepo/llvm-project/llvm/include/llvm/IR/IRBuilder.h:2338
>>>>>>> #7 0x00007fb71171f2d5 in llvm::IRBuilderBase::CreateCall
>>>>>>> (this=0x7fffd4fdaac8, Callee=..., Args=..., OpBundles=..., Name=...,
>>...
2014 Sep 19
2
[LLVMdev] More careful treatment of floating point exceptions
Hi Sanjay,
Thanks, I saw this flag and it's definitely should be considered, but
it appeared to me to be static characteristic of target platform. I'm
not sure how appropriate it would be to change its value from a front-end.
It says "Has", while optional flag would rather say "Uses" meaning that
implementation cares about floating point exceptions.
Regards,
Sergey
2014 Sep 25
2
[LLVMdev] More careful treatment of floating point exceptions
....h
index c074be8..1024990 100644
--- a/include/llvm/IR/IRBuilder.h
+++ b/include/llvm/IR/IRBuilder.h
@@ -704,10 +704,11 @@ public:
return CreateMul(LHS, RHS, Name, true, false);
}
Value *CreateFMul(Value *LHS, Value *RHS, const Twine &Name = "",
- MDNode *FPMathTag = nullptr) {
+ MDNode *FPMathTag = nullptr,
+ bool HonorFPExceptions = false) {
if (Constant *LC = dyn_cast<Constant>(LHS))
if (Constant *RC = dyn_cast<Constant>(RHS))
- return Insert(Folder.CreateFMul(LC, RC), Name);
+ ret...