similar to: result of load Instruction

Displaying 20 results from an estimated 6000 matches similar to: "result of load Instruction"

2016 Feb 08
3
distinguish program and temporary variables
I'm writing a pass that eliminates some variables. To show the effect of the pass i need to show that I deleted the variables that originally appear in the user code, not temporary variables added by llvm. On Mon, Feb 8, 2016 at 5:59 PM, Mehdi Amini <mehdi.amini at apple.com> wrote: > > > On Feb 8, 2016, at 6:39 AM, Mohammad Norouzi via llvm-dev < > llvm-dev at
2016 Feb 08
4
distinguish program and temporary variables
Hi, I need to check if a variable belongs to the program originally. Consider the following code line: y = x + 4 and its corresponding llvm ir (roughly): %16 = load i32 %x %add = add i32 %16, i32 4 store i32 %add, %y I need to distinguish between %16, %add and %x, %y. Any help is appreciated. Best, Mohammad -------------- next part -------------- An HTML attachment was scrubbed... URL:
2017 Mar 10
2
get function parameters (not arguments)
Sorry i'm using the following code: F = (cast<CallInst>(BI))->getCalledFunction(); for (auto& A : F->getArgumentList()) { errs() << "------- " << A.getName() << " " << "11" << "\n"; } But how can I get the parameters (as e and f in the example)? Thank you and best, Mo On
2016 Mar 23
4
relation between address spaces and physical memory locations
Hi, Do address spaces in llvm corespond to different memory locations? For example, Shared and Global refer to RAM while Local refers to registers? I guess that this may be true in GPU programming. So, I would like to know about CPUs. Thanks. Best, Mohammad -------------- next part -------------- An HTML attachment was scrubbed... URL:
2019 Nov 26
2
[Clang] memory allocation
Thanks David for your reply! However, OK is called inside nqueens. So, the same stack space cannot be used/reused for both of them. Best, Mohammad On Wed, Nov 20, 2019 at 11:43 PM David Blaikie <dblaikie at gmail.com> wrote: > You printed &j and &solutions - did you mean to print 'solutions' instead > of '&solutions' Because 'solutions' and
2017 Mar 10
2
get function parameters (not arguments)
what about the memory address of e and f? can i get them? Thank you and best, Mo On Fri, Mar 10, 2017 at 5:02 PM, Tim Northover <t.p.northover at gmail.com> wrote: > On 10 March 2017 at 15:49, Mohammad Norouzi <mnmomn at gmail.com> wrote: > > for (auto& A : cast<CallInst>(BI)->arg_operands()) > > errs() << "--- " << A->getName()
2017 Mar 10
2
get function parameters (not arguments)
I tried the original posted code again: for (auto& A : cast<CallInst>(BI)->arg_operands()) errs() << "--- " << A->getName() << "\n"; but it prints empty (only ---)! Thank you and best, Mo On Fri, Mar 10, 2017 at 4:44 PM, Tim Northover <t.p.northover at gmail.com> wrote: > On 10 March 2017 at 15:41, Mohammad Norouzi <mnmomn at
2016 Mar 03
2
get debug info after optimization
Hi, Is it possible to get debug information after optimization? for example, source code line numbers of instructions in an ir that is optimized by O2? Best, Mohammad -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160303/af4f46a7/attachment.html>
2017 Mar 10
2
get function parameters (not arguments)
Hi Everyone, Does anyone know to get function parameters? For example, I want to get e and f in the call to function foo in the following code: foo(inr a , int b){ .... } main() { int e,f; e=10; f=22; *foo(e,f);* } I use the following code: for (auto& A : (cast<CallInst>(BI))->arg_operands ()) errs() << A.dump(); but I get a and b instead. Thank you
2019 Nov 20
2
[Clang] memory allocation
Hi, Could anyone please help me understand why Clang reallocates the same memory address for different variables while their lifetime intersect? Here is an example code: #include <stdlib.h> #include <stdio.h> #include <memory.h> #include <alloca.h> /* Checking information */ static int solutions[] = { 1, 0, 0, 2, 10, /* 5 */
2016 Feb 08
2
distinguish program and temporary variables
> Hi, > > I need to check if a variable belongs to the program originally. Consider > the following code line: > > y = x + 4 > > and its corresponding llvm ir (roughly): > > %16 = load i32 %x > %add = add i32 %16, i32 4 > store i32 %add, %y > > I need to distinguish between %16, %add and %x, %y. > > > You might be able to use the Debug information
2016 Mar 23
0
relation between address spaces and physical memory locations
On 23 Mar 2016, at 11:35, Mohammad Norouzi <mnmomn at gmail.com> wrote: > > Thanks for the reply. > > On Wed, Mar 23, 2016 at 10:43 AM, James Molloy <james at jamesmolloy.co.uk> wrote: > Hi, > > Address spaces in LLVM are an abstract concept and LLVM attaches no internal meaning to address spaces, apart from: > > - Location 0 in address space 0 is
2013 Jan 28
5
[LLVMdev] Value* to Instruction*/LoadInst* casting
Hello everyone, Can you please tell me if it is possible in LLVM to cast a `Value*` to an `Instruction*/LoadInst*` if for example `isa<LoadInst>(MyValue)` is true? In my particular piece of code: Value* V1 = icmpInstrArray[i]->getOperand(0); Value* V2 = icmpInstrArray[i]->getOperand(1); if (isa<LoadInst>(V1) || isa<LoadInst>(V2)){ ...
2013 Jan 28
0
[LLVMdev] Value* to Instruction*/LoadInst* casting
The compilation error is : `error: ‘LD100’ was not declared in this scope.` On Mon, Jan 28, 2013 at 11:31 AM, Alexandru Ionut Diaconescu < alexandruionutdiaconescu at gmail.com> wrote: > Hello everyone, > > Can you please tell me if it is possible in LLVM to cast a `Value*` to an > `Instruction*/LoadInst*` if for example `isa<LoadInst>(MyValue)` is true? > In my
2013 Jan 28
1
[LLVMdev] Value* to Instruction*/LoadInst* casting
Hi Alexandru, > The compilation error is : `error: ‘LD100’ was not declared in this scope.` > > On Mon, Jan 28, 2013 at 11:31 AM, Alexandru Ionut Diaconescu < > alexandruionutdiaconescu at gmail.com> wrote: > >> Hello everyone, >> >> Can you please tell me if it is possible in LLVM to cast a `Value*` to an >> `Instruction*/LoadInst*` if for example
2013 Jan 28
0
[LLVMdev] Value* to Instruction*/LoadInst* casting
Alexandru Ionut Diaconescu wrote: > Hello everyone, > > Can you please tell me if it is possible in LLVM to cast a `Value*` to > an `Instruction*/LoadInst*` if for example `isa<LoadInst>(MyValue)` is > true? http://llvm.org/docs/ProgrammersManual.html#the-isa-cast-and-dyn-cast-templates In my particular piece of code: > > Value* V1 =
2015 Nov 26
4
Creating/Deleting a new instruction from LLVM IR
Hi, I was trying to create a new *Store* instruction and inserting it to LLVM IR (.ll) file. I found the following constructor in LLVM Manual: StoreInst::StoreInst <http://llvm.org/docs/doxygen/html/classllvm_1_1StoreInst.html#aa2a72f9a51b317f5b4ab8695adf59025> (Value <http://llvm.org/docs/doxygen/html/classllvm_1_1Value.html> * Val, Value
2008 Nov 15
3
[LLVMdev] How do I get the result of an instruction?
Hi all, I probably have a stupid question but I could not find out so please help me out here. I can use getOperand to get the operands of an instruction. Similarly, How do I get the result of an instruction? Thanks, Bhavani
2011 Jan 19
3
[LLVMdev] know if individual LLVM's Instruction has a result, and how to obtain it?
Most LLVM IR instructions have a result field, according to the Language Reference. I want to know, for all LLVM Instructions, is there an easy and consistent way to know if the current Inst has a result field? And if yes, what is the best way to obtain it? E.g.: <result> = add<ty> <op1>,<op2> /; yields {ty}:result / All ADD instruction will have a
2014 Feb 01
3
[LLVMdev] LoadInst result
Folks, I have a LLVM instruction like the following %0 = load i32** %pp, align 8 I have a LoadInst &inst handle to this instruction. In addition, i could access the pointer being loaded from using the inst.getPointerOperand... However, is there a way to access the handle to the value being loaded? Essentially, i wanted to access the %0 in the statement listed. The end goal is