search for: tut4

Displaying 3 results from an estimated 3 matches for "tut4".

Did you mean: tut
2009 Jan 21
0
[LLVMdev] Load from abs address generated bad code on LLVM 2.4
...s take a Value *. Any attempt to do anything with a const GlobalValue * is rejected by the C++ compiler. Perhaps I'm supposed to cast away the const? const GlobalValue *vv = engine->getGlobalValueAtAddress(&p); if (vv) { Value *tmp = builder.CreateLoad(vv); results in tut4.cpp:55: error: invalid conversion from 'const llvm::Value*' to 'llvm::Value*' tut4.cpp:55: error: initializing argument 1 of 'llvm::LoadInst* llvm::IRBuilder<preserveNames, T>::CreateLoad(llvm::Value*, const char*) [with bool preserveNames = true, T = llvm::ConstantFolde...
2009 Jan 19
1
[LLVMdev] Load from abs address generated bad code on LLVM 2.4
Andrew Haley <aph at redhat.com> writes: > Óscar Fuentes wrote: >> The following message is a courtesy copy of an article >> that has been posted to gmane.comp.compilers.llvm.devel as well. >> >> Andrew Haley <aph at redhat.com> writes: >> >>> This is x86_64. I have a problem where an absolute memory load >>> >>> define
2009 Jan 19
6
[LLVMdev] Load from abs address generated bad code on LLVM 2.4
This is x86_64. I have a problem where an absolute memory load define i32 @foo() { entry: %0 = load i32* inttoptr (i64 12704196 to i32*) ; <i32> [#uses=1] ret i32 %0 } generates incorrect code on LLVM 2.4: 0x7ffff6d54010: mov 0xc1d9c4(%rip),%eax # 0x7ffff79719da 0x7ffff6d54016: retq should be 0x7ffff6d54010: mov 0xc1d9c4, %eax 0x7ffff6d54016: retq