search for: wangz

Displaying 20 results from an estimated 30 matches for "wangz".

Did you mean: wang
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 [4 x i8] c"%f\0A\00", align 1 ; <[4 x i8]*> [#uses=1] >> >> I guess I should firstly declare an arrayType object, then dec...
2010 Apr 06
1
[LLVMdev] Get the loop trip count variable
...ble 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, >> >> 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++) >> { >>...
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 correspond...
2010 Apr 06
2
[LLVMdev] Get the loop trip count variable
...ount cannot be determined, > /// this returns null. > > inline Value *getTripCount() const { > Canonical loops will end with a 'cmp ne I, V', where I is the incremented > canonical induction variable and V is the trip count of the loop. > > 2010/4/6 Zheng Wang <jason.wangz at gmail.com> >> >> 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++) >>...
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
0
[LLVMdev] Get the loop trip count variable
...else { cout << "\n could not get the trip count" << endl; } } ---------------------------- Anything wrong? On 6 April 2010 17:47, Zheng Wang <jason.wangz at gmail.com> wrote: > 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 > t...
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
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 o...
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 &quo...
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 http://llvm.org/docs/SourceLevelDebug...
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++) >> { >>...
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 i3...
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
...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 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]); >...
2012 Jun 23
2
matching a string with multiple conditions using grep
Suppose I have a vector ["A_cont_1", "A_cont_12", "B_treat_8", "AB_cont_22", "cont_21_Aa"], I hope I can extract the strings which include 3 short strings, say "A", "cont" and "2", that is to say, "A_cont_12", "AB_cont_22" and "cont_21_Aa" will be extract, using a relatively short code
2010 Apr 21
1
[LLVMdev] Link time optimisation error?
Hello, I followed the instruction given at: http://llvm.org/docs/LinkTimeOptimization.html#design, but got an error. Why it was that? Should I enable anything when configuring LLVM? I am using LLVM v2.6. $ llvm-gcc --emit-llvm -c a.c -o a.o $ llvm-gcc -c main.c -o main.o $ llvm-gcc a.o main.o -o main a.o: file not recognized: File format not recognized collect2: ld returned 1 exit status
2010 Apr 27
1
[LLVMdev] The nearest basic block being dominated by all used values.
Hello, Presumably I have two value v1 and v2 from two different basic block A and B. Now I need to insert to a printf to print those two values at the same time. This means I need to find a basic block to insert such a calling isntruction and at the same time, the basic block should be dominated by v1 and v2. Is there any easy way to find such a basic block? Cheers, Zheng
2010 May 18
0
[LLVMdev] DEBUG INFO at the bytecode level
Thanks Edwin, I will check it out. Cheers, Zheng 2010/5/18 Török Edwin <edwintorok at gmail.com>: > On 05/18/2010 02:13 PM, Zheng Wang wrote: >> Got it. >> >> I am using LLVM 2.6. I guess  bool getLocationInfo(const Value *V, >> std::string &DisplayName,...) has everything I need.\ > > Yes, for variables. > For instructions see what printStopPoint()
2010 May 20
2
[LLVMdev] Remove debug info from the byte code?
Hiya, Is there any easy way to remove the debug info from the LLVM byte code once I have collected all the debug info I needed? It is because the debug info seems to slow down the program significantly. I may be able to go through each basic block and delete the debug info in my pass. But, is there any elegant way to do it? Cheers, Zheng