search for: getfuncinfo

Displaying 6 results from an estimated 6 matches for "getfuncinfo".

2010 Mar 19
3
[LLVMdev] Getting the DSNode from a Pool Descriptor?
...descriptors, which I by traversing the uses of poolinit and accessing the first argument of each call. I need to find the DSNode (in the original function) to which this pool descriptor corresponds. The rub is that this pool descriptor of course does not exist except in the clone. If I call getFuncInfo(), I get a NULL pointer. getFuncInfoOrClone() returns the original function's FuncInfo structure, but this function's DSNode <-> PoolDescriptor mapping will not have my pool descriptor in it because my pool descriptor only existed in the clone. I'm fine with the DSNode being...
2008 Apr 07
2
[LLVMdev] Problem Linking Analysis Group
Dear All, I'm having the following problem linking code that defines and uses an AnalysisGroup. I have an analysis group defined as follows: class PoolAllocateGroup { public: static char ID; virtual ~PoolAllocateGroup (); virtual PA::FuncInfo *getFuncInfo(Function &F); ... }; ... which is then inherited by a ModulePass: class PoolAllocate : public ModulePass , public PoolAllocateGroup { ... }; ... which is then inherited by another pass: class PoolAllocateSimple : public PoolAllocate { ... } When I compile the code into a dynamically lin...
2004 Aug 06
1
[LLVMdev] Why I cannot use PgmDependenceGraph?
...table<std::pair<llvm::Value* const, llvm::DSNodeHandle>, llv] opt(__gnu_cxx::hash_map<llvm::Value*, llvm::DSNodeHandle, __gnu_cxx::hash<llvm:] opt(llvm::DSScalarMap::find(llvm::Value*)+0x1a)[0x84a998e] opt(llvm::DSGraph::removeDeadNodes(unsigned)+0x3e1)[0x847def5] opt(llvm::IPModRef::getFuncInfo(llvm::Function const&, bool)+0xf3)[0x85db297] opt(llvm::IPModRef::run(llvm::Module&)+0xaf)[0x85db189] opt(llvm::PassManagerTraits<llvm::Module>::runPass(llvm::Pass*, llvm::Module*)+] opt(llvm::PassManagerT<llvm::Module>::runOnUnit(llvm::Module*)+0x5e4)[0x857fd5c] opt(llvm::PassM...
2010 Mar 19
0
[LLVMdev] Getting the DSNode from a Pool Descriptor?
...s the correct approach for what you are doing. If, for example, you need to know whether a pool is a type-homogeneous, then an easier method would be to modify poolinit() to pass an argument containing DSNode information (such as a flag indicating type-homogeneity). -- John T. > If I call getFuncInfo(), I get a NULL pointer. getFuncInfoOrClone() > returns the original function's FuncInfo structure, but this function's > DSNode <-> PoolDescriptor mapping will not have my pool descriptor in it > because my pool descriptor only existed in the clone. I'm fine with th...
2010 Mar 19
0
[LLVMdev] Getting the DSNode from a Pool Descriptor?
Hi Patrick, That's right. DSNodes are coupled to the original function. For function clones, you first need to get the original function, and then use the DSNode from that function. FuncInfo contains the information if a function is a clone and what the original function is. If you want to find the corresponding DSNode for some instruction, you must call PA::FuncInfo::MapValueToOriginal(
2010 Mar 19
3
[LLVMdev] Getting the DSNode from a Pool Descriptor?
Harmen, your suggestion of inverting the mapping almost worked (and Andrew was correct that the function I need is the same as the one in which poolinit appears). Unfortunately, it appears that this mapping only considers the original function and not any of its clones. Since the pool descriptor in question may very well only exist in a clone, I can't use this. Is there another way?