Arnamoy Bhattacharyya via llvm-dev
2020-Nov-19 14:22 UTC
[llvm-dev] Understanding CallInst::Create
Hello; I am working on porting a tool written for LLVM3.5 to LLVM10. There used to be a call instruction with the signature static CallInst * Create (Value *F, Value *Actual, const Twine &NameStr="", Instruction *InsertBefore=0) Can anyone please explain what it supposed to do? What was F and Actual? Thank you so much. -- Dr. Arnamoy Bhattacharyya R&D Compiler Engineer Huawei
Tim Northover via llvm-dev
2020-Nov-19 15:15 UTC
[llvm-dev] Understanding CallInst::Create
On Thu, 19 Nov 2020 at 14:24, Arnamoy Bhattacharyya via llvm-dev <llvm-dev at lists.llvm.org> wrote:> I am working on porting a tool written for LLVM3.5 to LLVM10. There > used to be a call instruction with the signature > static CallInst * Create (Value *F, Value *Actual, const Twine > &NameStr="", Instruction *InsertBefore=0) > > Can anyone please explain what it supposed to do? What was F and Actual?I can only find anything like that in revision well before even 3.5. There used to be a version with "Actual1" and "Actual2" as well so I think it's probably just the (lone) function argument to pass. As in, "I'm creating a call instruction for a function with some prototype, and here's the actual argument I want passed". Cheers. Tim.
Arnamoy Bhattacharyya via llvm-dev
2020-Nov-19 15:20 UTC
[llvm-dev] Understanding CallInst::Create
Thank you Tim. So I guess the second argument (e.g. Actual) is just the argument to function "F" So in the LLVM-10, the equivalent will be just CallInst * Create (FunctionCallee Func, ArrayRef< Value *> Args...), where I push the "Actual" argument to the ArrayRef and then create the call? On Thu, Nov 19, 2020 at 10:15 AM Tim Northover <t.p.northover at gmail.com> wrote:> > On Thu, 19 Nov 2020 at 14:24, Arnamoy Bhattacharyya via llvm-dev > <llvm-dev at lists.llvm.org> wrote: > > I am working on porting a tool written for LLVM3.5 to LLVM10. There > > used to be a call instruction with the signature > > static CallInst * Create (Value *F, Value *Actual, const Twine > > &NameStr="", Instruction *InsertBefore=0) > > > > Can anyone please explain what it supposed to do? What was F and Actual? > > I can only find anything like that in revision well before even 3.5. > There used to be a version with "Actual1" and "Actual2" as well so I > think it's probably just the (lone) function argument to pass. As in, > "I'm creating a call instruction for a function with some prototype, > and here's the actual argument I want passed". > > Cheers. > > Tim.-- Dr. Arnamoy Bhattacharyya R&D Compiler Engineer Huawei
Apparently Analagous Threads
- Understanding CallInst::Create
- Understanding CallInst::Create
- [LLVMdev] Identifying the instructions that uses a pointer used as a function argument
- [LLVMdev] "symbol lookup error" while running a Simple Loop Pass
- [LLVMdev] "symbol lookup error" while running a Simple Loop Pass