similar to: [LLVMdev] Get the loop trip count variable

Displaying 20 results from an estimated 1500 matches similar to: "[LLVMdev] Get the loop trip count variable"

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;
2010 Apr 05
3
[LLVMdev] Get the loop trip count variable
Hello, I am wondering whether I can get the variable name of loop trip count in LLVM? For example, int NUM; NUM=atoi(argv[i]); for (int i=0; i<NUM; i++) { ... } How can I get the corresponding variable name for "NUM"? Then, I can instrument something in the source code to record the loop trip count for a given input data set. BasicBlock* b = L->getHeader(); returns the
2010 Apr 06
1
[LLVMdev] Get the loop trip count variable
Hi Eli, Could you tell me how to extract the variable name? The reason I want to do it at the IR level is because I have more information at this stage, such as, constant propagation and back edges. Cheers, Zheng On 5 April 2010 21:51, Eli Friedman <eli.friedman at gmail.com> wrote: > On Mon, Apr 5, 2010 at 1:19 PM, Zheng Wang <jason.wangz at gmail.com> wrote: >> Hello,
2010 Apr 05
0
[LLVMdev] Get the loop trip count variable
On Mon, Apr 5, 2010 at 1:19 PM, Zheng Wang <jason.wangz at gmail.com> wrote: > Hello, > > I am wondering whether I can get the variable name of loop trip count in LLVM? > > For example, > > int NUM; > > NUM=atoi(argv[i]); > > for (int i=0; i<NUM; i++) > { >    ... > } > > How can I get the corresponding variable name for "NUM"?
2010 Apr 07
2
[LLVMdev] Get the loop trip count variable
Hi, On 04/05/2010 10:51 PM, Eli Friedman wrote: > On Mon, Apr 5, 2010 at 1:19 PM, Zheng Wang<jason.wangz at gmail.com> wrote: >> Hello, >> >> I am wondering whether I can get the variable name of loop trip count in LLVM? >> >> For example, >> >> int NUM; >> >> NUM=atoi(argv[i]); >> >> for (int i=0; i<NUM; i++) >>
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 >
2008 Apr 26
0
[LLVMdev] Getting the trip count of a loop
Prakash Prabhu wrote: > 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() That should work. Could you file a bug and attach the bytecode after 'opt -indvars -loop-rotate'? I would need that to determine why LoopInfo::getTripCount isn't returning any value. Nick
2007 May 29
0
Fw: [RFC] makedumpfile: xen extraction
Hi, I sent the following e-mail to kexec-mailing list (kexec@lists.infradead.org) since subjects of makedumpfile are discussed on the mailing list. I want to inform this to xen developers since I think this function is useful for xen developers. Thanks. Itsuro Oda (see https://sourceforge.net/projects/makedumpfile/ about makedumpfile command.) Forwarded by Itsuro ODA
2010 Apr 08
1
[LLVMdev] Declaring constant global variables
Can I do this in my own pass module? Because the string is actually depended on the type of a value object. On 8 April 2010 20:29, Eli Friedman <eli.friedman at gmail.com> wrote: > On Thu, Apr 8, 2010 at 12:18 PM, Zheng Wang <jason.wangz at gmail.com> wrote: >> Hiya, >> >> I want to declare a constant global variable as: >> >> @.str = private constant
2010 Apr 08
2
[LLVMdev] Declaring constant global variables
Hiya, I want to declare a constant global variable as: @.str = private constant [4 x i8] c"%f\0A\00", align 1 ; <[4 x i8]*> [#uses=1] I guess I should firstly declare an arrayType object, then declare a GlobalVariable object. I have two problems: 1. What element type I should set for the arrayType? 2. How to set the constant value as :c"%f\0A\00" Cheers, Zheng
2010 Apr 08
4
[LLVMdev] How to Load a Value?
Hello, I have a problem of generating a load instruction. The LLVM bytecode is: ------------------------ entry: ... %2 = call i32 (...)* @atoi(i8*%1) nounwind /*<- Insertpos*/ ... -- bb1: .. %5 = icmp sgt i32 %2, %i.0 ... ----------------- Now I have pb: pointer to the Value object of *%2* of bb1. Here, I want to generate a load instruction and I did it as: new LoadInst(pb,
2010 May 18
4
[LLVMdev] DEBUG INFO at the bytecode level
Thanks Edwin. I found DebugInfo.cpp may be useful. Could you tell me which function I should call inorder to know the source file name and the line number for a particular instruction? Cheers, Zheng 2010/5/18 Török Edwin <edwintorok at gmail.com>: > On 05/18/2010 01:26 PM, Zheng Wang wrote: >> Hello, >> >> Could I get some debug info at the byte code level? I am
2010 Apr 07
0
[LLVMdev] Get the loop trip count variable
Hello Andreas, Thanks! But I could not find -insert-optimal-edge-instrumenation pass from "opt -help". Did you mean -insert-edge-profiling? Cheers, Zheng On 7 April 2010 12:29, Andreas Neustifter <astifter-llvm at gmx.at> wrote: > Hi, > > On 04/05/2010 10:51 PM, Eli Friedman wrote: >> >> On Mon, Apr 5, 2010 at 1:19 PM, Zheng Wang<jason.wangz at
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:
2004 Nov 30
5
Problem with 2.4.28 kernel config
I just recompiled a plain vanilla 2.4.28 kernel, and used the Shorewall.net kernel config as a guideline. For some reason, I get this: Nov 30 12:05:34 fw shorewall: Shorewall has detected the following iptables/netfilter capabilities: Nov 30 12:05:34 fw shorewall: NAT: Available Nov 30 12:05:34 fw shorewall: Packet Mangling: Available Nov 30 12:05:34 fw shorewall: Multi-port Match:
2010 Apr 08
0
[LLVMdev] Declaring constant global variables
On Thu, Apr 8, 2010 at 12:18 PM, Zheng Wang <jason.wangz at gmail.com> wrote: > Hiya, > > I want to declare a constant global variable as: > > @.str = private constant [4 x i8] c"%f\0A\00", align 1 ; <[4 x i8]*> [#uses=1] > > I guess I should firstly declare an arrayType object, then declare a > GlobalVariable object. > > I have two problems:
2010 May 25
1
[LLVMdev] DEBUG INFO at the bytecode level
Devang Patel <devang.patel <at> gmail.com> writes: > > 2010/5/18 Zheng Wang <jason.wangz <at> gmail.com>: > > > > I found DebugInfo.cpp may be useful. Could you tell me which function > > I should call inorder to know the source file name and the line number > > for a particular instruction? > > > > See
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 18
0
[LLVMdev] DEBUG INFO at the bytecode level
2010/5/18 Zheng Wang <jason.wangz at gmail.com>: > > I found DebugInfo.cpp may be useful. Could you tell me which function > I should call inorder to know the source file name and the line number > for a particular instruction? > See http://llvm.org/docs/SourceLevelDebugging.html#ccxx_frontend At the end of "C/C++ source file information" section, there is a small
2010 Apr 08
0
[LLVMdev] How to Load a Value?
Zheng Wang <jason.wangz at gmail.com> writes: > I have a problem of generating a load instruction. The LLVM bytecode is: > > ------------------------ > entry: > ... > %2 = call i32 (...)* @atoi(i8*%1) nounwind > /*<- Insertpos*/ > ... > > -- > bb1: > .. > %5 = icmp sgt i32 %2, %i.0 > ... > ----------------- > > > Now I have >