similar to: How to know the CallInst is a virtual call ?

Displaying 20 results from an estimated 6000 matches similar to: "How to know the CallInst is a virtual call ?"

2020 Jun 18
2
How to know the CallInst is a virtual call ?
So if I want to know whether a CallInst is a C++ virtual call or not. I have to get the information at frontend/Clang. and then pass the information to middle-end/LLVM IR by myself. Is it right? Thank you David Blaikie <dblaikie at gmail.com> 於 2020年6月19日 週五 上午1:26寫道: > On Thu, Jun 18, 2020 at 9:53 AM PenYiWang via llvm-dev > <llvm-dev at lists.llvm.org> wrote: > >
2020 Feb 27
3
How to set DebugLoc when using IRBuilder's CreateCall ?
Hi I want to insert some functions into the llvm bitcode ir files. So I use IRBuilder and CreateCall(). But it how error : inlinable function call in a function with debug info must have a !dbg location. I don't know what DebugLoc should I give the new CallInst to setDebugLoc. I Create this CallInst , so this CallInst doesn't hava so-called "DebugLoc" mapping to the source
2020 Mar 13
3
Why MachineBasicBlcok doesn't have transferPredecessors() ?
for example I want to insert a new machine bb “before” a specific machine bb. or split a mbb and keep the later one as the original one. (to keep the label/Blackadder's correct t) (or keep other property of mbb) so I need to transfer the original mbb's predecessor to the new mbb. Nicolai Hähnle <nhaehnle at gmail.com> 於 2020年3月13日 週五 23:57 寫道: > On Fri, Mar 13, 2020 at
2011 Dec 02
2
[LLVMdev] LLVM 3.0 - Windows - auto-importing issue with llvm::CallInst
Hi, I have just upgraded to LLVM 3.0 (nice job btw!) which I have built as a shared library on Windows using MinGW, and then use from within my Qt-based application. Upon execution, everything works perfectly (incl. the call to llvm::InitializeNativeTarget(); which used to cause problems upon exiting my application; see http://lists.cs.uiuc.edu/pipermail/llvmdev/2011-November/045597.html; in
2020 Mar 13
2
Why MachineBasicBlcok doesn't have transferPredecessors() ?
Hi I want to ask a question. (Maybe it is a trivial question.) I found that there is transferSuccessors() in MachineBasicBlcok So that when manipulating MachineBasicBlock, we can use transferSuccessors to update the CFG easily. Why there is not transferPredecessors in MachineBasicBlcok ? Thank you -------------- next part -------------- An HTML attachment was scrubbed... URL:
2011 Dec 03
0
[LLVMdev] LLVM 3.0 - Windows - auto-importing issue with llvm::CallInst
On 12/2/2011 9:09 AM, Alan Garny wrote: > > However, there is one new (minor) issue which is that when building my > application I get a warning from the linker about auto-importing > having been activated without --enable-auto-import being specified on > the command line. Indeed, for some reason, the vtable for > llvm::CallInst has to be resolved...?! This is clearly not
2020 Mar 13
2
How to simply split MachineBasicBlock ?
Hi I am developing some machine function pass. I want to split MachineBasicBlcok when I find some specific machine instruction. But I don't insert or delete any machine instruction. I just "simply" , "purely" split the MachineBasicBlcok. (So, I stole the idea from ARM64BranchRelaxation::splitBlockBeforeInstr.) This is my code : // I would pass call instruction to
2019 Apr 19
2
Question: How to access c++ vtable pointer to use as Value* in LLVM pass
Dear Mailing List, This might sound unconventional, but I am trying to access a C++ objects vtable to pass as an argument to a function call for a library function I created. Creating & inserting a function call at the correct location in LLVM is done. I have learned that C++ objects are represented as struct types. But I'm just not quite sure how to get at the vtable pointer within,
2015 Jan 31
2
[LLVMdev] debug info for llvm::IntrinsicInst ???
When trying to display and do anything with a variable of type IntrinsicInst, gdb thinks that it's an incomplete type and kind find any member functions or even display the class. (gdb) list 1337 1332 1333 // Finish off the call including any return values. 1334 return finishCall(CLI, RetVT, NumBytes); 1335 } 1336 1337 bool MipsFastISel::fastLowerIntrinsicCall(const
2010 Feb 07
3
[LLVMdev] Help with Mac OS X 10.6.2 build
Greetings, I am having trouble getting the Kaleidoscope example to build from tutorial #3 on Mac OS X 10.6.2. I didn't have too much trouble getting llvm-2.6 and llvm-gcc-frontend to build. Thanks for the help. Here are the steps I followed: Environment variables for build export LLVMOBJDIR=/opt/llvm export TARGETOPTIONS='--with-arch=nocona --with-tune=generic' export
2015 Jan 31
2
[LLVMdev] debug info for llvm::IntrinsicInst ???
Ok. I'm basically just following the model of the other fast-isel ports. On 01/30/2015 09:12 PM, David Blaikie wrote: > (I'm assuming you're building LLVM with clang, in this case?) > > Looks like IntrinsicInst is one of those "lies" in LLVM that works via > type punning that's undefined behavior in C++, so it's code that > should be fixed anyway.
2012 Jan 06
2
[LLVMdev] How to duplicate a CallInst
Hi, I have the following piece of code: %34 = fptosi float %33 to i32 %35 = call i32 @function(i32 %34) nounwind I would like of know how can I duplicate the statement %35 ? , as follows: %34 = fptosi float %33 to i32 %35 = call i32 @function(i32 %34) nounwind *%36 = **call i32 @function(i32 %34) nounwind* * * i.e, two instructions exactly equal. Using clone, results in badref. Moreover, how
2018 Mar 23
3
Change function call name in a CallInst only in certain functions
Hello, In my module I have functions: a b c f3 calls "a" f2 calls "a" f1 calls "b" I would like to modify a CallInst in the f2. Now it calls "a", but I want changed it to "c". When loop over the instructions of the f2, I can get a CallInst to be modified, then I use "setName" to changed it to "c". Problem is, since
2007 Mar 07
3
[LLVMdev] use of CallInst()
To create a new CallInst I used to call the following constructor: CallInst(Value *F, const std::vector<Value*> &Par, const std::string &Name = "", Instruction *InsertBefore = 0); However, it seems as though that constructor has been removed. I assume that I'm suppossed to use the following constructor, but I can't figure out what to pass as the Args parameter
2009 Nov 18
2
[LLVMdev] Strange error using CallInst constructor
Hi, This is probably more of a standard C++ question instead of an actual LLVM question, but here it goes anyway. I'm trying to invoke the following constructor: CallInst::CallInst(Value *Func, InputIterator ArgBegin, InputIterator ArgEnd, const Twine &NameStr, BasicBlock *InsertAtEnd); My code is: using namespace llvm; void replaceByClone(Function *f, CallInst *I){ Function *clone =
2007 Mar 07
0
[LLVMdev] use of CallInst()
On Tue, 2007-03-06 at 22:44 -0600, Ryan M. Lefever wrote: > To create a new CallInst I used to call the following constructor: > > CallInst(Value *F, const std::vector<Value*> &Par, const std::string > &Name = "", Instruction *InsertBefore = 0); > > However, it seems as though that constructor has been removed. I assume > that I'm suppossed to
2018 Mar 24
0
Change function call name in a CallInst only in certain functions
You are probably calling setName() on the called Function, which in-turned renamed the called Function instead of replacing the called function. Depending on your use-case, if you are certain that you only need to modify CallInsts, then you could simply call CallInst::setCalledFunction , otherwise it’s probably wiser to use CallSite as a wrapper for both CallInst and InvokeInst. Do note, however,
2005 Aug 24
1
[LLVMdev] CallInst constructor interface
Hi, Inserting a call instruction is a bit of a pain. The only way I know how to do it is to write a bunch of code like the following: std::vector<const Type*> formalArgs; formalArgs.push_back(arg1->getType()); formalArgs.push_back(arg2->getType()); ... formalArgs.push_back(argn->getType()); std::vector<Value*> args; args.push_back(arg1);
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