search for: inst_range

Displaying 4 results from an estimated 4 matches for "inst_range".

2015 Dec 22
5
Finding all pointers to functions
...is to look at all the global variables: for (auto &G : M.globals()) for (auto &V : G.operands()) if (auto F = dyn_cast<Function>(V)) Of course, instructions can also refer to functions, both as direct calls and otherwise: for (auto &F : M) { for (auto &I : inst_range(F)) { for (auto &V : I.operands()) if (auto F = dyn_cast<Function>(V)) But there are other things as well, for example it seems there is something called a personality function that can be a pointer to another function, so need to add that if (F.hasPersonalityFn()) It...
2015 Feb 09
2
[LLVMdev] DataLayout missing in isDereferenceablePointer()
Eric Christopher wrote: > How are you trying to call it? Do you have a DataLayout? In test/Analysis/ValueTracking/memory-dereferenceable.ll, just change byval to dereferenceable(8), and %dparam won't match (see lib/IR/Value.cpp:521 for the logic that is supposed to fire). How do I get it to pass? I tried introducing a target-triple and target-datalayout, but it didn't help.
2015 Dec 22
4
Finding all pointers to functions
...M.globals()) > for (auto &V : G.operands()) > if (auto F = dyn_cast<Function>(V)) > > Of course, instructions can also refer to functions, both as > direct calls and otherwise: > > for (auto &F : M) { > for (auto &I : inst_range(F)) { > for (auto &V : I.operands()) > if (auto F = dyn_cast<Function>(V)) > > But there are other things as well, for example it seems there is > something called a personality function that can be a pointer to > another function, so ne...
2015 Dec 03
3
Function attributes for LibFunc and its impact on GlobalsAA
----- Original Message ----- > From: "James Molloy via llvm-dev" <llvm-dev at lists.llvm.org> > To: "Vaivaswatha Nagaraj" <vn at compilertree.com> > Cc: "LLVM Dev" <llvm-dev at lists.llvm.org> > Sent: Thursday, December 3, 2015 4:41:46 AM > Subject: Re: [llvm-dev] Function attributes for LibFunc and its impact on GlobalsAA > >