search for: arg_operands

Displaying 7 results from an estimated 7 matches for "arg_operands".

2017 Mar 10
2
get function parameters (not arguments)
...n the example)? Thank you and best, Mo On Fri, Mar 10, 2017 at 4:25 PM, Tim Northover <t.p.northover at gmail.com> wrote: > On 10 March 2017 at 15:12, Mohammad Norouzi via llvm-dev > <llvm-dev at lists.llvm.org> wrote: > > for (auto& A : (cast<CallInst>(BI))->arg_operands ()) errs() << > A.dump(); > > > > but I get a and b instead. > > This sounds really weird. If you're analyzing a CallInst in main, %a > and %b shouldn't even be available. Can you show us your actual IR and > output? > > Cheers. > > Tim. > ---...
2017 Mar 10
2
get function parameters (not arguments)
I tried the original posted code again: for (auto& A : cast<CallInst>(BI)->arg_operands()) errs() << "--- " << A->getName() << "\n"; but it prints empty (only ---)! Thank you and best, Mo On Fri, Mar 10, 2017 at 4:44 PM, Tim Northover <t.p.northover at gmail.com> wrote: > On 10 March 2017 at 15:41, Mohammad Norouzi <mnmomn at...
2017 Mar 10
2
get function parameters (not arguments)
...es anyone know to get function parameters? For example, I want to get e and f in the call to function foo in the following code: foo(inr a , int b){ .... } main() { int e,f; e=10; f=22; *foo(e,f);* } I use the following code: for (auto& A : (cast<CallInst>(BI))->arg_operands ()) errs() << A.dump(); but I get a and b instead. Thank you and best -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170310/f0d2da9c/attachment.html>
2017 Mar 10
2
get function parameters (not arguments)
...memory address of e and f? can i get them? Thank you and best, Mo On Fri, Mar 10, 2017 at 5:02 PM, Tim Northover <t.p.northover at gmail.com> wrote: > On 10 March 2017 at 15:49, Mohammad Norouzi <mnmomn at gmail.com> wrote: > > for (auto& A : cast<CallInst>(BI)->arg_operands()) > > errs() << "--- " << A->getName() << "\n"; > > Ah, I see. You actually want "e" as a name. Unforuntately this isn't > possible in general for a few reasons. > > First, release builds of LLVM drop most Value names for...
2015 Jan 26
0
[LLVMdev] question about enabling cfl-aa and collecting a57 numbers
Inline George > On Jan 26, 2015, at 1:05 PM, Daniel Berlin <dberlin at dberlin.org> wrote: > > George, given that, can you just build constexpr handling (it's not as easy as you think) as a separate funciton and have it use it in the right places? Will do. :) > FWIW, my current list of CFLAA issues is: > > 1. Unknown values (results from ptrtoint, incoming
2015 Jan 26
2
[LLVMdev] question about enabling cfl-aa and collecting a57 numbers
George, given that, can you just build constexpr handling (it's not as easy as you think) as a separate funciton and have it use it in the right places? FWIW, my current list of CFLAA issues is: 1. Unknown values (results from ptrtoint, incoming pointers, etc) are not treated as unknown. These should be done through graph edge (so that they can be one way, otherwise, you will unify
2015 Jan 30
2
[LLVMdev] question about enabling cfl-aa and collecting a57 numbers
...0 +459,11 @@ public: template <typename InstT> void visitCallLikeInst(InstT &Inst) { SmallVector<Function *, 4> Targets; if (getPossibleTargets(&Inst, Targets)) { + auto InitialSize = Output.size(); if (tryInterproceduralAnalysis(Targets, &Inst, Inst.arg_operands())) return; // Cleanup from interprocedural analysis - Output.clear(); + Output.erase(Output.begin()+InitialSize, Output.end()); } for (Value *V : Inst.arg_operands()) @@ -720,6 +724,22 @@ static void argsToEdges(CFLAliasAnalysis &, Instruction *, // given...