similar to: [LLVMdev] Computing live values

Displaying 20 results from an estimated 4000 matches similar to: "[LLVMdev] Computing live values"

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
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? >>>>
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.
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,
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 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 "
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
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. >
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:
2014 Sep 25
2
[LLVMdev] MachineRegisterInfo use_iterator/reg_iterator?
Hi folks, I would like to find out the machine instructions that use some given registers in the reverse order, and I came across these iterators (use_iterator/reg_iterator). However, there are two things I noticed: 1) These iterators seem to traverse the machine function a bit differently from what I get from the machine function dump. In other words, the use_iterator list is not constructed in
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; //
2013 Jan 11
3
[LLVMdev] llvm get Value* iterators
Hello everyone ! In my LLVM pass, there is `Intruction* I1`. All the used "I1"s are ICMP instructions. *I1->getOperand(0) returns a `Value*` type. From errs()<<"\n"<<*I1->getOperand(0)<<"\n"; //printed : %3 = load i32* %c, align 4 Printed as expected. But I want to use %c. Do you know how I can get %c ? I need to use the value %c in
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
2009 Apr 21
4
[LLVMdev] Iterating over all uses of a Function
Hi, I try to iterate over all uses of a Function with the following code (simplified): for (Value::use_iterator UI = F->use_begin(), UE = F->use_end(); UI != UE; ++UI) { if (CallInst* I = dyn_cast<CallInst>(*UI)) { // do something interesting } } This works on Linux, but on Windows the dyn_cast fails, even though the only use of F in that
2010 Jan 25
3
[LLVMdev] Deterministic iteration over llvm iterators
Forgot cc, the entire group. How can deterministically iterate over the uses of a variable. i.e. the uses should be any particular order that doesn't change from execution to execution of the opt tool. To make myself more clearer, here is a snippet of code that has Values reordered each time I analyze a particular piece of code(which doesn't change) with the LLVM opt tool and my LLVM