similar to: [LLVMdev] How to create a CallInst that calls a standard c function like "printf"

Displaying 20 results from an estimated 400 matches similar to: "[LLVMdev] How to create a CallInst that calls a standard c function like "printf""

2010 Jan 21
0
[LLVMdev] How to create a CallInst that calls a standard c function like "printf"
SOS!!! It is really an emergency problem for me to resolve, if anyone knows the answer, please let me know, I will appreciate it, thank you very much! Mary_nju wrote: > > > I am working on a program based on LLVM. I want to modify the .bc file > throught C++ APIs provided by LLVM, but I don't know how to create a > CallInst that calls a standard c function like
2013 Nov 19
1
[LLVMdev] [lld] process undefined atoms from shared library only once
Hi Rui, I thought about this, but there is a catch. The undefined symbols still need to be resolved with exports from dynamic libraries even the second time, or any number of times. For example :- ld 1.o --start-group libc.so myprintf.a --end-group 1.o has a undef for myprintf, which is in myprintf.a and myprintf.a calls puts. The first time when libc.so, undef atoms would be added, no
2013 Nov 19
0
[LLVMdev] [lld] process undefined atoms from shared library only once
I'd do that with the nextFile abstraction like this: On the first iteration, a Group would return its member every time getNextFile() is called (the same as the current behavior). On the second and further iterations, the Group should skip all the members whose type is not Archive. By doing this, the core linker sees dynamic libraries (or regular object files) only once even if they are in
2013 Nov 19
2
[LLVMdev] [lld] process undefined atoms from shared library only once
Hi Nick, --start-group/--end-group functionality with the Gnu flavor currently works only if the --start-group/--end-group contains archive files. If they contain dynamic libraries, the undefined atoms from the dynamic libraries are processed whenever the group is iterated again. I am trying to find out a way to make the resolver add undefined atoms from the shared library only *once*, when
2006 Apr 03
1
Asterisk compiling problems...
Hello all, I just got the latest cvs snapshot and I'm trying to compile asterisk.. When I run nefeli:/usr/src/asterisk/zaptel# make clean; make linux26 Compile stops with errors... /usr/src/asterisk/zaptel/zaptel.c:6509: warning: passing argument 2 of 'class_device_create' makes pointer from integer without a cast /usr/src/asterisk/zaptel/zaptel.c:6509: warning: passing argument 3
2011 Jun 06
2
[LLVMdev] Understanding resolving external/built-in function references
Hi, I'm new to LLVM, so I hope my question is well-formed. Given a printf("Hello World") program saved as bitcode, I'm attempting to understand how LLVM resolves links to built-in functions like printf() when the bitcode is loaded. I'm supposing something along the lines of a Linker::ItemList may exist somewhere which provides names and addresses of built-in functions(?)
2019 May 25
3
llvm pass
Hi list, I have several questions about LLVM pass. 1) Is building a custom LLVM pass out-of-source not recommended? The official document only contains instructions about in-source build (http://llvm.org/docs/WritingAnLLVMPass.html <http://llvm.org/docs/WritingAnLLVMPass.html>). 2) opt (ver >= 4) with custom pass libraries does not work as before. When I have a simple custom LLVM pass
2006 Oct 31
2
[LLVMdev] callinst vs. invokeinst
What is the difference between a CallInst and an InvokeInst in LLVM? Is an InvokeInst a CallInst that can throw an exception? Thanks, Ryan
2007 Apr 17
1
[LLVMdev] Instantiating the new Instructions from CallInst Class
Hello All, I'm developing timing analysis tool using LLVM. After several analysis phases, I want to instantiate several instructions in the basic block. Instructions that I try to instantiate are like below; call void (int)* %waitABC(int 10) %tmp = call int (int, int*)* %doABC(int %i, int* %total) I think I should use 'CallInst' class in 'Instructions.h' file. How I could
2007 Jul 12
1
[LLVMdev] CallInst API Changes Ready [was: Re: llvm-gcc-4-2 development branch is open]
On Jul 11, 2007, at 4:55 PM, David Greene wrote: > On Wednesday 11 July 2007 17:03, Devang Patel wrote: >> Hi All, >> >> llvm-gcc-4-2 development branch is now open for development at >> >> llvm.org/svn/llvm-project/llvm-gcc-4-2 >> >> It is not yet ready, it can not even bootstrap. I welcome LLVM >> developers to test and apply fixes! > >
2007 Jul 12
0
[LLVMdev] CallInst API Changes Ready
Reid, when gcc-4.0 lands, please send around the svn switch --relocate OLDURL NEWURL magic incantation. Just a reminder :-) Thanks, Gabor
2007 Jul 18
0
[LLVMdev] CallInst API Changes Ready [was: Re: llvm-gcc-4-2 development branch is open]
On Mon, 16 Jul 2007, David Greene wrote: >> I can send an llvm-gcc patch for someone to apply, or if the current >> llvm-gcc is going to be put under subversion soon I can wait for that and >> commit the changes myself. Either way, we will want the CallInst and >> llvm-gcc changes to happen as close together in time as possible to >> minimize the chance of disrupting
2008 Apr 19
0
[LLVMdev] CodeGen fails for CallInst with label
On Apr 19, 2008, at 1:30 AM, Edward Lee wrote: > It seems like LLVM happily creates function calls that pass in labels > but doesn't know how to emit them. Yep, this isn't supported. We can't quite enforce it as invalid at this moment, but don't expect it to work. The only think you can do with labels is branch/switch/invoke to them and use them as the block operand
2008 Apr 19
0
[LLVMdev] CodeGen fails for CallInst with label
On Apr 19, 2008, at 12:04 PM, Edward Lee wrote: > On Sat, Apr 19, 2008 at 1:27 PM, Chris Lattner <sabre at nondot.org> > wrote: >> On Apr 19, 2008, at 1:30 AM, Edward Lee wrote: >>> It seems like LLVM happily creates function calls that pass in >>> labels >>> but doesn't know how to emit them. >> Yep, this isn't supported. We
2008 Apr 19
0
[LLVMdev] CodeGen fails for CallInst with label
On Apr 19, 2008, at 1:30 PM, Edward Lee wrote: > On Sat, Apr 19, 2008 at 2:16 PM, Chris Lattner <sabre at nondot.org> > wrote: >> No. The reason we don't allow this is because it violates the CFG. > So if I *don't* violate the CFG, would I still need to do something > close to "big and nasty"? It sounds like you're doing something STM like, have
2008 Apr 19
1
[LLVMdev] CodeGen fails for CallInst with label
On Sat, Apr 19, 2008 at 3:44 PM, Chris Lattner <sabre at nondot.org> wrote: > It sounds like you're doing something STM like, have you contacted > Torvald to see if he has ideas or insight? > http://llvm.org/pubs/2008-02-23-TRANSACT-TangerObjBased.html Yeah, this is TM-like with the begin/end/abort+rollback. Thanks for the pointer, but it seems like Tanger's
2008 Oct 08
1
[LLVMdev] How can I create CallInst with a pointer to function
Hi I mean when I have in my program pointer to a function how should I build IR to call the function by the pointer? Or how can I create llvm::Function with a pointer to a function? I want to have something like this: int factorial (int n) { return n==0 ? 1 : n*factorial(n-1); } typedef int (*intFunc) (int); intFunc fptr = factorial; Value * N = ConstantInt::get(Type::Int32Ty,10);
2009 Oct 16
0
[LLVMdev] MallocInst/CallInst bitcast,
Never mind, I used ExecutionEngine's InstallLazyFunctionCreator and DisableSymbolSearching to cause malloc and free calls to be handled by my logging functions. Sorry for the unnecessary list mail. Is it possible to find out the size and beginning pointer of the current stack frame, from a function operating outside of the virtual machine, but called by a function within it? Thanks, Daniel
2009 Oct 16
1
[LLVMdev] MallocInst/CallInst bitcast,
Daniel Waterworth skrev: > Thanks very much. I only have one more question, (hopefully), which > is, is there a better way of finding the direction of stack growth > other than: > > static bool StackCmp(void *ptr) { > volatile int a; > return (void *)&a > ptr; > } > > bool FindStackDirection() { > volatile int a; > return StackCmp((void
2010 Apr 28
1
[LLVMdev] Constructing a varargs CallInst
I'm trying to use CallInst::Create to construct a call to a variadic function, and I'm running into the following assertion failure: /localhome/simmon12/workspace/llvm-sources/lib/VMCore/Instructions.cpp:297: void llvm::CallInst::init(llvm::Value*, llvm::Value* const*, unsigned int): Assertion `(i >= FTy->getNumParams() || FTy->getParamType(i) == Params[i]->getType())