search for: loopsimplify

Displaying 20 results from an estimated 159 matches for "loopsimplify".

2014 Jan 22
3
[LLVMdev] Why should we have the LoopPass and LoopPassManager? Can we get rid of this complexity?
...Wed, Jan 22, 2014 at 12:33 AM, Andrew Trick <atrick at apple.com> wrote: > >> > There appear to be two chunks of "functionality" provided by loop >> passes: >> > >> > 1) A worklist of loops to process. This is very rarely used: >> > 1.1) LoopSimplify and LoopUnswitch add loops to the queue. >> >> I’m making this up without much thought, but we may benefit from >> iterative loop transforms like Rotate -> LICM -> Unswitch -> Rotate -> >> LICM. We might need to come up with a preferred alternative: we can either...
2014 Jan 22
2
[LLVMdev] Why should we have the LoopPass and LoopPassManager? Can we get rid of this complexity?
On Wed, Jan 22, 2014 at 12:33 AM, Andrew Trick <atrick at apple.com> wrote: > > There appear to be two chunks of "functionality" provided by loop passes: > > > > 1) A worklist of loops to process. This is very rarely used: > > 1.1) LoopSimplify and LoopUnswitch add loops to the queue. > > I’m making this up without much thought, but we may benefit from iterative > loop transforms like Rotate -> LICM -> Unswitch -> Rotate -> LICM. We might > need to come up with a preferred alternative: we can either continue to &gt...
2017 Jun 30
2
LoopSimplify pass prevents loop unrolling
...> > I was looking at this code which keeps track of loop headers but is > checking if the destination of branch is a loop header sufficient? > This prevents merging empty preheaders into the loop headers as well. > There isn't really any reason to collapse preheaders anyway; LoopSimplify will recreate them, and they don't really block other optimizations as far as I know. > Is that reasonable approach or do we need to skip only if the original > unconditional branch was a backedge and folding this branch might > result in additional backedges? I made a quick hack t...
2017 Jun 30
0
LoopSimplify pass prevents loop unrolling
I will try to reduce a test case for the regression I found and will update. Thanks, Balaram From: Friedman, Eli [mailto:efriedma at codeaurora.org] Sent: Friday, June 30, 2017 2:54 PM To: Balaram Makam <bmakam at codeaurora.org>; llvm-dev at lists.llvm.org Subject: Re: [llvm-dev] LoopSimplify pass prevents loop unrolling On 6/30/2017 11:38 AM, Balaram Makam wrote: Thanks Eli, I was looking at this code which keeps track of loop headers but is checking if the destination of branch is a loop header sufficient? This prevents merging empty preheaders into the loop headers as well....
2010 Mar 16
1
[LLVMdev] LoopSimplify : why to separate a loop with multiple backedges into a nested loop ?
Hello, LoopSimplify try to separate a loop with multiple backedges into a nested loop (an outer loop and an inner loop). Naturally, this kind of a loop corresponds to a single loop in source code. I can see this could be useful for cases described in the comments in lib/Transforms/Utils/LoopSimplify.cpp, which looks...
2017 Jun 30
2
LoopSimplify pass prevents loop unrolling
...Makam via llvm-dev wrote: > > Edit. Predecessor -> successor. > > *From:* llvm-dev [mailto:llvm-dev-bounces at lists.llvm.org] *On Behalf > Of *Balaram Makam via llvm-dev > *Sent:* Friday, June 30, 2017 10:47 AM > *To:* llvm-dev at lists.llvm.org > *Subject:* [llvm-dev] LoopSimplify pass prevents loop unrolling > > Hi All, > > In the attached test case there, is an unnested loop with 2 > iterations. The loop latch block is terminated by an unconditional > branch, so simplifycfg folds the almost empty latch block into its > *successor* which is the loop...
2009 May 11
0
[LLVMdev] Pass Manager hangs with CallGraph and LoopSimplify
...something OTHER than GCC 4.1.2 . ----- Original Message ---- > From: Nick Johnson <npjohnso at cs.princeton.edu> > To: LLVM Developers Mailing List <llvmdev at cs.uiuc.edu> > Sent: Monday, May 11, 2009 3:01:12 PM > Subject: [LLVMdev] Pass Manager hangs with CallGraph and LoopSimplify > > Hello, > > I have discovered a situation in which the pass manager will infinite > loop. The minimal test case is below this message. The required > structure of these passes is; > > Before requires CallGraph > After requires LoopSimplify and Before > > I...
2009 May 11
2
[LLVMdev] Pass Manager hangs with CallGraph and LoopSimplify
Hello, I have discovered a situation in which the pass manager will infinite loop. The minimal test case is below this message. The required structure of these passes is; Before requires CallGraph After requires LoopSimplify and Before I can observe this through opt: opt -load ./libBug.so -after input.bc -o output.bc I built my copy of llvm from svn revision 68820 using gcc 4.1.2 Any suggestions? -- Nick Johnson #include "llvm/Pass.h" #include "llvm/Transforms/Scalar.h" #include "llvm/...
2017 Jun 30
2
LoopSimplify pass prevents loop unrolling
...o when LoopRotate pass is called it canonicalizes the loop into a nested loop. However, now the loop trip count is unpredictable as the BackedgeTakenCount for the outer loop is not loop invariant. As a result the loop cannot be unrolled. Is this the intended canonicalization for this loop or is the loopsimplify canonicalizing incorrectly? Should simplifycfg skip folding the latch block into the loop header if this results in additional backedges and let the empty blocks be folded during CGP? More details in https://bugs.llvm.org/show_bug.cgi?id=33605. FWIW, this prevents unrolling of a hot loop in spe...
2006 Mar 22
2
[LLVMdev] Circular dependencies
Okay, the problem with this cycle is LoopSimplify. It is using AliasAnalysis which is where that _ZN4llvm11BasicAAStubEv symbol is coming from. It seems to me that LoopSimplify.cpp is in the wrong place. This file defines the LoopSimplify FunctionPass which doesn't seem to me to be a "transform util". I thought the purpose of &quot...
2017 Apr 14
2
Separate LoopVectorize LLVM pass
...efore my new LoopVectorize to help it (I think the most important one is -loop-simplify, which canonicalizes the loop): opt -debug -loop-simplify -mem2reg -lcssa -load NewLoopVectorize.so -my-loop-vectorize test.c However, I do not see any line in the output of opt starting with "LoopSimplify" (when I have success, when I give opt -O3, I get "LoopSimplify: Creating pre-header for.body.preheader; LoopSimplify: Creating dedicated exit block for.end.loopexit" before LoopVectorize) and my LoopVectorize still does not vectorize the loop. Can anybody help me run explic...
2013 May 15
2
[LLVMdev] [polly] Polly Loop info and LoopSimplify functionality
...body6: ; preds = %polly.loop_body ... <some code> br label %polly.loop_header The question is - is the polly.loop_after BB supposed to be a part of the loop or not? ...and where it should be properly placed. The problem starts when one of the later passes calls LoopSimplify() and the first thing it does, it performs the following (lib/Transforms/Utils/LoopSimplify.cpp): // Check to see that no blocks (other than the header) in this loop have // predecessors that are not in the loop. This is not valid for natural // loops, but can occur if the blocks are unreac...
2014 Feb 01
8
[LLVMdev] [RFC] LCSSA vs. SSAUpdater ... FIGHT!
...really about doing away with it at all.) In discussions, Andy had expressed a desire to move entirely away from LCSSA and Nick had expressed a desire to do the opposite, so I'd like to start a proper discusison of what people think and why. I've worked a lot of preserving both LCSSA and LoopSimplify form in all of our loop passes recently thanks to yanking off the bandaid we've been relying on for the past N years of letting the LoopPassManager simply re-create these at all loop nest levels on the fly as necessary. During the course of that I'm starting to form an opinion on the subjec...
2005 Apr 29
2
[LLVMdev] about AnalysisUsage
Just noticed that quite a few passes like LoopSimplify are implemented in a single .cpp file ... this makes it impossible to specify LoopSimplify using the "addRequired" method. Was there any particular reason to do it this way? I wouldn't mind doing the splitting myself, though I am not using the CVS versions right now. Also, it would b...
2005 Apr 29
1
[LLVMdev] inserting blocks into a Function
...a new block, moving the predecessors in Preds to the new block and leaving > the rest to the old block. The loop-simplify pass uses this to do > preheader insertion and other fun stuff. Great! SplitBlockPredecessors is exactly the function that I was thinking of ... hadn't noticed the LoopSimplify pass before ... although the pass I am working on is different, I can leave the preheader insertion to LoopSimplify and forget about it. I was wondering, the above function seems general enough to be available as a utility function by itself ... but since I am not a compiler guy myself, dunno if a...
2006 Mar 22
0
[LLVMdev] Circular dependencies
...t libTransformUtils to depend on nothing in libTransforms or libAnalysis? If so, its going to take some significant code rearrangement. Perhaps a lib/Analysis/Utils is in order? Please advise. Reid. On Wed, 2006-03-22 at 08:13 -0800, Reid Spencer wrote: > Okay, the problem with this cycle is LoopSimplify. It is using > AliasAnalysis which is where that _ZN4llvm11BasicAAStubEv symbol is > coming from. It seems to me that LoopSimplify.cpp is in the wrong > place. This file defines the LoopSimplify FunctionPass which doesn't > seem to me to be a "transform util". I thought...
2013 May 16
0
[LLVMdev] [polly] Polly Loop info and LoopSimplify functionality
On 05/15/2013 07:08 PM, Sergei Larin wrote: > > Tobias, [..] > > ...or as always I might be missing a big picture here, and I appreciate if > you can explain the original intent. Hi Sergei, thanks for reporting this issue in so much detail. I am afraid there is no bigger story. For some reason the update of the LoopInfo was not included in the original patch of the code
2012 Apr 12
0
[LLVMdev] Function Pass Manager
...truct MyPass : public FunctionPass { static char ID; // Pass identification, replacement for typeid MyPass() : FunctionPass(ID) { initializeMyPassPass(*PassRegistry::getPassRegistry()); } virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequiredID(LoopSimplifyID); AU.addPreservedID(LoopSimplifyID); } virtual bool runOnFunction(Function &F); }; } char MyPass::ID = 0; INITIALIZE_PASS_BEGIN(MyPass, "mypass", "mypass", false, false) INITIALIZE_PASS_DEPENDENCY(LoopSimplify) INITIALIZE_PASS_END(MyPa...
2012 Feb 28
0
[LLVMdev] Exit Block Transformation in LoopSimplify
I am reading the code for exit block transformation in loop simplify. I do not fully understand how exit blocks with out-of-loop dominators are transformed. In SplitLandingPadPredecessors, all the in-the-loop predecessors of the exits block are grouped and given to the .loopexit basic block and the out-of-loop predecessors are grouped and given to the .nonloopexit basic block. the .loopexit
2012 Mar 23
3
[LLVMdev] Function Pass Manager
...9;m writing a function pass which is dynamically loaded by opt and I need some analysis and passes to be run before my pass: virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequired<LoopInfo>(); AU.addPreserved<LoopInfo>(); AU.addRequiredID(LoopSimplifyID); AU.addPreservedID(LoopSimplifyID); AU.addRequiredID(LCSSAID); AU.addPreservedID(LCSSAID); AU.addRequired<ScalarEvolution>(); AU.addPreserved<ScalarEvolution>(); } When I run it with opt -load, I'm getting the following error: Unable to s...