Abid Malik via llvm-dev
2020-Jan-23 19:02 UTC
[llvm-dev] Replacing operands in a call instruction
Hello, I am trying to replace a pointer argument of a call instruction with another pointer argument( new argument value for the call instruction). What is the best way to do it? I could not find any hint/guidance on the web or LLVM manual. Thanks, -- Abid M. Malik ****************************************************** "I have learned silence from the talkative, toleration from the intolerant, and kindness from the unkind"---Gibran "Success is not for the chosen few, but for the few who choose" --- John Maxwell "Being a good person does not depend on your religion or status in life, your race or skin color, political views or culture. IT DEPENDS ON HOW GOOD YOU TREAT OTHERS"--- Abid "The Universe is talking to us, and the language of the Universe is mathematics."----Abid -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200123/4e7a63f8/attachment.html>
Tim Northover via llvm-dev
2020-Jan-23 20:32 UTC
[llvm-dev] Replacing operands in a call instruction
Hi Abid, On Thu, 23 Jan 2020 at 19:03, Abid Malik via llvm-dev <llvm-dev at lists.llvm.org> wrote:> I am trying to replace a pointer argument of a call instruction with another pointer argument( new argument value for the call instruction). What is the best way to do it? I could not find any hint/guidance on the web or LLVM manual.You probably want CallBase::setArgOperand. You have to make sure the types are the same of course, changing the type of an entity in LLVM is substantially more involved. Cheers. Tim.
Abid Malik via llvm-dev
2020-Jan-24 14:38 UTC
[llvm-dev] Replacing operands in a call instruction
Thanks! On Thu, Jan 23, 2020 at 3:32 PM Tim Northover <t.p.northover at gmail.com> wrote:> Hi Abid, > > On Thu, 23 Jan 2020 at 19:03, Abid Malik via llvm-dev > <llvm-dev at lists.llvm.org> wrote: > > I am trying to replace a pointer argument of a call instruction with > another pointer argument( new argument value for the call instruction). > What is the best way to do it? I could not find any hint/guidance on the > web or LLVM manual. > > You probably want CallBase::setArgOperand. You have to make sure the > types are the same of course, changing the type of an entity in LLVM > is substantially more involved. > > Cheers. > > Tim. >-- Abid M. Malik ****************************************************** "I have learned silence from the talkative, toleration from the intolerant, and kindness from the unkind"---Gibran "Success is not for the chosen few, but for the few who choose" --- John Maxwell "Being a good person does not depend on your religion or status in life, your race or skin color, political views or culture. IT DEPENDS ON HOW GOOD YOU TREAT OTHERS"--- Abid "The Universe is talking to us, and the language of the Universe is mathematics."----Abid -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200124/879c941c/attachment.html>