similar to: [LLVMdev] CallInst constructor interface

Displaying 20 results from an estimated 1000 matches similar to: "[LLVMdev] CallInst constructor interface"

2006 May 31
1
[LLVMdev] InstVisitor: RetType
Hi, the docs for InstVisitor say that if RetType != void, one has to override visitInstruction. What is the reason for that? It's valid to define visitInstruction like that: RetTy visitInstruction(Instruction &I) { return RetTy(); } so assuming RetTy has a sensible default constructor, user won't need to override visitInstruction. Note that the above will work when RetTy ==
2015 Aug 19
5
creating a callinst to an external function
Dear All I'm making an instrumentation pass. The pass is supposed to modify the given IR in a specefic way. One of the required modifications is to insert a call to a function at a specific location. This is the signature of the called function: void myclass::foo(Function *f, BasicBlock* b) This function's prototype is in an foofile.h file in include/llvm And the function
2012 Oct 08
1
[LLVMdev] Fwd: Multiply i8 operands promotes to i32
Hello Pedro, As others have said we're assuming that you're using Clang as the frontend, the MSP430TargetInfo class inside lib/Basic/Targets.cpp (clang codebase) set ints to be 16 bits wide, so you should get 16bit mults straight away without promotion. But anyways for 8bit multiplicantions you can do the following to bypass argument promotion: 1) go to the lib/CodeGen/TargetInfo.cpp
2009 Oct 22
1
Help regarding removing Inf from dataframe, creating new dataframe with selected variables, count function
Following is my query: 1. Removing Inf from one column of dataframe. 2. out of 10 available dates, count how many times a security is present. (repeat for each security) 3. Out of dates, the security is present, I want to read latest status of market cap. 4. Change in market cap represent by 0/1 so even if market cap status changed once, take value 1. 5. create output file containing some already
2008 May 22
3
[LLVMdev] How to get a return type of a function with LLVM-C API
Hi LLVM-ers, I am trying to get a return type of a function(from bitcode file) with LLVM-C API, but there seems no appropriate API to do that. I've tried to do that with following code, ---- LLVMModuleRef M; LLVMMemoryBufferRef MemBuf; LLVMValueRef F; // Function LLVMTypeRef RetTy; char *ErrStr; // // -- Load shader module //
2009 Sep 30
2
[LLVMdev] Can I modify C syntax by using Clang and LLVM?
I want to add command line (shell) like statement to C is it possible to implement this syntax by clang and llvm? The syntax is like func arg1 arg2 ... argn; and define func like void func( int arg1, int arg2, ..., int argn) { ...} Charlie -------------- next part -------------- An HTML attachment was scrubbed... URL:
2014 Feb 13
3
[LLVMdev] cmake/ninja build failing
Well, I updated to cmake 2.8.12.2 but the result of changing that COMPILE_FLAGS to COMPILE_OPTIONS is that quotes are applied incorrectly: quotes are added surrounding the entire set of flags rather than around each individual item in the list. Obviously the build doesn't work (with the compiler looking for files named " -m64 ... ") but checking the relevant build command in
2012 Aug 09
1
Factor moderators in metafor
I'm puzzled by the behaviour of factors in rma models, see example and comments below. I'm sure there's a simple explanation but can't see it... Thanks for any input John Hodgson ------------------------------------- code/selected output ----------------- library(metafor) ## Set up data (from Lenters et al A Meta-analysis of Asbestos and Lung Cancer... ##
2011 Dec 04
2
a weird question about gdata:::
Dear R People: If I put in: > findPerl Error: object 'findPerl' not found But if I use: > gdata:::findPerl function (perl, verbose = "FALSE") { errorMsg <- "perl executable not found. Use perl= argument to specify the correct path." if (missing(perl)) { perl = "perl" } perl = Sys.which(perl) if (perl == "" ||
2006 Nov 02
6
Multiple items in the where clause while updating...
Hi The following is a database table named friends. +-----+------+------+-------+ | sid | id | fid | ftype | +-----+------+------+-------+ | 30 | 1 | 2 | F | | 31 | 1 | 3 | R | | 32 | 3 | 2 | F | | 33 | 3 | 4 | F | +-----+------+------+-------+ I want to update the ftype field based on id and fid. I want to achive the following. Update friends
2014 Oct 27
2
[LLVMdev] How to call a pointer that points to a C function
I have a pointer to a function that I need to invoke without going through llvm::Module::getOrInsertFunction. This example does not work: static int add(int x, int y); llvm::Value *one, *two; llvm::Constant* addfn = llvm::ConstantInt::get(JB->getIntPtrTy(DataLayout), (intptr_t)add); llvm::Type* args[] = { Int32Ty, Int32Ty }; llvm::FunctionType* ftype = llvm::FunctionType::get(Int32Ty,
2011 Mar 31
3
[LLVMdev] inserting exit function into IR
Hi Joshua, I have a function foo and I want to insert exit(0) at the end of foo. The problem is M.getFunction returns null, which is understandable. I am not sure what to do. Below is the code snippet. void foo(int argc, char* argv[]) { printf("hello world\n"); exit(0); //***I want to insert this exit } My llvm code snippet is vector<const Type *> params =
2007 Aug 13
1
[LLVMdev] Suspicious code for X86 target
Hi, I found some suspicious code in X86TargetLowering::getRegClassForInlineAsmConstraint, but I don't know if it's a bug or my poor understanding of what the code does. This is the code in question: (lib/Target/X86/X86ISelLowering.cpp:5064) if (VT == MVT::i32) return make_vector<unsigned>(X86::EAX, X86::EDX, X86::ECX, X86::EBX, 0); else if (VT == MVT::i16) return
2016 Sep 03
2
How to insert instructions before each function calls?
I'm trying to insert some instructions before each function calls (before arguments push): lea %EAX, label ----- new instructions mov [ESP+stacksize], %EAX ----- new instructions push arg1 push arg2 ... push argn call callee_name I am a newbie to LLVM. I tried to use buildMI() to insert the instructions in the lowercall() function. But I couldn't
2011 Mar 31
0
[LLVMdev] inserting exit function into IR
On Thu, Mar 31, 2011 at 9:31 PM, George Baah <georgebaah at gmail.com> wrote: > Hi Joshua, >       I have a function foo and I want to insert exit(0) at the end of foo. > The problem is M.getFunction returns null, which is understandable. I am not > sure what to do. Below is the code snippet. > void foo(int argc, char* argv[]) { >   printf("hello world\n"); >
2012 Jun 19
0
[LLVMdev] Cast Pointer Address to Functions
> From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of Xin Tong > Subject: [LLVMdev] Cast Pointer Address to Functions > I have a function address held in an uint64_t. I would like to cast > the function address to a function prototype and create a call to the > function in LLVM. How could I do this ? This is what works for us:
2016 Sep 04
1
How to insert instructions before each function calls?
On Sun, Sep 4, 2016 at 7:44 AM, Ryan Taylor <ryta1203 at gmail.com> wrote: > Mehdi, > > Sorry, I misread his original post. > > So something like: > > XXXInsrtInfo *XII; // target instruction info > MachineBasicBlock::iterator MI = MachineBasicBlock(YourCallInst); > MachineBasicBlock *MBB = YourCallInst->getParent(); // basic block > location of
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) { ===> }
2013 Jul 30
0
[LLVMdev] Proposing a new 'alloca' parameter attribute to implement the Microsoft C++ ABI
How do you handle this during codegen? One problem is avoid stack changes (like spills). Another is coordinating things that are using allocas and those that are not but end up in the stack. Consider void foo(int arg1, int arg2, int arg3, ....CXXTypeWithCopyConstructor argn, int argp1...) You will need an alloca for argn, but the ABI also requires it to be next to the plain integers that
2002 Dec 20
1
smbclient and large file support
smbclient (and smbtar) in version 2.2.7a (and prior) has problems with large files (> 4GB). The following patch (against 2.2.7a) fixes all known problems with this. This code has been checked into the CVS tree in all branches as well. -- ====================================================================== Herb Lewis Silicon Graphics Networking Engineer