similar to: [LLVMdev] all LLVM Instructions that may write to memory -- other than StoreInst?

Displaying 20 results from an estimated 1100 matches similar to: "[LLVMdev] all LLVM Instructions that may write to memory -- other than StoreInst?"

2011 Jan 21
0
[LLVMdev] all LLVM Instructions that may write to memory -- other than StoreInst?
On 1/21/11 2:50 PM, Chuck Zhao wrote: > I need to figure out all LLVM Instructions that may write to memory. > > In http://llvm.org/docs/tutorial/OCamlLangImpl7.html, it mentions that > "In LLVM, all memory accesses are explicit with load/store > instructions, and it is carefully designed not to have (or need) an > "address-of" operator." > > I take
2011 Jan 21
1
[LLVMdev] all LLVM Instructions that may write to memory -- other than StoreInst?
John, Thanks for the reply. I agree with your comments that the "Memory" LLVM Spec refers to doesn't include stack. Let me leverage a bit further: If I need to work on high-level IRs (not machine dependent, not in the code-gen stage), is it reasonable to assume that ALL LLVM IRs that have a result field will have potential to write stack? E.g. <result> =
2011 Jan 22
0
[LLVMdev] all LLVM Instructions that may write to memory -- other than StoreInst?
Hi Chuck, > I need to figure out all LLVM Instructions that may write to memory. I->mayWriteToMemory() Ciao, Duncan.
2011 Jan 22
1
[LLVMdev] all LLVM Instructions that may write to memory -- other than StoreInst?
Duncan, I looked at this function even before starting the discussions. I think it respects LLVM's principle that only Loads and Stores (+VAArg, and maybe Call) that can access global memory, but doesn't address the issues of accessing stack frames or stack objects. Thank you for the hint. Chuck On 1/22/2011 6:17 AM, Duncan Sands wrote: > Hi Chuck, > >> I need to figure
2010 Oct 04
1
[LLVMdev] how to handle inline asm code when converting c++ to C
Hi, I am using llvm to convert some C++ code to C. However the C++ code has couple of lines of assembly that is supposed to be inlined. I am using __asm__ directive. However the resulting C code has syntax errors: main.c: In function ‘_Z23atomic_exchange_and_addPii’: main.c:397: error: expected ‘:’ or ‘)’ before string constant main.c: In function ‘_Z16atomic_incrementPi’: main.c:421: error:
2013 Nov 10
1
[LLVMdev] about creating the first value of the storeinst
Dear All I'm trying to create storeInst using StoreInst *SI = new StoreInst(val, AI, BB); AI is an alloca instruction previously created, BB is the basicBlock I want to put instructionsi in. Val is the value to store. I've created val from a genericValue like this: Value* val = ConstantInt::get(getGlobalContext(), Result.IntVal); Result is the genericValue However I keep getting
2010 Apr 05
3
[LLVMdev] Linking with C Library
>> You need to figure out how to pass -rdynamic to the linker, like I said before. http://llvm.org/docs/tutorial/OCamlLangImpl7.html mentions it, but I don't know enough about the ocaml build process to say whether that'll work. I believe I'm already doing that, properly by passing -ccopt -rdynamic to ocamlopt: ocamlopt -cc g++ -ccopt -rdynamic -linkall $(LIBFILES) -o alpha
2010 Aug 16
1
[LLVMdev] Create the Value object for StoreInst
Hello all, I would like to create a new StoreInst into a basic block. I found that I could use methods like ConstantInt::get() to provide the Value* for the first argument of the constructor of the StoreInst, but I don't know how to provide the second one. For example, if I would to do x = 1, I would like to create the "Value" object of "x" for the second argument. I
2016 Dec 16
2
Alignment of the StoreInst
Hi all, I am wondering the semantics of alignment in a StoreInst. For example, in the following code: %A = bitcast i8* %buffer to i32* store i32 %x, i32* %A, align 4 We have an "align 4" in the StoreInst. Does this mean 1) the address 'A' should be aligned to 4 bytes? 2) the lower 2 bits of 'A' should be always 0? Thanks Hongbin -------------- next part
2018 Aug 31
2
Extending StoreInst/LoadInst
Hi, I am trying to figure out the best way to add some extra metadata to the store and load llvm-ir instructions: The metadata content is a 'Value*' expression representing a side channel, containing dependency information that is used to help the Scoped Alias Analysis. Optimizations that don't know about this side channel can safely drop it, where the only effect would be on the
2013 Apr 18
0
[LLVMdev] How to retrieve IntToPtr from StoreInst?
On 4/18/13 9:56 AM, Jun Koi wrote: > hi, > > i am writing a simple LLVM pass to analyze the Store instruction. > my pass derives from InstVisitor class, and the method to handle Store > instruction is like this: > > void MyPass::visitStoreInst(StoreInst &I) { > ... > } > > It is pretty simple to handle Store. however, in on test i got an > instruction like
2018 Mar 10
0
Dump LLVM StoreInst
On Fri, Mar 9, 2018 at 9:18 AM, Zhou Zhizhong via llvm-dev <llvm-dev at lists.llvm.org> wrote: > Hi, > > I’m writing a loop-free LLVM pass, my thought is to track if the value inside the loop is changed, so I look up the Instruction StoreInst first and try to get its value in a set. I checked getValueOperand(), getValueName() in the API document but unfortunately they failed the
2013 Apr 19
1
[LLVMdev] How to retrieve IntToPtr from StoreInst?
On Thu, Apr 18, 2013 at 11:11 PM, John Criswell <criswell at illinois.edu>wrote: > On 4/18/13 9:56 AM, Jun Koi wrote: > > hi, > > i am writing a simple LLVM pass to analyze the Store instruction. > my pass derives from InstVisitor class, and the method to handle Store > instruction is like this: > > void MyPass::visitStoreInst(StoreInst &I) { > ... >
2016 Dec 16
0
Alignment of the StoreInst
Hi Hongbin, On 16 December 2016 at 11:57, Hongbin Zheng via llvm-dev <llvm-dev at lists.llvm.org> wrote: > We have an "align 4" in the StoreInst. Does this mean > 1) the address 'A' should be aligned to 4 bytes? > 2) the lower 2 bits of 'A' should be always 0? Yes, these are both the same. It means the compiler will assume those facts when reasoning about
2013 Apr 18
2
[LLVMdev] How to retrieve IntToPtr from StoreInst?
hi, i am writing a simple LLVM pass to analyze the Store instruction. my pass derives from InstVisitor class, and the method to handle Store instruction is like this: void MyPass::visitStoreInst(StoreInst &I) { ... } It is pretty simple to handle Store. however, in on test i got an instruction like below: store i8 %tmp5, i8* inttoptr (i32 301959828 to i8*) the second operand is
2014 Oct 19
2
[LLVMdev] SSA for memory objects
Hello, I'm looking to learn more about what is available for memory versioning or inducing some kind of SSA for memory objects. I found this page: http://llvm.org/docs/tutorial/OCamlLangImpl7.html#memory-in-llvm Which says: "[LLVM] does not require (or permit) memory objects to be in SSA form.... In LLVM, instead of encoding dataflow analysis of memory into the LLVM IR, it
2016 Dec 16
2
Alignment of the StoreInst
Hi Tim, Thanks for the explanation. The above code snippets is actually extracted by bugpoint from MultiSource/Applications/ALAC/encode/alacconvert-encode.test. I get a different result if I cast the pointer to int and mask away the lower two bits and cast the int back to pointer. While casting pointer to int and back to pointer do not cause any problem. Thanks Hongbin On Fri, Dec 16, 2016 at
2013 Jan 18
0
[LLVMdev] How to get more details from storeInst ?
Hi Cheng, On 18/01/13 03:00, Cheng Liu wrote: > I have a loop fully unrolled and got the following store instruction. > > store i32 %add.3, i32* getelementptr inbounds ([20 x [20 x i32]]* @c, i32 0, > i32 0, i32 0), align 4 > > I want to know exactly which element of the array that is going to be > stored, which help me to transform the high level language to hardware. Take
2018 Mar 10
0
Dump LLVM StoreInst
The code you've pasted there is inconsistent in variable names. Your created an instruction called 'op1' but your print uses 'v1'. What should be an '->' is just a '-'. You also have a variable in your print called 'op' but that's not declared in your code. Also the result of dyn_cast should always be checked for null before using the result.
2014 Aug 04
3
[LLVMdev] LLVM AllocaInst and StoreInst
Hi, I am trying to write a simple interpreter. I am trying to generate LLVM IR for assignment operation. The code for the generation part looks like this llvm::Value* codeGenSymTab(llvm::LLVMContext& context) { > printf("\n CodeGen SymTab \n"); > Value *num = ConstantInt::get(Type::getInt64Ty(context), aTable.value, > true); > Value *alloc = new