similar to: [LLVMdev] sincos optimization

Displaying 20 results from an estimated 700 matches similar to: "[LLVMdev] sincos optimization"

2013 Jan 22
0
[LLVMdev] sincos optimization
On 22/01/13 05:30, Redmond, Paul wrote: [...] > 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
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
2016 Apr 01
2
RFC: A proposal for vectorizing loops with calls to math functions using SVML
RFC: A proposal for vectorizing loops with calls to math functions using SVML (short vector math library). ========= Overview ========= Very simply, SVML (Intel short vector math library) functions are vector variants of scalar math functions that take vector arguments, apply an operation to each element, and store the result in a vector register. These vector variants can be generated by the
2016 Apr 04
2
RFC: A proposal for vectorizing loops with calls to math functions using SVML
Hi Sanjay, For sincos calls, I’m currently just going through isTriviallyVectorizable(), which was good enough to get things working so that I could test the translation. I don’t see why this cannot be changed to use addVectorizableFunctionsFromVecLib(). The other functions that I’m working with are already vectorized using the loop pragma. Those include sin, cos, exp, log, and pow. From: Sanjay
2017 Mar 24
2
clang 4.0.0: Invalid code for builtin floating point function with -mfloat-abi=hard -ffast-math (ARM)
On 22 March 2017 at 01:38, Friedman, Eli <efriedma at codeaurora.org> wrote: >> Small example fail.c: >> >> // clang -O2 -target armv7a-none-none-eabi -mfloat-abi=hard -ffast-math >> -S fail.c -o - >> extern float sinf (float x); >> float sin1 (float x) {return (sinf (x));} I changed your example slightly to make sure we're passing the
2017 Mar 21
3
clang 4.0.0: Invalid code for builtin floating point function with -mfloat-abi=hard -ffast-math (ARM)
Hello, clang/llvm 4.0.0 generates invalid calls for builtin functions with -mfloat-abi=hard -ffast-math. Small example fail.c: // clang -O2 -target armv7a-none-none-eabi -mfloat-abi=hard -ffast-math -S fail.c -o - extern float sinf (float x); float sin1 (float x) {return (sinf (x));} generates code to pass the parameter in r0 and expect the result in r0. The same code without
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
2007 Nov 27
2
[LLVMdev] Other Intrinsics?
On Tue, 27 Nov 2007, Dan Gohman wrote: >> > Intrinsics get added on demand. Generally there has to be a good reason >> > to add them. llvm.sin was implemented (for example) to allow generation >> > of code that uses vector sin operations. >> >> What is the criteria for adding an intrinsic or a built-in operation? >> For example, could the
2017 Oct 07
2
Bug 20871 -- is there a fix or work around?
Ignore the suggested fix in my earlier post. How about this? diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp index 20c81c3..b8ebf42 100644 --- a/lib/Target/X86/X86ISelLowering.cpp +++ b/lib/Target/X86/X86ISelLowering.cpp @@ -1632,10 +1632,11 @@ X86TargetLowering::X86TargetLowering(const X86TargetMachine &TM, if (!Subtarget.is64Bit()) { // These
2007 Nov 28
0
[LLVMdev] Other Intrinsics?
On Tuesday 27 November 2007 06:01:34 pm Chris Lattner wrote: > > The main reason for adding intrinsics instead of just using C library > > calls is for support for vector types. @llvm.sin.* can be overloaded as > > @llvm.sin.v4f32, for example, which is very useful for some users. > > My question is "how can these be used" by people. Specifically, these > need
2009 Nov 18
3
[LLVMdev] lli -force-interpreter complains about external function
Xu Yang wrote: > Hi Nick: > > The first problem have been solved by calling llvm-ld: > > $ llvm-ld -o hellosin.llvm hellosin.bc -lm > $ lli -force-interpreter=true -load=/usr/lib/libm.so hellosin.llvm.bc > hello sin: 0.50 Only because the optimizer saw sin(constant) and folded it away. The entire program became 'print constant string'. There is certainly a bug
2009 Nov 18
0
[LLVMdev] lli -force-interpreter complains about external function
Hi Nick: Thanks for the response. You are right about sinf. I changed the constant to sscanf(argv[1], ...), and it gave me back 0 again. I also compared the disassembled code, and saw it was indeed the case. The primary reason I use interpreter is because I wish to do runtime checking on memory access pattern in multithreaded C programs. for example, if thread one is in the critical section, I
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
2015 Jan 20
3
[LLVMdev] strlen in fast-isel
It seems that fast-isel for intel does not handle strlen. It's a general problem in fast-isel . ~/llvmw/build/Deb~/llvmw/build/Debug+Asserts/bin/clang -O0 -mllvm -fast-isel-verbose -mllvm -fast-isel strlen1.c strlen1.c:12:3: warning: implicitly declaring library function 'printf' with type 'int (const char *, ...)' printf("%i\n", len); ^
2013 Jan 09
2
[LLVMdev] mips16 hard float puzzle
On 01/08/2013 01:48 PM, Eli Friedman wrote: > 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*
2009 Nov 18
2
[LLVMdev] lli -force-interpreter complains about external function
Hi Nick: Thanks for pointing me to libffi. Recompile LLVM with libffi does solve the problem of printf. But it still has other problems: 1) sinf() returns 0 in the interpreter, but returns correct value in JIT (see hellosin.c) 2) calling pthread_create cause lli to crash in the interpreter mode, but no problem in JIT (see phello.c). My questions are: i) can I call any arbitrary external function
2009 Nov 18
0
[LLVMdev] lli -force-interpreter complains about external function
Hi Nick: The first problem have been solved by calling llvm-ld: $ llvm-ld -o hellosin.llvm hellosin.bc -lm $ lli -force-interpreter=true -load=/usr/lib/libm.so hellosin.llvm.bc hello sin: 0.50 The pthread problem remains after llvm-ld: $ lli -force-interpreter=true -load=/lib/libpthread.so.0 phello.llvm.bc 0 lli 0x08796bf8 Segmentation fault For those who are getting "invalid
2012 Dec 31
3
[LLVMdev] [DragonEgg] [Polly] Should we expect DragonEgg to produce identical LLVM IR for identical GIMPLE?
Dear all, In our compiler we use a modified version LLVM Polly, which is very sensitive to proper code generation. Among the number of limitations, the loop region (enclosed by phi node on induction variable and branch) is required to be free of additional memory-dependent branches. In other words, there must be no conditional "br" instructions below phi nodes. The problem we are facing
2016 Jun 15
2
Sincos for X86_64's GNUX32 and ARM's GNUEABI/GNUEABIHF enviroments
Hi, While writing http://reviews.llvm.org/D20916, I stumbled across some code affecting ARM and X86_64 environments that looks like it might be unintentional. I thought I should ask about it here since that patch has a '[mips]' tag and therefore might not be noticed by someone who knows. I've noticed that the GNUX32 and GNUEABI/GNUEABIHF environments don't make use of the sincos
2011 Sep 15
2
[LLVMdev] sincos functions
Hello, I was trying to compare the performance of icc, gcc and llvm on the program almabench.c in Coyote Benchmark suite. Here is a line of code from the program. da = da + (ca[np][k] * cos(arga) + sa[np][k] * sin(arga)) * 0.0000001; gcc and icc are performing way better than llvm as they are using 'sincos' library function to compute the sin and the cos of the argument in a