Displaying 10 results from an estimated 10 matches for "chialun".
2012 Dec 21
2
[LLVMdev] How to print machine code of JIT IR
Hi,
I am using LLVM 3.1, and wants to print the machine code of JIT IR
I try the following method
EngineBuilder builder(&ctx.getModule());
builder.setEngineKind(EngineKind::JIT);
*
TargetMachine * tm = builder.selectTarget();
tm->Options.PrintMachineCode = true;*
engine = builder.create();
and somewhere in my code, I use
runJITonFunction();
Another question is that I am
2012 Dec 21
0
[LLVMdev] How to print machine code of JIT IR
Hi Chia Lun Liu,
On 12/21/12 7:47 AM, ChiaLun wrote:
> I am using LLVM 3.1, and wants to print the machine code of JIT IR
>
> I try the following method
>
> EngineBuilder builder(&ctx.getModule());
> builder.setEngineKind(EngineKind::JIT);
> *
> TargetMachine * tm = builder.selectTarget();
> tm->...
2013 Jan 07
1
[LLVMdev] Question on using GlobalVariable as function pointer
Hi everyone,
I am trying to have an call instruction that calls global variable
The first thing I do is
gv = new llvm::GlobalVariable( *(tb->getModule()),
fty,
false,GlobalValue::InternalLinkage,0,
"",0,0,0);
fty : i32 ({ i32, [32 x i32] }*)
I get stuck here, the fifth argument is the
2012 Oct 04
0
[LLVMdev] Problems of manipulating GEP for struct type
Hi Chia Lun,
On 04/10/12 07:58, ChiaLun wrote:
> Hi,
>
> I use JIT to execute the following LLVM IR,
>
> ------------------------------------------------------------------------------------------------------------
> define internal fastcc i32 @L_00008120_(%struct.ThreadContext* %ThreadCtx) {
does the caller also specif...
2012 Dec 26
1
[LLVMdev] Using argument in another module
Hi everyone,
I am building a function that would call a function in another module,
I found this related thread
http://llvm.1065342.n5.nabble.com/Using-a-function-from-another-module-td10506.html
All my functions have prototype
int f(myStruct * c);
here comes my problems
If I have Function* f1,*f2
f2 is in another module, f1 is the function I am building.
Somewhere in f1 , I set
2012 Oct 04
2
[LLVMdev] Problems of manipulating GEP for struct type
Hi,
I use JIT to execute the following LLVM IR,
------------------------------------------------------------------------------------------------------------
define internal fastcc i32 @L_00008120_(%struct.ThreadContext* %ThreadCtx) {
L_00000000_:
%0 = alloca i32
%1 = alloca i32
%2 = alloca %struct.ThreadContext*, align 4
store %struct.ThreadContext* %ThreadCtx, %struct.ThreadContext**
2012 Sep 25
2
[LLVMdev] JIT problem with thread local global variable
Thanks for your hint, I will try that
Have A Nice Day
Chia Lun
--
View this message in context: http://llvm.1065342.n5.nabble.com/JIT-problem-with-thread-local-global-variable-tp49263p49273.html
Sent from the LLVM - Dev mailing list archive at Nabble.com.
2012 Nov 16
0
[LLVMdev] how to use lllvm interpreter api ?
Hi everyone,
I build the interpreter with the following codes
* llvm::Module* mod = new llvm::Module("",llvm::getGlobalContext());
EngineBuilder builder(mod);
builder.setEngineKind(EngineKind::Interpreter);
builder.setOptLevel(CodeGenOpt::Default);
EE = builder.create();*
then I make 2 functions, their ir look like :
@1 = private unnamed_addr
2013 Jan 11
0
[LLVMdev] modifiy the address of GlobalVariable emitted by JIT
Hi everyone,
I am building a binary translator, and try to do block chaining.
LLVM version : 3.1
my machine : x86-32 bit, Linux
Before each *LLVM IR returnInst constantValue*, I insert a call instruction
& a returnInst which looks like
%x = call @G ;
ret %x;
then remove the *LLVM IR returnInst constantValue*
The initializer of @G is a function which has prototype int f(struct MyType*
2013 Mar 05
4
[LLVMdev] Convert C variable to LLVM IR Variable
Hi everyone,
I am doing some work with LLVM IR, I need to use LLVM IR to do operation
on C variables.
Code emission is done by LLVM JIT.
That variable is C thread local , for example
__thread int* gvar;
I think some methods to convert that variable to LLVM IR,
(1) use external function
I know LLVM IR is able to call an external function, so I can write codes
that look like:
int* load()