similar to: [LLVMdev] Extracting the global variables accessed by individual function with function pass

Displaying 20 results from an estimated 7000 matches similar to: "[LLVMdev] Extracting the global variables accessed by individual function with function pass"

2013 Sep 06
1
[LLVMdev] Extracting the global variables accessed by individual function with function pass
On 9/2/13 6:15 AM, Duncan Sands wrote: > Hi, > >> Is there a way to dump the global variables, which are accessed >> (read/written >> to) by each function within the LLVM function pass? >> Any pointers on how that info can be extracted in LLVM for each >> function in the >> application? > > you will have to write your own pass to do this. For each
2013 Sep 02
0
[LLVMdev] Extracting the global variables accessed by individual function with function pass
Hi, > Is there a way to dump the global variables, which are accessed (read/written > to) by each function within the LLVM function pass? > Any pointers on how that info can be extracted in LLVM for each function in the > application? you will have to write your own pass to do this. For each global, visit each of its uses (via use_begin, use_end). If the use is a constant
2005 May 11
3
[LLVMdev] Computing live values
Say I want to find all LLVM Value*-es that a live on exit from a basic block. What's the best way? - The 'LiveRange', 'LiveVariables' and 'LiveIntervals' classes seem to be tied to register allocation. - The ./lib/Target/SparcV9/LiveVar/FunctionLiveVarInfo.h file seem to provide what I need, but it's no a public header. - Volodya
2007 Jul 12
2
[LLVMdev] BasicCallGraph patch
The current BasicCallGraph will miss call sites like this: %tmp86 = call i8* (...)* bitcast (i8* ()* @find_ispell to i8* (...)*)( ) ; <i8*> [#uses=1] Here the direct user of @find_ispell is a ConstantExpr. I added several lines of code to address this case. Below is the output of command: svn diff lib/Analysis/IPA/CallGraph.cpp Attached is LLVM asm files with such function calls.
2005 May 11
1
[LLVMdev] Computing live values
On Wed, 11 May 2005, Alkis Evlogimenos wrote: > On Wed, 2005-05-11 at 13:17 -0500, Chris Lattner wrote: >> On Wed, 11 May 2005, Vladimir Prus wrote: >>> Say I want to find all LLVM Value*-es that a live on exit from a basic block. >>> What's the best way? >>> >>> - The 'LiveRange', 'LiveVariables' and 'LiveIntervals' classes
2009 May 30
4
[LLVMdev] Value liveout (uses)
Hi, How can i know, if a value have uses outside of the current basic block (liveout), without iterating through all the basic block ? Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090530/71681bc2/attachment.html>
2009 Jul 17
2
[LLVMdev] Bug in LiveIntervals? Please Examine
In LiveIntervals::processImplicitDefs() we have this: for (MachineRegisterInfo::use_iterator UI = mri_->use_begin(Reg), UE = mri_->use_end(); UI != UE; ) { MachineOperand &RMO = UI.getOperand(); MachineInstr *RMI = &*UI; ++UI; MachineBasicBlock *RMBB = RMI->getParent(); if (RMBB == MBB) continue; const
2007 Jul 17
0
[LLVMdev] BasicCallGraph patch
On Thu, 12 Jul 2007, Zhongxing Xu wrote: > The current BasicCallGraph will miss call sites like this: > %tmp86 = call i8* (...)* bitcast (i8* ()* @find_ispell to i8* (...)*)( ) > ; <i8*> [#uses=1] > > Here the direct user of @find_ispell is a ConstantExpr. > I added several lines of code to address this case. > Below is the output of command: svn diff
2007 Jul 17
2
[LLVMdev] BasicCallGraph patch
I am doing inter-procedural static analysis, so I need to do DFS of call graph. llvm-gcc sometimes generates this kind of call instruction, which cause the call graph to be incomplete. But thanks for your information, instcombine really solves the problem. On 7/17/07, Chris Lattner <sabre at nondot.org> wrote: > > On Thu, 12 Jul 2007, Zhongxing Xu wrote: > > The current
2009 May 30
0
[LLVMdev] Value liveout (uses)
On May 29, 2009, at 11:37 PM, Rotem Varon wrote: > How can i know, if a value have uses outside of the current basic > block (liveout), without iterating through all the basic block ? If the value is created within the basic block in question, and the block doesn't loop to itself, then you can just iterate through the uses and note if the use is an instruction in a different
2009 May 30
4
[LLVMdev] Value liveout (uses)
Thank you. Is it possible to determine the liveout of the operands (see example bellow) ? %5 = add i32 %4, %3 For '%5': i can simply use " i->isUsedOutsideOfBlock() " For '%3' and '%4' : this is the question ... >From your answer, is it possible to determine *which* value is liveout ( in binary instruction)? On Sat, May 30, 2009 at 2:57 AM,
2005 May 12
0
[LLVMdev] Computing live values
On May 11, 2005, at 3:03 PM, Chris Lattner wrote: > On Wed, 11 May 2005, Alkis Evlogimenos wrote: >> On Wed, 2005-05-11 at 13:17 -0500, Chris Lattner wrote: >>> On Wed, 11 May 2005, Vladimir Prus wrote: >>>> Say I want to find all LLVM Value*-es that a live on exit from a >>>> basic block. >>>> What's the best way? >>>>
2009 May 30
0
[LLVMdev] Value liveout (uses)
I believe Dan has added a pass to compute livein / liveout values. Evan Sent from my iPhone On May 30, 2009, at 5:03 AM, Rotem Varon <varonrotem at gmail.com> wrote: > Thank you. > > Is it possible to determine the liveout of the operands (see example > bellow) ? > > %5 = add i32 %4, %3 > > For '%5': i can simply use "
2011 Feb 01
3
[LLVMdev] Loop simplification
On Feb 1, 2011, at 1:34 PM, Andrew Trick wrote: > On Feb 1, 2011, at 1:08 PM, Andrew Clinton wrote: > >> I have a (non-entry) basic block that contains only PHI nodes and an >> unconditional branch (that does not branch to itself). Is it always >> possible to merge this block with it's successor and produce a >> semantically equivalent program? I'm
2009 May 31
1
[LLVMdev] Value liveout (uses)
The pass you're referring to is in include/llvm/Analysis/LiveValues.h and lib/Analysis/LiveValues.cpp. It computes conservative approximations for specific liveness queries, rather than full livein/liveout information. It's intended to be used as a heuristic. Dan On May 30, 2009, at 3:51 PM, Evan Cheng wrote: > I believe Dan has added a pass to compute livein / liveout values. >
2009 Jul 17
0
[LLVMdev] Bug in LiveIntervals? Please Examine
On Jul 17, 2009, at 7:57 AM, David Greene wrote: > In LiveIntervals::processImplicitDefs() we have this: > > for (MachineRegisterInfo::use_iterator UI = mri_->use_begin(Reg), > UE = mri_->use_end(); UI != UE; ) { > MachineOperand &RMO = UI.getOperand(); > MachineInstr *RMI = &*UI; > ++UI; > MachineBasicBlock *RMBB
2008 Dec 05
1
[LLVMdev] replacing a global variable by a constant
Thanks a lot for your help Matthijs! :) basically this does the job quite nicely I think: for (llvm::GlobalVariable::use_iterator U = gv->use_begin(); U != gv->use_end(); ++U) { llvm::Instruction *I = llvm::cast<llvm::Instruction>(U); I->replaceAllUsesWith(constPtr); I->eraseFromParent(); } Cheers, Ralf Matthijs Kooijman wrote: > Hi Ralf, > > >> I
2011 Dec 09
1
[LLVMdev] Finding the uses of a global variable
Hi everyone, I am writing a pass that finds all uses of global variables (my goal is to find the uses of strings, and strings are defined as global variables). So, I can iterate over global vars by for(Module::global_iterator gi = M.global_begin(), gend = M.global_end(); gi != gend; ++gi) ...... But if I use its def-use chain for(Value::use_iterator i = gi->use_begin(), e = F->use_end; i!=e;
2011 Feb 01
0
[LLVMdev] Loop simplification
Here's what I've got so far - it seems to work, aside from the fact that DeleteDeadPHIs is not removing at least one dead PHI in my test program. --------------------- static bool mergeBlockIntoSuccessor(BasicBlock *pred, BasicBlock *succ) { if (succ == pred) return false; if (pred->getFirstNonPHI() != pred->getTerminator()) return false; //
2011 Jul 13
1
[LLVMdev] Confusion with GetElementPtr and Defs/Uses
Hello, I've been hung up on some issues for several weeks now, and some of them seem to stem from GetElementPtr instructions. Say we have a Definition: *%29 = getelementptr inbounds [10 x i32]* @c, i32 0, i32 %28* Now, I'd like to see the uses of that definition. In my code, I do this twice, in slightly different ways. This first method works and shows instructions that use %29: