[llvm-dev] Understanding CallInst::Create

Arnamoy Bhattacharyya via llvm-dev llvm-dev at lists.llvm.org
Thu Nov 19 07:20:57 PST 2020


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


More information about the llvm-dev mailing list