search for: unrollloop

Displaying 20 results from an estimated 40 matches for "unrollloop".

2008 May 14
2
[LLVMdev] where's UnrollLoop.h
I'm building llvm in MSVS 2008. LoopUnroll.cpp includes UnrollLoop.h line 23: #include "llvm/Transforms/Utils/UnrollLoop.h" but there's no UnrollLoop.h anywhere to be found. My svn tree is synced to TOT. What am I missing?
2008 May 09
0
[LLVMdev] [PATCH] Split LoopUnroll pass into mechanism and policy
Hi All, the attached patch performs the splitting in the proposed manner. before applying the patch, please execute svn cp lib/Transforms/Scalar/LoopUnroll.cpp lib/Transforms/Utils/UnrollLoop.cpp to make the patch apply and preserve proper history. Transforms/Utils/UnrollLoop.cpp contains the unrollLoop function, which is now used by the LoopUnroll pass. I've also moved the RemapInstruction and FoldBlockIntoPredecessor support functions there. Additionally, I've also moved th...
2008 May 07
8
[LLVMdev] [PATCH] Split LoopUnroll pass into mechanism and policy
Hello Matthijs, Separating mechanism from policy is a good thing for the LoopUnroll pass. Instead of moving the policy to a subclass though, I think it'd be better to move the mechanism, the unrollLoop function, out to be a standalone utility function, with the LoopInfo object passed in explicitly. FoldBlockIntoPredecessor would also be good to make into a standalone utility function, since it isn't specific to unrolling. This should still make it easy to write new unrolling passes with cust...
2008 May 09
3
[LLVMdev] [PATCH] Split LoopUnroll pass into mechanism and policy
Hello Matthijs, On May 9, 2008, at 3:47 AM, Matthijs Kooijman wrote: > Hi All, > > the attached patch performs the splitting in the proposed manner. > before applying the patch, please execute > svn cp lib/Transforms/Scalar/LoopUnroll.cpp lib/Transforms/Utils/ > UnrollLoop.cpp > to make the patch apply and preserve proper history. > > Transforms/Utils/UnrollLoop.cpp contains the unrollLoop function, > which is now > used by the LoopUnroll pass. I've also moved the RemapInstruction and > FoldBlockIntoPredecessor support functions there. > &g...
2012 Jun 05
2
[LLVMdev] How to unroll loops in opposite loop nest order
...erforms loop passes inside out, i.e. from nested loops to parent loops, thereby missing optimization opportunities in my case. I haven't found a way how to implement this on my own. I tried implementing a function pass, where I could process the loops outside in. Unfortunately I cannot use the UnrollLoop utility function in this case, which crashes, when called with a NULL LPPassManager object, despite opposite documentation. Is there any way how to process loops outside in still using the UnrollLoop function? Martin -------------- next part -------------- An HTML attachment was scrubbed... URL:...
2008 Aug 11
2
[LLVMdev] Applying different Optimizations for different Functions - Questions?
...nModule function I have written: bool ComplNewBBFuncs::runOnModule(Module &M) { Function *Main = M.getFunction("main"); if (Main == 0) { cerr << "!!! No Main Function" << std::endl; return false; } //Determine each Function LoopPass * UnrollLoops; FunctionPass *DeadStoreElim; LPPassManager *LPPM; Function *CurFunc1 = M.getFunction("NewFunction1"); Function &Current1 = (*CurFunc1); Function *CurFunc2 = M.getFunction("NewFunction2"); Function &Current2 = (*CurFunc2); cerr << "Dead Store...
2008 May 07
0
[LLVMdev] [PATCH] Split LoopUnroll pass into mechanism and policy
...low. This means that loop unrolling is not a matter of performance, but any loop that can't be mapped on the architecture must be unrolled to be able to work. So, I don't really need the added flexibility, though I agree that it is a good idea nonetheless. Splitting off the second part of unrollLoop (the actual unrolling, after deciding to unroll the loop) shouldn't be a problem. I am a bit concerned about the first part (before the decision), which finds out the trip count and trip multiple. Since both policy and mechanism need these values, that code must be shared somehow as well. I see...
2012 Jun 05
0
[LLVMdev] How to unroll loops in opposite loop nest order
...inside out, i.e. from nested loops to parent loops, > thereby missing optimization opportunities in my case. > > I haven't found a way how to implement this on my own. I tried implementing a function pass, where I could process the > loops outside in. Unfortunately I cannot use the UnrollLoop utility function in this case, which crashes, when called with a > NULL LPPassManager object, despite opposite documentation. > > Is there any way how to process loops outside in still using the UnrollLoop function? I noticed another case of referencing LPM without a null check and fix...
2008 May 09
0
[LLVMdev] [PATCH] Split LoopUnroll pass into mechanism and policy
...le of). I'll add that. > Eventually, it should be taught a few more operators than just Mul too, such > as Shl and And, but you don't need to worry about that now. Yeah, that would be useful. > And again >= instead of >. Willfix. > > --- include/llvm/Transforms/Utils/UnrollLoop.h (revision 0) > > +++ include/llvm/Transforms/Utils/UnrollLoop.h (revision 0) > > This file misses the comments that all LLVM headers have. Hmm, those slipped through :-) I'll add them. > +bool unrollLoop(Loop *L, unsigned Count, LoopInfo* LI); > > Please capitalize t...
2010 Jul 01
2
[LLVMdev] Fail to unroll loop on simple examples.
...July 1st) ~/Build/llvm-trunk/Release/bin/opt -mem2reg -indvars -loop-unroll -stats loop.ll | llvm-dis Whereas ScalarEvolution can compute the loop count, LoopInfo fails because the conditional branch is not in the expected block. If I provide the loop count with -unroll-count=5, then the function UnrollLoop fails form the same reason. The pass "-loopsimplify" has no effect. If I add the pass "-loop-rotate" before "-indvars", then the loop is successfully unrolled. However, I think this pass may increase the size of the code for all loops, including the loops that cannot...
2010 Jun 04
0
[LLVMdev] Speculative phi elimination at the top of a loop?
...m> wrote: >  Would the best way be to add an option to -loop-unroll, and hack away at lib/Transforms/Utils/LoopUnroll.cpp? Instead, the better alternative is to write another pass similar to LoopUnrollPass.cpp (say LoopPeelPass.cpp) and add new option -loop-peel. The new pass could use llvm::UnrollLoop() utility function. Feel free to adjust this utility function if required, but the core utility function should be used by both passes. - Devang
2014 Jan 15
3
[LLVMdev] Loop unrolling a function
...h didn't complain but had no effect on the function. Is adding LoopPasses to a FPM supposed to be a no-op? Is this supposed to work and I'm not running the right combination of passes to get loop unrolling? I also tried creating a LoopInfo object over my function with a FPM so I could call UnrollLoop() manually, but the LoopInfo didn't return any loops, perhaps because I'm missing some preliminary passes. The last option I considered was copying the function into it's own module, using a PassManager, and then copying the function back into the original module. I didn't try this...
2008 May 07
1
[LLVMdev] [PATCH] Split LoopUnroll pass into mechanism and policy
...rmance, but any > loop that > can't be mapped on the architecture must be unrolled to be able to > work. So, > I don't really need the added flexibility, though I agree that it is > a good > idea nonetheless. Ok. > > > > Splitting off the second part of unrollLoop (the actual unrolling, > after > deciding to unroll the loop) shouldn't be a problem. I am a bit > concerned > about the first part (before the decision), which finds out the trip > count and > trip multiple. Since both policy and mechanism need these values, > that...
2010 Jul 01
0
[LLVMdev] Fail to unroll loop on simple examples.
...~/Build/llvm-trunk/Release/bin/opt -mem2reg -indvars -loop-unroll -stats loop.ll | llvm-dis > > Whereas ScalarEvolution can compute the loop count, LoopInfo fails because the conditional branch is not in the expected block. If I provide the loop count with -unroll-count=5, then the function UnrollLoop fails form the same reason. The pass "-loopsimplify" has no effect. > > If I add the pass "-loop-rotate" before "-indvars", then the loop is successfully unrolled. However, I think this pass may increase the size of the code for all loops, including the loops th...
2012 Aug 06
0
[LLVMdev] How to call some transformation passes (LoopRotate and LoopUnroll) from my own pass
...uot;, you should look at the opt driver, opt.cpp to see how to do this. You can call addRequired<X> from your pass to force the PassManager to run X before your pass. If you want to do these transformations within a single pass, then the transformations need to be exposed as a utility. llvm::UnrollLoop() currently is, but LoopRotation is not. LoopRotation could be exposed as a utility (or you could copy the relevant code), but you should try not to do that. The llvm strategy is that loop rotation should do the right thing when it runs before your pass. If loop rotation needs more information to w...
2008 May 21
4
[LLVMdev] 2.3 Pre-release available for testing
...nto the release branch. I want to keep it somewhat in sync with mainline. >Can you try applying those 3 patches and let me know if it builds for you >and what version of MSVC you have? It doesn't build. first problem is patch 51098 that adds lib\VMCore\Use.cpp and lib\Transforms\Utils\UnrollLoop.cpp neither of which seem to exist in the release_23 branch another problem is patch 51237 which among other things renames lib\Transforms\Scalar\SimplifyCFG.cpp to lib\Transforms\Scalar\SimplifyCFGPass.cpp however the removal of lib\Transforms\Ipo\SimplifyLibCalls.cpp is necessary, so it won'...
2017 Feb 01
2
Strange opt error in Value ("replaceAllUses of value with new value of different type!" assertion failure)
...9365f7bd7 __assert_fail_base /build/glibc-t3gR2i/glibc-2.23/assert/assert.c:92:0 #8 0x00007fd9365f7c82 (/lib/x86_64-linux-gnu/libc.so.6+0x2dc82) #9 0x00007fd9397d3b4b llvm::Value::replaceAllUsesWith(llvm::Value*) /llvm/lib/IR/Value.cpp:383:0 #10 0x00007fd9372f7ba1 llvm::UnrollLoop(llvm::Loop*, unsigned int, unsigned int, bool, bool, bool, unsigned int, llvm::LoopInfo*, llvm::ScalarEvolution*, llvm::DominatorTree*, llvm::AssumptionCache*, bool) /llvm/lib/Transforms/Utils #11 0x00007fd937ec812d tryToUnrollLoop(llvm::Loop*, llvm::DominatorTree&, llvm::LoopInfo*,...
2014 Jan 15
2
[LLVMdev] Loop unrolling a function
...no > effect on the function. Is adding LoopPasses to a FPM supposed to be a > no-op? Is this supposed to work and I'm not running the right combination > of passes to get loop unrolling? > > I also tried creating a LoopInfo object over my function with a FPM so I > could call UnrollLoop() manually, but the LoopInfo didn't return any loops, > perhaps because I'm missing some preliminary passes. > > The last option I considered was copying the function into it's own > module, using a PassManager, and then copying the function back into the > original modul...
2012 Apr 09
3
[LLVMdev] How to instrument a this function using insertBefore instruction???
...================================================================================================******// #include "llvm/Pass.h" #include "llvm/Function.h" #include "llvm/Support/raw_ostream.h" #include "llvm/Instruction.h" #include "llvm/Transforms/Utils/UnrollLoop.h" #include "llvm/BasicBlock.h" #include "llvm/ADT/Statistic.h" #include "llvm/Analysis/LoopIterator.h" #include "llvm/Analysis/LoopPass.h" #include "llvm/Analysis/ScalarEvolution.h" #include "llvm/Analysis/ScalarEvolutionExpander.h"...
2010 Jun 04
5
[LLVMdev] Speculative phi elimination at the top of a loop?
I am working on heavily optimising unusually static C++ code, and have encountered a situation where I basically want an optimiser that would speculatively unroll a loop to see if the first round of the loop could be optimised further. (I happen to know that it is possible.) The previous optimisations that produce the loop in the first place already do a magical job (relying heavily on constant