search for: loop

Displaying 20 results from an estimated 26576 matches for "loop".

2020 Mar 20
5
CFG manipulation and !llvm.loop metadata
An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200320/34cdec77/attachment.html> -------------- next part -------------- Hi all, I have encountered some issues with the preservation of the location of llvm.loop metadata (containing optimisation hints), and would appreciate some feedback on the issue. The IR language description states that llvm.loop metadata is attached to terminator of a loop latch block, and accordingly Loop::getLoopID() searches for it in all loop latches (and only successfully finds...
2013 Jan 31
0
[LLVMdev] [PATCH] parallel loop metadata
Dear all, Here's an updated version of the parallel loop metadata patch. It includes documentation for the new metadata types with a semantics description. -- Pekka -------------- next part -------------- A non-text attachment was scrubbed... Name: parallel-loop-metadata.patch Type: text/x-patch Size: 12972 bytes Desc: not available URL: <http://lis...
2013 Jan 30
3
[LLVMdev] [PATCH] parallel loop metadata
...this is what I >> _really_ >> want the vectorizer to assume" in such metadata. > > > I agree. Thus, let's start with the 'parallel' semantics first, not > the vague ones. > > A conclusion of some kind for me to update the patch: > > 1) Rename the loop branch metadata back to llvm.loop.parallel. > > I'll add a definition of its semantics (as comments to Loop::isParallel()): Hello Pekka, I think it would be better to add a section to the LangRef: http://llvm.org/docs/LangRef.html#metadata A good comment would be helpful, too, but Lang...
2019 May 28
6
Making loop guards part of canonical loop structure
Hi all, TL;DR: Should the loop guard branch be part of the canonical loop structure? Background: ----------- While working on the next set of improvements to loop fusion, we discovered that loop rotation will put a guard around a loop if it cannot prove the loop will execute at least once, as seen in the following (simplified)...
2015 Jul 15
5
[LLVMdev] Improving loop vectorizer support for loops with a volatile iteration variable
Hi all, I would like to propose an improvement of the “almost dead” block elimination in Transforms/Local.cpp so that it will preserve the canonical loop form for loops with a volatile iteration variable. *** Problem statement Nested loops in LCALS Subset B (https://codesign.llnl.gov/LCALS.php) are not vectorized with LLVM -O3 because the LLVM loop vectorizer fails the test whether the loop latch and exiting block of a loop is the same. The loops a...
2018 Aug 09
3
Legacy Loop Pass Manager question
Hi, If we add multiple loop passes to the pass manager in PassManagerBuilder.cpp consecutively without any func/module pass in between, I used to think they would belong to the same loop pass manager. But it does not seem to be the case. For example for this code snippet PM.add(createIndVarSimplifyPass()); // Canoni...
2011 Jan 24
2
crazy loop error.
Dear R-users, This is a loop which is part of a bigger script. I managed to isolate the error in this loop and simplified it to the bare minimum and made it self-contained. a<-c(2,3,4,5,5,5,6,6,6,7) for(n in 1:10) { print(paste("n: ",n)) z1<-a[n] #make a list container ldata<-list() t=1 while(z1==a[n]) {...
2016 Jun 23
3
[Proposal][RFC] Cache aware Loop Cost Analysis
On Thu, Jun 23, 2016 at 11:34 PM, Adam Nemet <anemet at apple.com> wrote: > > > >> Hi Vikram, >> >> Is the analysis result specific to a loop nest or to a loop nest together >> with a set of reference groups? >> > The result is specific to each loop in the loop nest and the calculations > are based on the references in the loop nest. > > > Sorry can you please rephrase/elaborate, I don’t understand what you &gt...
2019 May 30
2
Making loop guards part of canonical loop structure
On Hexagon, unguarded loops cannot be converted to hardware loops. If the loop's latch branch alone handles the iteration count, including the possibility of 0, then the loop cannot be converted to a hardware loop, because hardware loops must iterate at least once. If the entire loop is guarded against zero iteration c...
2011 Apr 30
3
[LLVMdev] LoopInfo are not able to identify some natural loops?
In C code, if a loop is not a natural loop, that means its loop body should at least have one label, right? In that case, some BB out of the loop can jump to the loop body, so the loop has more than on entry. Does LoopInfo guarantee to identify all natural loops? This property is very important for my pass. regards,...
2014 May 09
3
[LLVMdev] parallel loop metadata question
I propose that we change the first paragraph of http://llvm.org/docs/LangRef.html#llvm-mem-parallel-loop-access-metadata: --- For a loop to be parallel, in addition to using the llvm.loop metadata to mark the loop latch branch instruction, also all of the memory accessing instructions in the loop body need to be marked with the llvm.mem.parallel_loop_access metadata. If there is at least one memory a...
2015 Jan 12
8
[LLVMdev] RFC: Loop distribution/Partial vectorization
Hi, We'd like to propose new Loop Distribution pass. The main motivation is to allow partial vectorization of loops. One such example is the main loop of 456.hmmer in SpecINT_2006. The current version of the patch improves hmmer by 24% on ARM64 and 18% on X86. The goal of the pass is to distribute a loop that can't be vecto...
2014 May 23
2
[LLVMdev] parallel loop metadata question
OK, I updated the text to LangRef in r209507 after some editing. On 05/11/2014 12:36 PM, Pekka Jääskeläinen wrote: > Hi, > > This looks good to me except that the first sentence > could already include "that refer to the same loop" or > similar. > > I could imagine that e.g. loop invariant code motion, > if applied to a parallel loop could hoist code out of > inner loops to outer (parallel) loops. Then the outer > loop contains parallel_loop_access instructions referring to > the inner loop, making...
2015 Jan 17
3
[LLVMdev] loop multiversioning
Does LLVM have loop multiversioning ? it seems it does not with clang++ -O3 -mllvm -debug-pass=Arguments program.c -c bash-4.1$ clang++ -O3 -mllvm -debug-pass=Arguments fast_algorithms.c -c clang-3.6: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated Pass Arguments:...
2016 Jan 19
3
CFG SCCs vs Loops and loop breaking transformations
I ran across an interesting case and wanted to share it. I'm not proposing any particular changes, but the experience seemed interesting to discuss. First, a bit of background. An LLVM Loop models a specific type of cycle in the CFG. Not all cycles are Loops. Many of our optimization transforms are phrased over loops, which means that a non-loop cycle tends to be less well optimized. I had some initial IR that had a very complex, oddly written loop. After running this through m...
2013 Feb 07
4
[LLVMdev] Parallel Loop Metadata
On Feb 7, 2013, at 10:55 AM, Pekka Jääskeläinen <pekka.jaaskelainen at tut.fi> wrote: > Hi Nadav, > > On 02/07/2013 07:46 PM, Nadav Rotem wrote: >> Pekka suggested that we add two kind of metadata: llvm.loop.parallel >> (attached to each loop latch) and llvm.mem.parallel (attached to each memory >> instruction!). I think that the motivation for the first metadata is clear - >> it says that the loop is data-parallel. I can also see us adding additional >> metadata such as llvm.l...
2015 Oct 12
2
question about llvm partial unrolling/runtime unrolling
Hi, I am trying to do loop unrolling with loops that don't have constant loop counter. It is highly appreciated if anyone can help me on this. What I want to do is to turn loop (n) { <loop body> } into loop (n/4) { <loop body> <loop body> <loop body&gt...
2015 Mar 12
3
[LLVMdev] Question about shouldMergeGEPs in InstructionCombining
I think it would make sense for (1) and (2). I am not sure if (3) is feasible in instcombine. (I am not too familiar with LoopInfo) For the Octasic's Opus platform, I modified shouldMergeGEPs in our fork to: if (GEP.hasAllZeroIndices() && !Src.hasAllZeroIndices() && !Src.hasOneUse()) return false; return Src.hasAllConstantIndices(); // was return false; Following that change, I noticed...
2010 May 10
3
[LLVMdev] Separate loop condition and loop body
On Mon, May 10, 2010 at 12:32:06PM -0700, Trevor Harmon wrote: > On May 10, 2010, at 11:35 AM, Benoit Boissinot wrote: > > >To me it looks like any basic block from the loop body with a > >successor not in the loop body is a BB "building the condition" (an > >"exit" block). > > I assume you mean "any basic block from the loop header". No really, loop body. > > I don't think your rule will work. Consider this...
2015 Mar 12
2
[LLVMdev] Question about shouldMergeGEPs in InstructionCombining
...six, IIRC). So reducing the GEP depth is likely the right solution for InstCombine (which has the job of canonicalizing the IR). We should, however, pull these apart somewhere, and probably in some way that is address-mode aware. I'd recommend trying to split non-free (via the addressing-mode) loop-invariant parts of GEPs out of loops in CodeGenPrep. -Hal ----- Original Message ----- > From: "Mark Heffernan" <meheff at google.com> > To: "Francois Pichet" <pichet2000 at gmail.com> > Cc: "Hal Finkel" <hfinkel at anl.gov>, "LLVM De...