search for: ivdep

Displaying 20 results from an estimated 69 matches for "ivdep".

2019 Aug 15
4
[LLVM] (RFC) Addition/Support of new Vectorization Pragmas in LLVM
The ivdep pragma is designed to do exactly what the name states - ignore vector dependencies.  Cray Research first implemented this in 1978 in their CFT compiler, and has supported it since. This pragma is typically used by application developers who want vectorized code when the compiler cannot automatical...
2013 May 23
3
[LLVMdev] LLVM Loop Vectorizer puzzle
...vm.loop.parallel anymore since the vectorizer could just look to see if the loop id on a parallel_loop_access matches the loop id of the loop being vectorized. > > Does this make any sense? > Yes. It makes sense to me. >> >> If we decide, that >> >> #pragma ivdep >> >> should imply forced vectorization (which I am not sure it should), the front-end can than in addition to the llvm.loop.parallel metadata, emit meta data to force vectorization. But, I don’t think we should overload the semantics of llvm.loop.parallel. > > ivdep doesn't...
2013 May 23
0
[LLVMdev] LLVM Loop Vectorizer puzzle
...op.parallel anymore since the > vectorizer could just look to see if the loop id on a parallel_loop_access > matches the loop id of the loop being vectorized. > > Does this make any sense? > > > > Yes. It makes sense to me. > > > If we decide, that > > #pragma ivdep > > should imply forced vectorization (which I am not sure it should), the > front-end can than in addition to the llvm.loop.parallel metadata, emit > meta data to force vectorization. But, I don’t think we should overload the > semantics of llvm.loop.parallel. > > > ivdep d...
2013 Mar 03
2
[LLVMdev] parallel loop metadata simplification
On 03/03/2013 02:34 PM, Tobias Grosser wrote: > Meaning they are due to an array or pointer access. What about loop-scope arrays? void foo(long *A, long b) { long i; #pragma ivdep for (i = 0; i < 100; i++) { long t[100]; t[0] = i + 2; A[i] = A[i+b] + t[0]; } } Clang places the alloca for t to the entry block, creating a new race condition. In your example where you moved t outside the loop it's a programmer's mistake (icc mig...
2013 Mar 03
0
[LLVMdev] parallel loop metadata simplification
On 03/03/2013 03:34 PM, Pekka Jääskeläinen wrote: > On 03/03/2013 02:34 PM, Tobias Grosser wrote: >> Meaning they are due to an array or pointer access. > > What about loop-scope arrays? > > void foo(long *A, long b) { > long i; > > #pragma ivdep > for (i = 0; i < 100; i++) { > long t[100]; > t[0] = i + 2; > A[i] = A[i+b] + t[0]; > } > } > > Clang places the alloca for t to the entry block, creating > a new race condition. Very good example, indeed. Is there a formal defini...
2013 Mar 03
2
[LLVMdev] parallel loop metadata simplification
On 03/03/2013 06:43 PM, Tobias Grosser wrote: > Very good example, indeed. Is there a formal definition of what > #pragma ivdeps means? I see two options here: In the previous discussion we could not find a proper definition for #pragma ivdep so we concluded we can treat it as a statement of "treat the loop as parallel, I do not expect any dependency checking by the compiler", thus what the llvm.loop.parallel is...
2013 May 23
2
[LLVMdev] LLVM Loop Vectorizer puzzle
On May 23, 2013, at 10:37 AM, Cameron McInally <cameron.mcinally at nyu.edu> wrote: > In all fairness, I do not believe that ivdep is an ICC-specific pragma. There are many compilers that support ivdep and lots of legacy (and modern) codes that benefit from it. Seems silly, to me at least, to reinvent the wheel. Hi Cameron, The history of the idvep pragma is fascinating. I did not know that it predated ANSI. People who car...
2019 Aug 09
3
[LLVM] (RFC) Addition/Support of new Vectorization Pragmas in LLVM
> There is a fundamental problem with the way that ivdep is defined by Intel's current documentation, at least for C/C++. As you note in your Google doc, it essentially says that the optimizer may ignore loop-carried dependencies except for those dependencies it can definitely prove are present. These are not semantics that any other compiler can act...
2013 Mar 03
0
[LLVMdev] parallel loop metadata simplification
....es> > Cc: llvmdev at cs.uiuc.edu > Sent: Sunday, March 3, 2013 11:49:03 AM > Subject: Re: [LLVMdev] parallel loop metadata simplification > > On 03/03/2013 06:43 PM, Tobias Grosser wrote: > > Very good example, indeed. Is there a formal definition of what > > #pragma ivdeps means? I see two options here: > > In the previous discussion we could not find a proper > definition for #pragma ivdep so we concluded we can treat it > as a statement of "treat the loop as parallel, I do not expect > any dependency checking by the compiler", thus what t...
2019 Aug 08
3
[LLVM] (RFC) Addition/Support of new Vectorization Pragmas in LLVM
...list of questions that you'd like answered. In the future, please put the questions directly in the email. For one thing, more people will read your email than will open your Google doc. Second, having the questions in the email should allow a better threading structure to the replies. * Ivdep: Is clang loop vectorize(assume_safety) equivalent to ivdep? To what extent do the semantics of ivdep need to be modified for Clang to create an equally “useful pragma”? To what extent would it be helpful to have this pragma in Clang? There is a fundamental problem with the way that ivdep is def...
2013 Jan 28
5
[LLVMdev] [PATCH] parallel loop awareness to the LoopVectorizer
...t you follow the review of > Tobias and Renato and provide a separate patch for the > min-iter-count and a few test cases. > > I think that it would be a good idea to start a new thread and to > discuss the best way to annotate loops in LLVM. Is this sufficient to implement #pragma ivdep in clang? -Hal > > Thanks, > Nadav > > On Jan 28, 2013, at 5:49 AM, Pekka Jääskeläinen > <pekka.jaaskelainen at tut.fi> wrote: > > > Hi Renato, > > > > On 01/28/2013 03:22 PM, Renato Golin wrote: > >> This seems an awfully specific check...
2013 Mar 02
4
[LLVMdev] parallel loop metadata simplification
...ng codegen. Currently it adds the metadata to all loads and stores but I don't think this is a problem and can be refined later if necessary. Great that you found a good solution. I have one example, which we may want to have a look into: Given the following input (test.c): #pragma ivdep for (long i = 0; i < 100; i++) { long t = i + 2; A[i] = t; } clang creates the following IR for the loop body: %1 = load i64* %i, align 8 %add = add nsw i64 %1, 2 store i64 %add, i64* %t, align 8 %2 = load i64* %t, align 8 %3 = load i64* %i, align 8 %4 = load i64** %A.a...
2019 Aug 08
4
[LLVM] (RFC) Addition/Support of new Vectorization Pragmas in LLVM
Hello all, We are students from Indian Institute of Technology(IIT), Hyderabad, we would like to propose the addition of the following pragmas in LLVM that aide in (or possibly increase the scope of) vectorization in LLVM (in comparison with other compilers). 1. ivdep 2. Nontemporal 3. [no]vecremainder 4. [no]mask_readwrite 5. [un]aligned Could you please check the following Google document for the semantic description of these pragmas: https://docs.google.com/document/d/1YjGnyzWFKJvqbpCsZicCUczzU8HlLHkmG9MssUw-R1A/edit?usp=sharing...
2013 May 23
4
[LLVMdev] LLVM Loop Vectorizer puzzle
...4:52, Arnold Schwaighofer <aschwaighofer at apple.com> wrote: > I would like us to grow a few annotations, among others, one to force vectorization irrespective whether the loop vectorizer thinks it is beneficial or not - however, this is future music. > > Isn't that part of the ivdep implementation? I thought there was support for that already... No, llvm.loop.parallel only communicates information about memory dependencies (or there absence of) and the loop vectorizer only uses it for this. I don’t think we should give it additional semantics of forcing vectorization. Of cou...
2013 Jan 28
0
[LLVMdev] [PATCH] parallel loop awareness to the LoopVectorizer
On 01/28/2013 06:51 PM, Hal Finkel wrote: > Is this sufficient to implement #pragma ivdep in clang? I'm not completely sure of this: "Note: The proven dependencies that prevent vectorization are not ignored, only assumed dependencies are ignored." http://software.intel.com/sites/products/documentation/studio/composer/en-us/2011Update/compiler_c/cref_cls/common/cppref_pr...
2020 May 18
2
LLVM's loop unroller & llvm.loop.parallel_accesses
...the loop is parallel and can be vectorized, > but A[0] from iteration 0 will alias with A[0] from iteration 1. > Replace `0` by `i*c` where c is a variable that can be 0 at runtime to > make the fact non-obvious to the compiler. > > We had discussions about implementing "#pragma ivdep", but it's > semantics are not defined independently of the implementation. Anyway, > even with #pragma omp ivdep, a compiler is not required to vectorize > the loop. > > In LLVM, runtime/partial unrolling only takes place after > vectorization, so there is less of an iss...
2019 Aug 13
2
[LLVM] (RFC) Addition/Support of new Vectorization Pragmas in LLVM
...list of questions that you'd like answered. In the future, please put the questions directly in the email. For one thing, more people will read your email than will open your Google doc. Second, having the questions in the email should allow a better threading structure to the replies. * Ivdep: Is clang loop vectorize(assume_safety) equivalent to ivdep? To what extent do the semantics of ivdep need to be modified for Clang to create an equally “useful pragma”? To what extent would it be helpful to have this pragma in Clang? There is a fundamental problem with the way that ivdep is def...
2013 Jan 28
0
[LLVMdev] parallel loop awareness to the LoopVectorizer
About these disclaimers associated with ivdep and such... You guys are overthinking it. They're just saying you cannot force the compiler to vectorize or parallelize a loop that it knows (can prove!) is not a parallel loop. They are not obliging the compiler to do dependence analysis or alias analysis or anything. For example len = 0; wh...
2013 May 23
0
[LLVMdev] LLVM Loop Vectorizer puzzle
...Schwaighofer <aschwaighofer at apple.com> wrote: >> I would like us to grow a few annotations, among others, one to force vectorization irrespective whether the loop vectorizer thinks it is beneficial or not - however, this is future music. >> >> Isn't that part of the ivdep implementation? I thought there was support for that already... > > No, llvm.loop.parallel only communicates information about memory dependencies (or there absence of) and the loop vectorizer only uses it for this. I don’t think we should give it additional semantics of forcing vectorizatio...
2020 May 14
3
LLVM's loop unroller & llvm.loop.parallel_accesses
...n't llvm's vectorizer using loop.parallel_accesses to vectorize loops including vectorize memory accesses that if you ignore loop-carried dependencies, usually means effectively re-ordering the accesses? I guess this still does not imply "noalias"? What about icc/gcc's #pragma ivdep? Again here, it means no loop-carried dependencies, yet still doesn't say anything about noalias? Another way indeed would be to propagate noalias data and indeed rely on the future fix that Hal mentions above. On Thu, May 14, 2020 at 1:33 PM Michael Kruse <llvmdev at meinersbur.de> wr...