search for: toshiyasu

Displaying 8 results from an estimated 8 matches for "toshiyasu".

Did you mean: toshikazu
2017 Mar 09
2
LLVMGetBitcodeModuleInContext2 problem
Oops, missed initializing some stuff. Added: LLVMLinkInMCJIT(); LLVMInitializeNativeTarget(); LLVMInitializeNativeAsmPrinter(); LLVMInitializeNativeAsmParser(); Now it crashes in LLVMGetFunctionAddress(). Hmm. On Wed, Mar 8, 2017 at 5:14 PM, Toshiyasu Morita <toshi at tensyr.com> wrote: > Made it a bit further. Here's the current code: > > void llvm_load_IR_library(char *path) > { > char *error; > LLVMExecutionEngineRef engine; > object0_t* (*func)(void), *output; > LLVMContextRe...
2017 Mar 08
2
LLVMGetBitcodeModuleInContext2 problem
...before calling LLVMGetBitcodeModuleInContext2? > Yes, you need to load the module into memory first. > LLVMCreateMemoryBufferWithContentsOfFile will do that for you. Thanks! On Wed, Mar 8, 2017 at 3:48 PM, Friedman, Eli <efriedma at codeaurora.org> wrote: > On 3/8/2017 3:44 PM, Toshiyasu Morita wrote: > > >> module_path = LLVMCreateMemoryBufferWithMemoryRange(path, >> strlen(path), "path", 1); >> > > LLVMCreateMemoryBufferWithContentsOfFile takes a path. > > Erm...no...the code is calling LLVMCreateMemoryBufferWithMemoryRange, n...
2017 Jan 26
2
mcjit C interface problems
...func = (uint64_t (*)())LLVMGetFunctionAddress(engine, "sum"); printf("result: %lu\n", (*func)()); Anything else I should look at? Toshi On Wed, Jan 25, 2017 at 5:20 PM, Andres Freund <andres at anarazel.de> wrote: > Hi, > > On 2017-01-25 15:17:04 -0800, Toshiyasu Morita via llvm-dev wrote: > > long long x = strtoll(argv[1], NULL, 10); > > long long y = strtoll(argv[2], NULL, 10); > > > > LLVMGenericValueRef args[] = > > {LLVMCreateGenericValueOfInt(LLVMInt32Type(), x, 0), > > > > LLVMCreateGenericValueOfInt(LL...
2017 Mar 08
2
LLVMGetBitcodeModuleInContext2 problem
...moryBufferWithMemoryRange, not LLVMCreateMemoryBufferWithContentsOfFile... Or do you mean I need to load the module into memory before calling LLVMGetBitcodeModuleInContext2? Toshi On Wed, Mar 8, 2017 at 3:40 PM, Friedman, Eli <efriedma at codeaurora.org> wrote: > On 3/8/2017 3:29 PM, Toshiyasu Morita via llvm-dev wrote: > >> >> I'm trying to use LLVMGetBitcodeModuleInContext2 to load a .bc file. >> However, it's not working. >> >> The code looks something like this: >> >> void llvm_load_IR_library(char *path) >> >> { >&g...
2017 Mar 08
2
LLVMGetBitcodeModuleInContext2 problem
I'm trying to use LLVMGetBitcodeModuleInContext2 to load a .bc file. However, it's not working. The code looks something like this: void llvm_load_IR_library(char *path) { LLVMContextRef global_context; LLVMMemoryBufferRef module_path; LLVMModuleRef ir_lib_module; bool flag; module_path = LLVMCreateMemoryBufferWithMemoryRange(path, strlen(path),
2017 May 02
2
LLVM module attributes question
I'm trying to find a way to get/set the module attributes as printed in a module dump: attributes #0 = { noinline nounwind uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf"
2017 Jan 25
2
mcjit C interface problems
Hi, I'm attempting to use MCJIT with the C interface with llvm-3.9.0, and it doesn't seem to work. This code is derived from Paul Smith's example code: int main(int argc, char const* argv[]) { LLVMModuleRef mod = LLVMModuleCreateWithName("my_module"); LLVMTypeRef param_types[] = {LLVMInt32Type(), LLVMInt32Type()}; LLVMTypeRef ret_type =
2017 Apr 28
2
LLVMGetFirstFunction() / LLVMGetNextFunction( ) problem
Hi, I have a problem - looking for advice. I have a source code file with two functions which are compiled into a .bc file. When the bitcode file is loaded, I can dump the module and see the two functions: ... ; Materializable ; Function Attrs: noinline nounwind uwtable define void @matmul(double*, double*, double*, i32, i32, i32) #0 {} ; Materializable ; Function Attrs: noinline nounwind