similar to: Should llvm optimize 1.0 / x ?

Displaying 20 results from an estimated 800 matches similar to: "Should llvm optimize 1.0 / x ?"

2020 Sep 01
2
Should llvm optimize 1.0 / x ?
Hi Quentin, You are correct, I could manage to get clang to use vrcpps, but not in a satisfying way: clang++ -O3 -march=native -mtune=native \ -Rpass=loop-vectorize -Rpass-missed=loop-vectorize -Rpass-analysis=loop-vectorize \ -ffast-math -ffp-model=fast -ffp-exception-behavior=ignore -ffp-contract=fast \ -c -o vec.o vec.cc 0000000000000140 <_Z4fct4Dv4_f>: 140: c5 f8 53 c8
2020 Aug 31
2
Vectorization of math function failed?
Hi, After reading https://llvm.org/docs/Vectorizers.html#vectorization-of-function-calls I decided to write the following C++ program: #include <cmath> using v4f32 = float __attribute__((__vector_size__(16))); v4f32 fct1(v4f32 x) { v4f32 y; y[0] = std::sin(x[0]); y[1] = std::sin(x[1]); y[2] = std::sin(x[2]); y[3] = std::sin(x[3]); return y; } v4f32 fct2(v4f32 x) { v4f32 y;
2020 Sep 01
2
Vector evolution?
Hi, Please consider the following loop: using v4f32 = float __attribute__((__vector_size__(16))); void fct6(v4f32 *x) { #pragma clang loop vectorize(enable) for (int i = 0; i < 256; ++i) x[i] = 7 * x[i]; } After compiling it with: clang++ -O3 -march=native -mtune=native \ -Rpass=loop-vectorize,slp-vectorize -Rpass-missed=loop-vectorize,slp-vectorize
2006 Sep 27
3
Converting text to numbers
Hi, I have Forecast Class and Observed Class in a data matrix as below. > Sample1 FCT OBS 1 1 5 2 2 4 3 3- 3+ 4 3 3 5 3+ 3- 6 4 2 7 5 1 I want to find the difference between Observed and Forecast Classes. How can I get this done? I tried to following to convert the 1 through 5 classes, to 1 through 7 for both OBS and FCT column. > Sample1$OBS2 <- Sample1$OBS
2013 Oct 28
3
[LLVMdev] Preserving accurate stack traces with optimization?
Is there a known way to preserve a full and accurate stack trace while utilizing most of LLVM's optimization abilities? We are investigating using LLVM as a JIT for a language which requires the ability to generate an accurate stack trace from any arbitrary point(1) during the execution. I know that we can make this work by doing inlining externally, manually recording virtual frames,
2013 Oct 30
2
[LLVMdev] Preserving accurate stack traces with optimization?
On 10/30/13 9:56 AM, Quentin Colombet wrote: > Hi Philip, > > Could you define what is an accurate stack trace for your project? > In other words, what do you mean by full and accurate stack frame? > > Without this definition, this is difficult to give you any feedback. > In particular, I do not see what it means when we use inlining. Sure. Just to note, I *think* your
2013 Oct 30
0
[LLVMdev] Preserving accurate stack traces with optimization?
Hi Philip, Could you define what is an accurate stack trace for your project? In other words, what do you mean by full and accurate stack frame? Without this definition, this is difficult to give you any feedback. In particular, I do not see what it means when we use inlining. E.g., what do you expect from code like this: static void fct1(…) { ... } static void fct2(…) { … fct1(…) ... }
2013 Oct 30
0
[LLVMdev] Preserving accurate stack traces with optimization?
Philip, Thanks for the clarification. As far as I can tell, there is currently no way to preserve a full and accurate stack trace while utilizing most of LLVM’s optimization abilities. The work on debug information may help you get the information you need, but I do not think we will provide information on stack frames that have been removed via inlining or tail call. Moreover, if at some point
2013 Oct 30
2
[LLVMdev] Preserving accurate stack traces with optimization?
Actually CCing Eric. On Wed, Oct 30, 2013 at 11:00 AM, Quentin Colombet <qcolombet at apple.com>wrote: > Philip, > > Thanks for the clarification. > > As far as I can tell, there is currently no way to preserve a full and > accurate stack trace while utilizing most of LLVM’s optimization abilities. > > The work on debug information may help you get the information
2020 Sep 01
2
Vector evolution?
On Tue, Sep 1, 2020 at 5:10 PM Florian Hahn <florian_hahn at apple.com> wrote: > The loop vectorizer does not really handle loops that already operate on vectors, so that is why the loop using v4f32 does not get widened. > > Arguably the user explicitly asked for 4xfloat vectors in the v4f32 version, so that is what gets generated. In my case I have tons of legacy code written for
2020 Sep 01
2
Vectorization of math function failed?
On Tue, Sep 1, 2020 at 9:07 AM Venkataramanan Kumar <venkataramanan.kumar.llvm at gmail.com> wrote: > Hi Alexandre, Hi Venkataramanan, > I am not sure if we can generate vector calls to GlibC libmvec. Is the support for libmvec on the roadmap? If not how to add it? > ./clang --autocomplete=-fveclib= This is amazing, thank you! I think it should be documented in clang auto
2020 Sep 01
3
Vectorization of math function failed?
Hi, > On Sep 1, 2020, at 10:26, Venkataramanan Kumar via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > Hi Alexandre, > > On Tue, 1 Sep, 2020, 2:21 pm Alexandre Bique, <bique.alexandre at gmail.com <mailto:bique.alexandre at gmail.com>> wrote: > On Tue, Sep 1, 2020 at 9:07 AM Venkataramanan Kumar > <venkataramanan.kumar.llvm at gmail.com
2020 Oct 28
2
Targeting old glibc
On Wed, Oct 28, 2020 at 6:07 PM Fangrui Song <maskray at google.com> wrote: > > On 2020-10-28, Alexandre Bique via llvm-dev wrote: > >Hi, > > > >I wonder what is the right way to target an old glibc? > > > >I have a machine which is up to date (glibc 2.32 and clang+lld 10.0.1). > > > >So far I've been able to target older glibc by having a
2020 Nov 11
2
Targeting old glibc
It did partially fix the issue but there is still one problem: llvm-objdump -sx gives: Version References: required from libpthread.so.0: 0x09691a75 0x00 05 GLIBC_2.2.5 0x09691972 0x00 09 GLIBC_2.3.2 0x09691973 0x00 07 GLIBC_2.3.3 0x06969192 0x00 12 GLIBC_2.12 required from libdl.so.2: 0x09691a75 0x00 21 GLIBC_2.2.5 required from libuuid.so.1: 0x09da27b0 0x00 19
2020 Sep 15
2
Vectorization of math function failed?
Hi Venkat., Did you make progress with libmvec? Is there a chance that it lands into clang 11? Regards, Alexandre Bique On Tue, Sep 1, 2020 at 11:50 AM Venkataramanan Kumar <venkataramanan.kumar.llvm at gmail.com> wrote: > > Hi Florian, > > On Tue, 1 Sep, 2020, 3:11 pm Florian Hahn, <florian_hahn at apple.com> wrote: >> >> Hi, >> >> On Sep 1,
2014 Sep 23
2
[LLVMdev] Please benchmark new x86 vector shuffle lowering, planning to make it the default very soon!
On Tue, Sep 23, 2014 at 2:35 PM, Simon Pilgrim <llvm-dev at redking.me.uk> wrote: > If you don’t want to spend time on this, I’d be happy to create a > candidate patch for review? I’ve been unclear if you were taking patches > for your shuffle work prior to it becoming the default. While I'm happy to work on it, I'm even more happy to have patches. =D -------------- next
2014 Sep 30
2
[LLVMdev] Please benchmark new x86 vector shuffle lowering, planning to make it the default very soon!
Wow. Somehow, I forgot about vbroadcast and vpbroadcast. =[ Sorry about that. I'll fix those. On Fri, Sep 26, 2014 at 3:39 AM, Andrea Di Biagio <andrea.dibiagio at gmail.com > wrote: > Hi Chandler, > > Here is another test. > > When looking at the AVX codegen, I noticed that, when using the new > shuffle lowering, we no longer emit a single vbroadcastss in the case
2020 Nov 11
2
Targeting old glibc
On Tue, Nov 10, 2020 at 7:01 PM Fāng-ruì Sòng <maskray at google.com> wrote: > > How to find what is pulling libmvec? > > If you build a -DCMAKE_BUILD_TYPE=Debug lld, you can set a breakpoint > on lld/ELF/MarkLive.cpp:114 (ss->getFile().isNeeded) and check which > symbol makes > libmvec.so needed. I'm afraid this is going to far for me :) > > On the other
2011 Mar 17
2
[LLVMdev] Long-Term ISel Design
Chris Lattner <clattner at apple.com> writes: >> 1. We have special target-specific operators for certain shuffles in X86, >> such as X86unpckl. > It also eliminates a lot of fragility. Before doing this, X86 > legalize would have to be very careful to specifically form shuffles > that it knew isel would turn into (e.g.) unpck operations. Now > instead of
2020 Nov 09
2
Targeting old glibc
No. A shared object is needed if it is linked in (1)--no-as-needed mode or (2) after --gc-sections, a symbol referenced by a live input section is defined by the shared object. You'll need to check whether a symbol is defined by libmvec.so.1 On Mon, Nov 9, 2020 at 9:57 AM Alexandre Bique <bique.alexandre at gmail.com> wrote: > > On Mon, Nov 9, 2020 at 6:52 PM Fāng-ruì Sòng