search for: abhinash

Displaying 20 results from an estimated 33 matches for "abhinash".

2013 Jun 10
3
[LLVMdev] Getting the memory address of all operands on an expression
How to get memory address of all operands which constitutes an expression ? eg. a=b+c; (want to know the memory address of b and c)...... Since I want this at run time, So at assembly level this expression will become something like as follows:- Load r1, M[b] Load r2, M[c] r3=r1+r2 store M[a],r3 Now what i want to do is that, at every store instruction, I should get the memory address of all
2013 Jun 11
0
[LLVMdev] Getting the memory address of all operands on an expression
Hi Abhinash, On 10/06/13 23:05, Abhinash Jain wrote: > How to get memory address of all operands which constitutes an expression ? in LLVM IR, the operands of most expression are registers, so don't have a memory address. In short, you can't always succeed. However in cases where the operands do...
2013 Jun 18
0
[LLVMdev] Getting the memory address of all operands on an expression
On Mon, Jun 17, 2013 at 11:49 PM, Abhinash Jain <omnia at mailinator.com>wrote: > > But before becoming part of the expressions, the registers will actually > fetch some value from memory, through Load operations. > This is not true; the virtual registers need not be loaded from memory. You may find < http://llvm.org/d...
2013 Jul 26
2
[LLVMdev] LLVM ERROR : Invalid instruction
@Jim Grosbach, Is there anyway to resolve it??? -- View this message in context: http://llvm.1065342.n5.nabble.com/LLVM-ERROR-Invalid-instruction-tp59856p59865.html Sent from the LLVM - Dev mailing list archive at Nabble.com.
2013 Jul 26
0
[LLVMdev] LLVM ERROR : Invalid instruction
On Jul 26, 2013, at 6:48 PM, Abhinash Jain <omnia at mailinator.com> wrote: > Is there anyway to resolve it??? 1. Teach the cpp backend how to handle it. 2. Compile with -fno-exceptions to turn off exceptions. -- Stephen Checkoway
2014 May 24
2
[LLVMdev] How to count the number of **LLVM** instructions executed dynamically
Hi, I wanted to count the number of "*LLVM*" instruction executed dynamically in any program. Have already tried "lli -stats -force-interpreter filename.bc", but it's not giving any information related to instruction count. lli --version output:- LLVM version 3.4svn DEBUG build with assertions. Default target: x86_64-unknown-linux-gnu Host CPU: corei7 -- View
2013 Jun 18
3
[LLVMdev] Getting the memory address of all operands on an expression
> in LLVM IR, the operands of most expression are registers, so don't have a memory address. Yes I agree with your this statement, But before becoming part of the expressions, the registers will actually fetch some value from memory, through Load operations. as shown in example "r3=r1+r2" will be the expression, where registers such as r1 and r2 contains (fetch) the values from
2013 Oct 19
2
[LLVMdev] Name of Virtual Registers
How can I get the name of the virtual Registers present on an instruction. eg. %add18 = add nsw i32 %mul17, %37 in this case I want to extract the name of the virutal registers as "add18", "mul17","37". This can easily be done in the case of store Instruction eg. store i32 %add20, i32* %t, align 4 in this case functions like
2013 Jun 19
2
[LLVMdev] Getting the memory address of all operands on an expression
In short if suppose i have some expression as a=b+c-d*e, and with the help of LLVM pass i want to make a string like this:- "[Hexadecimal address of 'b'] [opcode of +] [Hexadecimal address of 'c'] [opcode of -] [Hexadecimal address of 'd'] [opcode of *] [Hexadecimal address of 'e']". Than how can i make it................ -- View this message in
2013 Jun 19
0
[LLVMdev] Getting the memory address of all operands on an expression
On 19/06/13 03:12, Abhinash Jain wrote: > In short if suppose i have some expression as a=b+c-d*e, and with the help > of LLVM pass i want to make a string like this:- > > "[Hexadecimal address of 'b'] [opcode of +] [Hexadecimal address of 'c'] > [opcode of -] [Hexadecimal address of '...
2013 Jul 25
2
[LLVMdev] Passing String to an external function in llvm
Hi All, On my llvm pass I have some variable named "expr" which is being declared as :- string expr; // or char *expr; // Now I want to pass this "expr" to some external function. How can I do this?? Similarly, How can I pass variable "var" to an external function which is being decalred as :- Vector<int> var; Any help will be
2013 Jul 25
0
[LLVMdev] Passing String to an external function in llvm
On Thu, Jul 25, 2013 at 9:07 AM, Abhinash Jain <omnia at mailinator.com> wrote: > Hi All, > > On my llvm pass I have some variable named "expr" which is being declared as > :- > string expr; // or char *expr; // I don't understand this question - these are C++ declarations, not LLVM declarations (...
2013 Jul 25
0
[LLVMdev] Passing String to an external function in llvm
On Thu, Jul 25, 2013 at 10:12 AM, Abhinash Jain <omnia at mailinator.com> wrote: > I did some computation through llvm pass, and store those computed values on > string. eg. :- > > stringstream lhs; > lhs << instr->getOperand(1); // 'instr' is some instruction > string lhsvar=lhs.str(); > >...
2013 Jul 26
2
[LLVMdev] LLVM ERROR : Invalid instruction
#include <string> #include <string.h> #include <iostream> #include <stdio.h> using namespace std; void foo(string str) { } int main() { string str="aa"; foo(str); return 0; } 1. clang++ -c -emit-llvm foo.cpp -o foo.ll 2. llc -march=cpp -o foo.ll.cpp foo.ll (at the execution of this command its giving an error as "Invalid Instruction") May I know why
2013 Jul 26
0
[LLVMdev] LLVM ERROR : Invalid instruction
Looks like the CPP backend doesn’t know how to deal with exception handling. It’s complaining that it can’t handle a landingpad instruction. -Jim On Jul 26, 2013, at 1:49 PM, Abhinash Jain <omnia at mailinator.com> wrote: > #include <string> > #include <string.h> > #include <iostream> > #include <stdio.h> > using namespace std; > > void foo(string str) > { > } > int main() > { > string str="aa"; > f...
2013 Sep 01
0
[LLVMdev] Distinguishing Pointer Variable and Ordinary Variable
Check it's type to see if it's a pointer or not? On 1 September 2013 12:31, Abhinash Jain <omnia at mailinator.com> wrote: > C Code :- > int main() > { > int a=10,c; > int *b; > c=20; > *b=a; > return 0; > } > > IR of above code :- > define i32 @main() #0 { > entry: > 1. %retval = alloca i32, align 4 > 2. %a = alloca i32, a...
2013 Sep 01
2
[LLVMdev] Distinguishing Pointer Variable and Ordinary Variable
Sorry I have actually edited the post. I did check its type by using isa<PointerType>(cast<AllocaInst>(instr->getOperand(1))->getAllocatedType()) but it is only detecting i32** %b on line 8 of IR as a pointer type. Whereas I also want to detect the i32* %1 on line 11 of IR as a pointer type. So how can I do this?? -- View this message in context:
2013 Sep 01
0
[LLVMdev] Distinguishing Pointer Variable and Ordinary Variable
Hi, On 1 September 2013 15:47, Abhinash Jain <omnia at mailinator.com> wrote: > Sorry I have actually edited the post. This is primarily an e-mail list; the vast majority of us won't see any edits (on some web mirror?). > I did check its type by using > isa<PointerType>(cast<AllocaInst>(instr->getOpera...
2013 Sep 22
0
[LLVMdev] Why total number of store instructions increased in case of gvn with reg2mem?
Might have to do with GVN's PRE (partial redundancy elimination), which tends to increase code size. H. ----- Original Message ----- From: Abhinash Jain Sent: 09/22/13 01:17 AM To: llvmdev at cs.uiuc.edu Subject: [LLVMdev] Why total number of store instructions increased in case of gvn with reg2mem? Below are the 4 cases out of which for the first 3 cases am able to understand the variation on total number of store inst. But when -gvn paramet...
2013 Oct 14
0
[LLVMdev] Generating New Functions
On 10/14/13 5:53 AM, Abhinash Jain wrote: > How can I generate a new function at compile time and insert some instruction > onto it, through llvm pass. > eg. > > 1) %y = alloca i32, align 4 > 2) %z = alloca i32, align 4 > 3) %t = alloca i32, align 4 > 4) %2 = load i32* %y, align 4 > 5) %3 = load...