search for: calltmp2

Displaying 5 results from an estimated 5 matches for "calltmp2".

Did you mean: calltmp
2010 Nov 15
2
[LLVMdev] Optimization of calls to functions without side effects (from Kaleidoscope example)
...de effects. Specifically, ready> extern sin(x); ready> extern cos(x); ready> def foo(x) sin(x)*sin(x) + cos(x)*cos(x); Read function definition: define double @foo(double %x) { entry: %calltmp = call double @sin(double %x) %multmp = fmul double %calltmp, %calltmp %calltmp2 = call double @cos(double %x) %multmp4 = fmul double %calltmp2, %calltmp2 %addtmp = fadd double %multmp, %multmp4 ret double %addtmp } I find that when I run the code, the calls to sin and cos aren't optimized and, instead, I end up with: define double @foo(double %x)...
2010 Nov 15
0
[LLVMdev] Optimization of calls to functions without side effects (from Kaleidoscope example)
...ide effects. Specifically, ready> extern sin(x); ready> extern cos(x); ready> def foo(x) sin(x)*sin(x) + cos(x)*cos(x); Read function definition: define double @foo(double %x) { entry: %calltmp = call double @sin(double %x) %multmp = fmul double %calltmp, %calltmp %calltmp2 = call double @cos(double %x) %multmp4 = fmul double %calltmp2, %calltmp2 %addtmp = fadd double %multmp, %multmp4 ret double %addtmp } I find that when I run the code, the calls to sin and cos aren't optimized and, instead, I end up with: define double @foo(double %x)...
2010 Nov 12
4
[LLVMdev] C Backend's future
Chris Lattner <clattner at apple.com> writes: > On Nov 5, 2010, at 7:11 AM, Kirk Kelsey wrote: > >> I'm wondering what the longer term plans are for the C Backend. I >> understand it's not actively developed, even deprecated. What I'm not >> clear about is whether it's something that is viewed as non-vital and >> should just as well go away, or
2017 Feb 06
3
Kaleidoscope tutorial: comments, corrections and Windows support
...nspite of the same optimizations as in your listing... - "ready> def foo(x) sin(x)*sin(x) + cos(x)*cos(x); Read function definition: define double @foo(double %x) { entry: %calltmp = call double @sin(double %x) %multmp = fmul double %calltmp, %calltmp %calltmp2 = call double @cos(double %x) %multmp4 = fmul double %calltmp2, %calltmp2 %addtmp = fadd double %multmp, %multmp4 ret double %addtmp }": In my case, the CSE does not work, although it does work for the example in 4.3: "ready> def foo(x) sin(x)*sin...
2010 Nov 15
2
[LLVMdev] Optimization of calls to functions without side effects (from Kaleidoscope example)
...t (though flagged with "readonly") declare double @sin(double) readonly declare double @cos(double) readonly define double @foo(double %x) readonly { entry: %calltmp = call double @sin(double %x) %calltmp1 = call double @sin(double %x) %multmp = fmul double %calltmp, %calltmp1 %calltmp2 = call double @cos(double %x) %calltmp3 = call double @cos(double %x) %multmp4 = fmul double %calltmp2, %calltmp3 %addtmp = fadd double %multmp, %multmp4 ret double %addtmp }