search for: visitunaryfloatcall

Displaying 9 results from an estimated 9 matches for "visitunaryfloatcall".

2013 May 17
3
[LLVMdev] Inlining sqrt library function in X86
...{ return sqrt(d); } and compiling it with "clang -O3 ...", I was trying to determine what it would take to get the X86 code generator to replace the call to sqrt with a sqrtsd instruction inline. It turns out that it could do exactly that, were it not for the fact that in the function visitUnaryFloatCall() at line 5514 in SelectionDAGBuilder.cpp, the result of !I.onlyReadsMemory() Is true, so the code is unable to replace the function call with an ISD::FSQRT SDNode. If I remove the above test, then the compiler will emit a sqrtsd instruction. I am hoping that someone might be able to comment on...
2013 Jan 22
0
[LLVMdev] sincos optimization
...TargetLibraryInfo.cpp The list of functions which are considered candidates for promotion is in hasOptimizedCodeGen() in here: include/llvm/Target/TargetLibraryInfo.h ...and the code that actually does it is here: lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp Look for SelectionDAGBuilder::visitUnaryFloatCall() and visitCall(). It appears that such functions are only promoted if they're declared readnone, which provides some protection against overriding a standard library function, but I haven't found anything that explicitly checks for this yet. Disclaimer: I learnt this yesterday... -- ┌─...
2013 May 17
0
[LLVMdev] Inlining sqrt library function in X86
...(d); > } > > and compiling it with “clang –O3 …”, I was trying to determine what it would take to get the X86 code generator to replace the call to sqrt with a sqrtsd instruction inline. > > It turns out that it could do exactly that, were it not for the fact that in the function visitUnaryFloatCall() at line 5514 in SelectionDAGBuilder.cpp, the result of > > !I.onlyReadsMemory() > > Is true, so the code is unable to replace the function call with an ISD::FSQRT SDNode. If I remove the above test, then the compiler will emit a sqrtsd instruction. > > I am hoping that som...
2013 Jan 22
2
[LLVMdev] sincos optimization
Hi, I'm looking at http://llvm.org/bugs/show_bug.cgi?id=13204 which involves converting calls to sin and cos to sincos (when available) Initially I thought about transforming calls to sinf/cosf to sincosf. However, I don't think this is a legal transformation given that a declaration for a function called sinf is not necessarily the standard library function. Therefore it makes sense to
2013 Jan 08
0
[LLVMdev] mips16 hard float puzzle
On Mon, Jan 7, 2013 at 6:07 PM, reed kotler <rkotler at mips.com> wrote: > > For example: > > /home/rkotler/llvm/install/bin/llc -mcpu=mips16 hf16_2.ll -march=mipsel > -relocation-model=pic -o hf16_2.s -O3 -mips16-hard-float -soft-float Try something like the following: float f; double test(void* fptr) { f = ((float(*)(float,float))fptr)(1.0, 1.0); } -Eli
2013 Jan 22
1
[LLVMdev] sincos optimization
Hi David, On 2013-01-22, at 5:59 AM, David Given wrote: > ...and the code that actually does it is here: > > lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp > > Look for SelectionDAGBuilder::visitUnaryFloatCall() and visitCall(). > > It appears that such functions are only promoted if they're declared > readnone, which provides some protection against overriding a standard > library function, but I haven't found anything that explicitly checks > for this yet. > Thanks for the...
2013 Jan 09
2
[LLVMdev] mips16 hard float puzzle
...nted out simply using the DAG in Mips lower call). So it seems possible to add an additional parameter to LowerCallTo and pass it down the chain until Mips lower call is invoked. Is this more or less what you had in mind? There may be some special handling needed for functions which fall under visitUnaryFloatCall and maybe some other cases.
2013 May 18
2
[LLVMdev] Inlining sqrt library function in X86
...> >> and compiling it with “clang –O3 …”, I was trying to determine what it would take to get the X86 code generator to replace the call to sqrt with a sqrtsd instruction inline. >> >> It turns out that it could do exactly that, were it not for the fact that in the function visitUnaryFloatCall() at line 5514 in SelectionDAGBuilder.cpp, the result of >> >> !I.onlyReadsMemory() >> >> Is true, so the code is unable to replace the function call with an ISD::FSQRT SDNode. If I remove the above test, then the compiler will emit a sqrtsd instruction. >> >&...
2013 Jan 08
2
[LLVMdev] mips16 hard float puzzle
For example: /home/rkotler/llvm/install/bin/llc -mcpu=mips16 hf16_2.ll -march=mipsel -relocation-model=pic -o hf16_2.s -O3 -mips16-hard-float -soft-float On 01/04/2013 07:45 PM, Eli Friedman wrote: > On Fri, Jan 4, 2013 at 6:28 PM, reed kotler <rkotler at mips.com> wrote: >> On 01/04/2013 06:08 PM, Eli Friedman wrote: >>> On Fri, Jan 4, 2013 at 4:08 PM, reed kotler