similar to: [LLVMdev] Alternative of Loop::getTripCount?

Displaying 20 results from an estimated 3000 matches similar to: "[LLVMdev] Alternative of Loop::getTripCount?"

2012 Jul 03
0
[LLVMdev] Alternative of Loop::getTripCount?
Hi Taemin, On 03/07/2012 01:53, Taemin Kim wrote: > I found out that Loop::getTripCount method is obsolete in LLVM 3.1 > Is there an alternative? I use getSmallConstantTripCount() to get loop trip counts using the ScalarEvolution analysis pass. See include/llvm/Analysis/ScalarEvolution.h for a detailed explanation. Ivan > > > _______________________________________________
2009 Mar 08
1
[LLVMdev] getTripCount()
Hello, I'm writing a new function pass, and I'm having trouble with getTripCount() in Loop. If I generate the bitcode for the test code with no optimization then getTripCount() returns NULL, but if I pass - O3 to the front-end then getTripCount() returns fine. My phase calls addRequiredID(LoopSimplifyID) from getAnalysisUsage() and I also tried putting -mem2reg at the front
2010 May 07
2
[LLVMdev] getTripCount requires which optimization passes?
Hi, For me, getTripCount always returns null, even for trivial loops such as: void simple(int j) { for (int i = 0; i < 10; i++) { j++; } } Looking through the mailing list archive, it appears that getTripCount requires certain optimization passes to run first, but it's not clear which ones. There doesn't seem to be any documentation on this. Does anybody
2008 Sep 30
1
[LLVMdev] LoopInfo getTripCount modification proposal
Hi, I am trying to modify a loop by reducing the loop trip count from N to N-1 where N may be constant. I looked into using getTripCount[1] but discovered that this method returns a Value* which is N itself. This prevents me from using this method for changing the loop. I suggest creating another method for returning the 'cmp' instruction. The new getTripCount implementation will use the
2010 May 07
0
[LLVMdev] getTripCount requires which optimization passes?
hi, On Fri, May 7, 2010 at 8:59 AM, Trevor Harmon <Trevor.W.Harmon at nasa.gov>wrote: > Hi, > > For me, getTripCount always returns null, even for trivial loops such > as: > > void simple(int j) { > for (int i = 0; i < 10; i++) { > j++; > } > } > > Looking through the mailing list archive, it appears that getTripCount > requires
2010 Apr 06
2
[LLVMdev] Get the loop trip count variable
Thanks a lot for your guys' help!!! I guess once I am able to get *V* (which probably is a pointer to a Value object), then, I can instrument some code at the IR level to dump V. As long as I maintain V at this pass stage, I should be able to dump the loop trip count. This is true, isn't it? Basically, what I am going to do is to add a function call before the loop body, such as:
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
2008 May 07
1
[LLVMdev] [PATCH] Split LoopUnroll pass into mechanism and policy
On May 7, 2008, at 1:08 AM, Matthijs Kooijman wrote: > Hi Dan, > >> This should still make it easy to write new unrolling passes with >> custom heuristics, but it would also be more flexible for passes to >> do unrolling in combination with other transformations. > Agreed. > > To shed some light on my specific requirements, I am working with an > architecture
2009 Mar 20
1
[LLVMdev] getTripCount and pointers
Hello, I'm having some trouble with getTripCount() ... again. In particular it fails in the first of the following two examples, although it works for the second. By fails, I mean it returns NULL. ---------- example 1 ---------- test1(int *a, const int *ip) { int k; for (k = 0; k < ip[2]; ++k) { a[k] = (k+11)/(k+2); } } ---------- example 2 ---------- test2(int
2010 May 07
2
[LLVMdev] getTripCount requires which optimization passes?
On May 6, 2010, at 6:32 PM, ether zhhb wrote: > As the comment said: > /// The IndVarSimplify pass transforms loops to have a form that > this > /// function easily understands. > > you could try -indvars. After adding -indvars to the opt command, getTripCount still returns null. I suppose it's possible, depending on the scheduling of the pass manager, that
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
2008 May 07
0
[LLVMdev] [PATCH] Split LoopUnroll pass into mechanism and policy
Hi Dan, > This should still make it easy to write new unrolling passes with > custom heuristics, but it would also be more flexible for passes to > do unrolling in combination with other transformations. Agreed. To shed some light on my specific requirements, I am working with an architecture that has only limited support for loops and control flow. This means that loop unrolling is not
2012 May 21
1
[LLVMdev] No getSmallConstantTripCount function in current LLVM version
Hi, I cannot find the getSmallConstantTripCount function in the current LLVM. Can anyone tell me whether there is still such a function to get the trip count in LLVM? Thank you very much. Best, Han
2011 Sep 22
2
[LLVMdev] Getting number of "unnamed temporory"
Hello, I am trying to print out output name of "unnamed temporary". For instance, for %3 = add i32 %21, i32 %index.01, I would like to print out %3. Can anybody please let me know how I can get it? Thank you -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110921/56a6991a/attachment.html>
2010 Apr 06
0
[LLVMdev] Get the loop trip count variable
Sorry, I could not the the loop trip count with getTripCount(). I used a simple program as a test case: ------------------------------------------------------ #include <stdio.h> int getV(int i) { return i * 2; } int main() { int num = 10; int sum=0; int i; for (i=0; i<num; i++) { sum += getV(i); } return 0;
2008 Dec 09
1
[LLVMdev] scalar-evolution + indvars fail to get the loop trip count?
Hi, Seems pass scalar-evolution+indvars fail to get the loop trip count of the following case: int foo(int x, int y, int lam[256], int alp[256]) { int i; int z = y; for (i = 255; i >= 0; i--) { z += x; lam[i] = alp[i]; } return z; } The final optimized ll code is : define i32 @foo(i32 %x, i32 %y, i32* %lam, i32* %alp) nounwind { entry: br label %bb bb:
2008 Apr 26
2
[LLVMdev] Getting the trip count of a loop
Hi, I am trying to add a new loop pass in which I making a call to get the trip count of the loop using Value *TripCountValue = L->getTripCount() However I am always getting NULL for TripCountValue (confirmed through gdb). I am running this pass after the canonicalization of induction variables: opt --debug-pass=Structure -stats -indvars -loop-rotate -my-loop-pass < main.bc >
2010 May 10
0
[LLVMdev] getTripCount requires which optimization passes?
On May 7, 2010, at 11:17 AM, Trevor Harmon wrote: > On May 6, 2010, at 6:32 PM, ether zhhb wrote: > >> As the comment said: >> /// The IndVarSimplify pass transforms loops to have a form that >> this >> /// function easily understands. >> >> you could try -indvars. > > After adding -indvars to the opt command, getTripCount still returns
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
2010 Oct 13
1
[LLVMdev] Compile or link error
Hello, I am generating profile_rt.dll by perfoming 'make' in $LLVM_SRC_DIR/runtime/libprofile. After make, I got the following error messages. llvm[0]: Linking Debug+Asserts Loadable Module profile_rt.dll /usr/lib/gcc/i686-pc-cygwin/4.3.4/../../../../i686-pc-cygwin/bin/ld:/cygdrive/c/ llvm/runtime/libprofile/Debug+Asserts/exported_symbols.lst: file format not reco gnized; treating as