similar to: [LLVMdev] Accessing instruction/operand names

Displaying 20 results from an estimated 10000 matches similar to: "[LLVMdev] Accessing instruction/operand names"

2009 Apr 15
0
[LLVMdev] Accessing instruction/operand names
The other repliers have been right that you probably want to use Value*s rather than string names in constructing your dependency graph, but I wanted to clear up a second possible point of confusion. When you see %2 in the assembly, that's an indication that the instruction's name is empty. That is, value->getName() == "". As far as I know, llvm-dis just generates numbers in
2009 Apr 15
0
[LLVMdev] Accessing instruction/operand names
James Stanier wrote: > Hello everyone, > > I'm currently constructing a graph from LLVM bitcode, and I have a question > about accessing the names of the variables shown in the .ll assembly file, > assuming it's possible... > > For example, with > > %2 = load i32* %x_addr, align 4 ; <i32> [#uses=1] > > I can retrieve the opcodeName() from the
2009 Jun 30
2
[LLVMdev] Irreducibility and the -simplifycfg flag
Hi everyone, I'm currently trying to run a study on irreducibility of C programs, and I've implemented structural analysis (original paper by Sharir, algorithm in Muchnick's book) as an LLVM pass. When my implementation becomes a bit less buggy I'll certainly look into including it in the LLVM project. As a test for the algorithm I've been producing LLVM bitcode for C files
2010 Mar 13
2
[LLVMdev] Seeking advice on Structural Analysis pass
Hi folks, A few months back I finished writing and testing a pass which implements "structural analysis" as described originally by Sharir in 1980 ("Structural analysis: A new approach to flow analysis in optimizing compilers") and more recently by Muchnick in Advanced Compiler Design and Implementation. It analyses the CFG and recognises specific region schema, such as
2010 Mar 26
4
[LLVMdev] Operand, instruction
Can anyone tell how to get the result name or instruction name of all instruction? For example if the instruction is "x=add y,z", here i need "x". Using getName(), i am getting some instructions result name, but llvm produces some instruction like "%0=add i32 tmp, 1", here getName() shows empty string as result name. So please help. John Criswell wrote: > >
2009 Sep 28
0
[LLVMdev] Printing Function Arguments
Hi Nick, Perhaps I am confused. What is the best way to extract information from instructions ? Is it via the, say: for (User::op_iterator i = I->op_begin(), e = I->op_end(); i != e; ++i) .... I am not sure what happens next, e.g. to the variable 'i', you should know what part of the instruction this is and cast it to the necessary type. For example, I am parsing the
2009 Mar 25
2
[LLVMdev] Rolling my own LLVM assembly language parser
Thank you both for your answers. The only reason I was interested in not using the built-in parsing library was that it would give me more flexibility over the language I program in, but if it means brushing up on my C++ then this isn't too much of a problem either. With regards to using the in-memory LLVM, that's also a good approach. However, I was thinking of structuring my thesis
2010 Mar 28
0
[LLVMdev] Operand, instruction
On Fri, Mar 26, 2010 at 6:53 AM, help__me_please <krishnadhan at cse.iitb.ac.in> wrote: > > Can anyone tell how to get the result name or instruction name of all > instruction? For example if the instruction is "x=add y,z", here i need "x". > Using getName(), i am getting some instructions result name, but llvm > produces some instruction like "%0=add
2010 Mar 27
0
[LLVMdev] Operand, instruction
Hi, > Can anyone tell how to get the result name or instruction name of all > instruction? For example if the instruction is "x=add y,z", here i need "x". > Using getName(), i am getting some instructions result name, but llvm > produces some instruction like "%0=add i32 tmp, 1", here getName() shows > empty string as result name. > So please help.
2009 Mar 27
3
[LLVMdev] Shared objects not being built on OS X
Hi again everyone... After following the "Writing an LLVM Pass" tutorial using LLVM 2.5, there is a part that states that: "This makefile specifies that all of the .cpp files in the current directory are to be compiled and linked together into a Debug/lib/Hello.so shared object that can be dynamically loaded by the opt or bugpoint tools via their -load options."
2009 Feb 11
0
[LLVMdev] Operand, instruction
Nipun Arora wrote: > Hi, > > How can one extract the operand of an instruction in an LLVM pass? > Like I can get the opcode bt I'd like to get the operands as well > Use the getOperand() method of class Instruction (which I think is inherited from Value or User or some other LLVM class). It takes a single parameter that is an index specifying which operand to return. The
2009 Feb 11
3
[LLVMdev] Operand, instruction
Hi, How can one extract the operand of an instruction in an LLVM pass? Like I can get the opcode bt I'd like to get the operands as well Thanks Nipun -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090211/3a073512/attachment.html>
2016 Apr 24
2
Retrieving numeric value of instruction operand
Hello Everyone, I need some help in retrieving the numeric value of an instruction operand from LLVM IR. this is what the IR looks like for a simple add function that adds two i32 integers define i32 @summ(i32 %a, i32 %b) #0 { entry: %add = add nsw i32 %b, %a ret i32 %add } i would like to know the integer value of %a and %b. I've tried -i->getOpcodeName() which gives me the
2010 Apr 22
3
[LLVMdev] Operand, instruction
Hello, how to get the numerical value of an constant operand? For ex. %tmp = mul i32 %indvar, 6 , in this instruction second operand is a numerical constant with value 6. But i am only able to print it by using getOperand(1), not able to store it in any integer variable. Using getName() returns a empty string. Is there any way to solve this problem? Thank you. John Criswell-2 wrote: > >
2016 Apr 24
2
Retrieving numeric value of instruction operand
hey john, yes indeed, that's what I'm trying, retreiving the values of %a and %b in an LLVM pass, sorry about the confusion. On Apr 24, 2016 7:18 AM, "John Criswell" <jtcriswel at gmail.com> wrote: > Dear Ammar, > > It is not clear what you are asking. %a and %b in your code below are not > constants; there is no way, at compile time, to determine what
2009 Nov 10
1
[LLVMdev] Altivec vs the type legalizer
Hi Dale, I think Bob is right: the type legalizer shouldn't be turning v16i8 into v16i32, what should happen is that the return type of the BUILD_VECTOR continues to be v16i8, but the type of the operands changes to i32, so you end up with a BUILD_VECTOR that takes 16 lots of i32, and produces a v16i8. The target then has all the info it needs to produce the best code, but needs to be careful
2009 Mar 26
2
[LLVMdev] how to get the InvodInst 's Operand Name?
Hi Duncan, >>are you trying to get the name "@_ZTIi" or "@__cxa_throw"? yes! i want get the name @_ZTi or @__cxa_throw, the latter @__cxa_throw i can get it throw value->getName(), but the @_ZTi it did n't has name! zhangzw thanks 2009/3/26 Duncan Sands <baldrick at free.fr>: > Hi zhangzw, > >> invoke void @__cxa_throw(i8* %7, i8*
2009 Sep 28
4
[LLVMdev] Printing Function Arguments
ivtm wrote: > Hey Oscar, > > I want to extract information from the instruction. > > Think writing a simple interpreter. > > I already have the CallInst instance (described above in the message). > > Via ci->getOperand(1) say I can get the 'i32 8' parameter and I can get the > 'i32' and '8' separately as Nick described. > > But I
2010 Apr 22
0
[LLVMdev] Operand, instruction
if (ConstantInt *c = (ConstantInt *) dyn_cast<ConstantInt>(index)){ errs() << "And it's a constant!!!!!!1111oneone!! (" <<c->getZExtValue() << ")\n"; } -- "Believe you can, believe you can't; either way you're right."  -Henry Ford -----Original Message----- From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at
2010 Mar 16
1
[LLVMdev] Seeking advice on Structural Analysis pass
Hi Trevor, I just studied your diagrams -- I *think* that the "control tree" of structural analysis is not same as the "control flow tree" from your own Java work. However, as you understand your work more than I do, I present you with some fancy coloured diagrams that I drew that might help you (and others!) understand what structural analysis does a bit better than the