similar to: How to implement function pointer?

Displaying 20 results from an estimated 1000 matches similar to: "How to implement function pointer?"

2014 Aug 31
2
[LLVMdev] Inserting Calls to var args Functions
Hi All, I am using code similar to giri instrumentation <https://github.com/liuml07/giri> framework to insert my instrumentation code. It works for normal functions for example to insert recordInt32 function below. void recordInt32(int32_t val){ printf("%d, ", val); } I can get recodedInt32 function in my Module using getOrInsert Function. Function* RecordInt32 =
2019 Sep 19
2
Errata: The JIT tutorial
For example, the illustrate part says "ES.getMainJITDylib().setGenerator" while the full code list says "ES.getMainJITDylib().addGenerator", I guess the API is changed, the tutorial part is up to date while the full code list leaves to the old version. On Thu, Sep 19, 2019 at 10:51 AM Yafei Liu <yfliu at mobvoi.com> wrote: > Yes, the function type mismatch, just copy
2015 Mar 10
4
[LLVMdev] noob IR builder question
I am trying to get a handle on IR builder, at least some basics. I ran through a tutorial here: Create a working compiler with the LLVM framework, Part 1 <http://www.ibm.com/developerworks/library/os-createcompilerllvm1/>, and it worked well enough. I have some simple code that creates a hello world IR. I am trying to now bring in some concepts from the Kaleidoscope tutorial, namely
2019 Sep 18
2
Errata: The JIT tutorial
Hi Yafei, First 2 chapters of the tutorial is up-to-date with ORC v2 APIs. I hope nothing changed in docs and code. Did you got compilation errors? On Thu, 19 Sep 2019 at 00:47, David Blaikie via llvm-dev < llvm-dev at lists.llvm.org> wrote: > +Lang for JIT things > > On Tue, Sep 17, 2019 at 7:01 PM Yafei Liu via llvm-dev < > llvm-dev at lists.llvm.org> wrote: >
2019 Sep 18
2
(How) Can I add C standard libraries to JIT?
Hi Yafei, As david told, you can make the symbols of your host process visible to the JIT'd code through DynamicLibrarySearchGenerator::getForCurrentProcess. On Thu, 19 Sep 2019 at 00:46, David Blaikie via llvm-dev < llvm-dev at lists.llvm.org> wrote: > +Lang Hames <lhames at gmail.com> , JITer of JITs. > > I believe there's some kind of resolver you can add that
2019 Sep 18
2
EngineBuilder(std::move(Owner)).create() return null
I found a private ErrorStr member, but didn't find the get function of this member, could you tell me how I can get the error message? On Wed, Sep 18, 2019 at 4:02 PM mayuyu.io <admin at mayuyu.io> wrote: > Isn’t there a method in EngineBuilder to get the error message or > something? > I assume it’s you didn’t link in the JIT module > > Zhang > > 在
2019 Sep 19
3
"corrupted size vs. prev_size" when calling ExecutionSession::lookup()
Hi, I wrote a compiler that generate IR code and run it on the JIT, and there randomly crashed due to "corrupted size vs. prev_size" depends on the IR code generated from the source code. Here's how I created the JIT: llvm::InitializeNativeTarget(); llvm::InitializeNativeTargetAsmPrinter(); llvm::InitializeNativeTargetAsmParser(); // create jit llvm::orc::ExecutionSession
2019 Oct 21
2
(no subject)
Correct, with a couple of nit picks. Relocation isn't an optimization the collector performs.  It's a key primitive the collector is built upon.  Being unable to relocate is not an allowed state.  (i.e. pinning can't be required by the compiler) When you talk about variables, that's true for the *source* language and for the *abstract* machine before lowering.  After lowering
2019 Sep 18
2
Errata: The JIT tutorial
In the Tutorial of the JIT https://llvm.org/docs/tutorial/BuildingAJIT1.html, illustrations and the full code listing are not the same, and the full code listing will not compile, this will make a lot of trouble to beginners since the JIT API is changing all the time. -------------- next part -------------- An HTML attachment was scrubbed... URL:
2019 Sep 18
2
(How) Can I add C standard libraries to JIT?
When I declare some functions in my IR code which belongs to the C standard library(printf for example), the JIT will report that symbol cannot found. So is there any way I can add these libraries to my JIT? P.S. When I using lli, the printf will work, I guess lli is a JIT(right?) and it somehow knows where to find the symbol printf -------------- next part -------------- An HTML attachment was
2019 Oct 19
2
(no subject)
Exactly this.  (As the person who wrote the line in question.) On 10/18/19 8:50 AM, Hiroshi Yamauchi via llvm-dev wrote: > I think it's referring to a "moving" garbage collector (as opposed to > a "non-moving" garbage collector that never moves/relocates objects.) > The difference is that for a moving one, all pointers need to be > tracked and potentially
2019 Sep 18
2
EngineBuilder(std::move(Owner)).create() return null
I just copy the latest code in HowToUseJIT and run, but the EngineBuilder(std::move(Owner)).create() keeps return null, any idea why? Here's my CMakeList: cmake_minimum_required(VERSION 3.12) project(llvm_test) set(CMAKE_CXX_STANDARD 14) find_package(LLVM REQUIRED CONFIG) llvm_map_components_to_libnames(llvm_libs support core irreader orcjit native) add_executable(llvm_test main.cpp)
2003 Aug 18
1
FYI: Article on R at IBM's developerWorks Server Clinic
Hi all, I happened to be reviewing a Linux web site that I frequent (http://www.pclinuxonline.com/index.php) and noted today an entry for an article on R at IBM's developerWorks Server Clinic site located at http://www-106.ibm.com/developerworks/linux/library/l-sc16.html. I thought that I would pass this on as an FYI. Regards, Marc Schwartz
2009 May 28
3
IBM ServeRAID Manager software
Hi there, I'm in the process of installing Centos 5.2 on an IBM x236 w/ ServeRAID 7k I recently acquired to act as a samba file server. The hardware has all passed various stress tests I could throw at it so we're okay there. My question is. Has anyone had any luck getting the latest IBM ServeRAID Manager v9.0 working in CentOS? If so how? ServeRAID Manager is based off Adaptec's
2020 Jan 09
2
Is there some sort of "@llvm.thread_ctors."?
We know that in C++, the constructor of a static member will get called when the program starts up. I checked the generated IR code and found this is implemented by defining a __cxx_global_var_init() function and marked it as section ".text.startup" and assign it to @llvm.global_ctors. We also know that in C++, the constructor of a static thread_local member will *not* get called when
2019 Sep 26
2
ConstantFP->getType() is not right
Hi, I want to create a double constant from a float constant, here's my code: auto* constFloat1 = static_cast<llvm::ConstantFP*>(llvm::ConstantFP::get(llvm::Type::getFloatTy(context), 3.1)); assert(constFloat1->getType() == llvm::Type::getFloatTy(context)); auto* constFloat2 = llvm::ConstantFP::get(llvm::Type::getDoubleTy(context), constFloat1->getValueAPF());
2019 Oct 18
2
(no subject)
Hi all, I'm investigating on integrating a gc to my llvm project, and when I read this document <http://llvm.org/docs/Statepoints.html>, one sentence confused me: However, for a collector which wishes to relocate objects directly reachable from running code, a higher standard is required. I don't understand what the move "relocate objects directly reachable from running
2019 Oct 15
2
Easy way to add common pass for optimization
Hi all, I wrote a compiler front end which generates IR codes, but due to the logic, the IR codes have a lot of instructions like unnecessary br jump, basic block creation, load instructions and expression which can be simplified. now I want to use built in passes to optimize the generated code, but after I read the tutorial: https://llvm.org/docs/tutorial/MyFirstLanguageFrontend, I found that I
2007 May 25
6
IBM Article: DB2 on Rails
I often forward IBM DeveloperWorks articles about RoR to this list. This is a new well-written ''Intermediate'' article using DB2 with Rails: http://www.ibm.com/developerworks/db2/library/techarticle/dm-0705chun/ Hope this helps. Cheers Mohit. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups
2020 Jan 14
2
sizeof implementation: how to get size as a constantInt?
I'm implementing c style "sizeof()", and I did as http://nondot.org/sabre/LLVMNotes/SizeOf-OffsetOf-VariableSizedStructs.txt illuarstrated, and it works find, here's an example of my implementation: auto *p = builder.CreateGEP(structTy, llvm::ConstantPointerNull::get(pointerTy), constint1); auto *size =