similar to: [LLVMdev] How to duplicate a function?

Displaying 20 results from an estimated 800 matches similar to: "[LLVMdev] How to duplicate a function?"

2011 Sep 16
2
[LLVMdev] How to duplicate a function?
Hi all, Sorry for the inconvenient about the previous post. The files were not attached. So I put them here again. I am a newbie in LLVM and I am trying to replace the function like: old function || new function ============================== ========= int haha(int a) { int haha(int a, char* ID) { ===> }
2008 Sep 13
3
[LLVMdev] Duplicate Function with duplicated Arguments
I'm now writing a pass and I wanna ask a question about how to duplicate the function and add duplicated arguments in llvm, for example: func(int a, char *b) -> func(int a, char *b, int a1, char *b1) I'm now stuck at using "getOrInsertFunction" and how to handle "getArgumentList", please share your opinion, thanks a lot! James
2012 Jul 26
1
[LLVMdev] Calling a function with bad signature, possible bug.
Hello, I'm having troubles with writing a pass. In my pass I've have created a function that has two parameters - both of type i8*. Initially I wrote this function in C, that I translated it into IR, and then by using llc -march=cpp I got it's implementation in cpp code that actually inserts IR instructions. Then, I inserted this cpp code in my pass. And in some places of a program
2014 May 18
1
[PATCH 1/2] nv50/ir: fix s32 x s32 -> high s32 multiply logic
Retrieving the high 32 bits of a signed multiply is rather annoying. It appears that the simplest way to do this is to compute the absolute value of the arguments, and perform a u32 x u32 -> u64 operation. If the arguments' signs differ, then negate the result. Since there is no u64 support in the cvt instruction, we have the perform the 2's complement negation "by hand".
2013 Feb 25
2
[LLVMdev] Queries regarding function's arguments data type
Hi all, I am working on my Master's project in security and I am trying to iterate over the argument list of the function. Basically I need to do following things : 1. Check data type of each argument of the argument list of the function. 2. Based on its data type like character array or integer array, pointer, int, char, take different action. 3. I have added following code to check its
2013 Feb 25
0
[LLVMdev] Queries regarding function's arguments data type
On 2/25/13 1:44 PM, teja tamboli wrote: > Hi all, > > I am working on my Master's project in security and I am trying to > iterate over the argument list of the function. Basically I need to do > following things : Interesting. Just out of curiosity, can you tell us what your project is about? > > 1. Check data type of each argument of the argument list of the
2006 Sep 02
0
[LLVMdev] gfortran calling convention
On Fri, 1 Sep 2006, Michael McCracken wrote: > Here's what works now, and I have a separate test case for each of these: > > statement functions > intrinsic functions (print, cos, etc) > loops, goto statments > scalarized array operations > function calls with *no arguments* > simple common blocks Great! > Function calls with more than one argument don't work.
2008 Feb 05
1
[LLVMdev] Problem Building llvm-gcc 4.2
Dear All, I'm getting the following error building mainline llvm-gcc 4.2 (LLVM and llvm-gcc are up to date): cc1: /home/vadve/criswell/src/llvm22/lib/VMCore/Instructions.cpp:290: void llvm::CallInst::init(llvm::Value*, llvm::Value*): Assertion `(FTy->getNumParams() == 1 || (FTy->isVarArg() && FTy->getNumParams() == 0)) && "Calling a function with bad
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
2010 Sep 21
1
reshape is re-ordering my variables
Is it an undocumented (at least I missed it if it's documented) feature of the reshape function to do numeric variables followed by character? I ask because that seems to be the case below. > str(rcw) 'data.frame': 23 obs. of 21 variables: $ ICU : int 1 18 17 9 22 19 6 16 25 26 ... $ Q6.RC.1 : chr "SM" "JF" "IW"
2010 Oct 06
3
[LLVMdev] dragonegg vs -ffast-math?
On Wed, Oct 06, 2010 at 02:26:35PM +0200, Duncan Sands wrote: > Hi Jack, > > > I am finding that llvm 2.8 rc3 with dragonegg svn built against current > > gcc-4_5-branch doesn't appear to allow gfortran to use -ffast-math. Attempting > > to compile code using the dragonegg plugin under gcc 4.5.2 with that option produces the error... > > > > f951:
2013 Jan 03
2
[LLVMdev] Opt error
Hi Team, I am migrating one of the Pass that was written for llvm2.2 or older to llvm3.1. The code snippet looks like the following: Constant *func; void add( Module *M) { func = M->getOrInsertFunction("func", Type::getVoidTy(M->getContext()), NULL); } virtual bool runOnModule(Module &M) { add (&M); for(Module::iterator F = M.begin(), E = M.end(); F !=
2013 Jan 03
0
[LLVMdev] Opt error
Hi Ahmad, On 03/01/13 16:26, Hassan, Ahmad wrote: > Hi Team, > > I am migrating one of the Pass that was written for llvm2.2 or older to llvm3.1. > The code snippet looks like the following: > > Constant *func; > > void add( Module *M) { > > func = M->getOrInsertFunction("func", Type::getVoidTy(M->getContext()), NULL); this function has no
2006 Sep 02
2
[LLVMdev] gfortran calling convention
The NIST F77 test suite doesn't seem to be compatible with gfortran at all, so I had to work from my own sample codes, and generate test cases from them. Here's what works now, and I have a separate test case for each of these: statement functions intrinsic functions (print, cos, etc) loops, goto statments scalarized array operations function calls with *no arguments* simple common
2009 Oct 27
3
[LLVMdev] llvmgcc ToT broken
The first buildbot failure I can readily find was Monday, 26oct2009 around 7PM PDT. The assertion is Assertion failed: ((i >= FTy->getNumParams() || FTy->getParamType(i) == Params[i]->getType()) && "Calling a function with a bad signature!"), function init, file /Volumes/Sandbox/Buildbot/llvm/
2009 Sep 06
3
[LLVMdev] Equivalent types
Hi! I have this error while building my code: Assertion failed: ((i >= FTy->getNumParams() || FTy->getParamType(i) == Params[i]->getType()) && "Calling a function with a bad signature!") Actually I'm trying to load functions from .bc file and use them in the code that I'm building with IRBuilder. I found that function parameter type is %struct.reValue* and
2010 Aug 10
2
[LLVMdev] Patch to fix BrainF runtime assertion failure
Hi all, I downloaded LLVM to play with today and found that the BrainF example compiler fails with an assertion error like so: examples$ ./BrainF -jit /tmp/test.bf BrainF: Instructions.cpp:242: void llvm::CallInst::init(llvm::Value*, llvm::Value* const*, unsigned int): Assertion `(NumParams == FTy->getNumParams() || (FTy->isVarArg() && NumParams > FTy->getNumParams()))
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())
2010 May 17
3
[LLVMdev] Is this value an integer type?
Hello, I have a problem of dumping a value. Here is the llvm assembly code: --- %322 = getelementptr inbounds [76 x [4 x i8]]* @i_tc0_table, i32 0, i32 %305, i32 %321 ; <i8*> [#uses=1] %323 = load i8* %322, align 1 ; <i8> [#uses=1] store i8 %323, i8* %89, align 1 -- I want to dump %323 to a library function whose prototype is: recordStore(const char*, unsigned
2009 Oct 27
0
[LLVMdev] llvmgcc ToT broken
On Oct 27, 2009, at 11:23 AMPDT, Stuart Hastings wrote: > The first buildbot failure I can readily find was Monday, 26oct2009 > around 7PM PDT. The assertion is > > Assertion failed: ((i >= FTy->getNumParams() || FTy->getParamType(i) > == Params[i]->getType()) && "Calling a function with a bad > signature!"), function init, file