similar to: [LLVMdev] def-use chain for Instruction

Displaying 20 results from an estimated 4000 matches similar to: "[LLVMdev] def-use chain for Instruction"

2004 Apr 23
0
[LLVMdev] subtle problem with inst_iterator
On Fri, 23 Apr 2004, Vladimir Prus wrote: > Yea, I've noticed that. However, it looks like inst_iterator is iterator over > pointers. Oh, wait a minite, that's the current code: > > inline IIty operator*() const { return BI; } > inline IIty operator->() const { return operator*(); } > > So operator* works as if value_type is Instruction*, but operator->
2004 Apr 23
2
[LLVMdev] subtle problem with inst_iterator
Chris Lattner wrote: > On Fri, 23 Apr 2004, Vladimir Prus wrote: > > and since result of *it is considered to be rvalue it can't be accepted > > by this operator. The complete discussion is in > > > > http://std.dkuug.dk/jtc1/sc22/wg21/docs/papers/2002/n1385.htm > > > > I'd suggest to apply the following patch which makes operator* return >
2010 Feb 26
0
[LLVMdev] a question of the simple constant propagation pass
Hi, I copied the code from LLVM2.6 below. line 81 removes 'I' from the worklist. But 'I' is already removed from the list at line 67 when it is popped from the list. Could the loop (line 73-75) insert this I into the worklist again? In the case where 'I' can be constant-folding, Line 80 says 'I' is a dead instruction. Can 'I' appears in its def-use chain?
2004 Apr 23
0
[LLVMdev] subtle problem with inst_iterator
On Fri, 23 Apr 2004, Vladimir Prus wrote: > and since result of *it is considered to be rvalue it can't be accepted by > this operator. The complete discussion is in > > http://std.dkuug.dk/jtc1/sc22/wg21/docs/papers/2002/n1385.htm > > I'd suggest to apply the following patch which makes operator* return > reference to pointer. It makes my code compile and the rest
2015 Sep 13
3
RFC: faster simplifyInstructionsInBlock/SimplifyInstructions pass
LLVM has two similar bits of infrastructure: a simplifyInstructionsInBlock function and a SimplifyInstructions pass, both intended to be lightweight “fix up this code without doing serious optimizations” functions, as far as I can tell. I don’t think either is used in a performance-sensitive place in-tree; the former is mostly called in minor places when doing CFG twiddling, and the latter seems
2004 Apr 27
2
[LLVMdev] subtle problem with inst_iterator
Chris Lattner wrote: > > inline IIty operator*() const { return BI; } > > inline IIty operator->() const { return operator*(); } > > > > So operator* works as if value_type is Instruction*, but operator-> works > > as if value_type is Instruction. Hmm ;-) > > Yeah, fishy huh? :) Yea, a bit. I've decided that before changing that I'd better
2004 Apr 23
2
[LLVMdev] subtle problem with inst_iterator
Hello, I think there's a rather subtle problem with the inst_iterator. It declares its iterator category as std::bidirectional_iterator_tag but C++ standard requirements for forward iterator (which are included in requirements for bidirection iterator), say that the type of expression *r; should be T&, where 'r' is the iterator and T is its value type. The inst_iterator,
2009 Sep 06
3
[LLVMdev] Graphviz and LLVM-TV
On 2009-09-06 19:57, Ioannis Nousias wrote: > Edwin, > > thank you for your effort, but I'm not sure I understand. > Are you describing a graph traversal problem? Is the data model stored > in a predecessor/successor fashion, which requires you to 'walk' the > graph in order to visit all nodes? (and what happens when you have > disjointed DFGs?). Sorry for the
2015 Jun 10
3
[LLVMdev] The use iterator not working...
Hi, I'm having a problem with the use iterator. Each "use" that I see, when using the use_iterator, is the same as the "def". Meaning, in the code below the pDef is always equal to pUse pointer for every instruction in all basic blocks (except terminators). for (auto i = inst_begin(f), ie = inst_end(f); i != ie; ++i) Instruction* pDef =
2009 Sep 07
0
[LLVMdev] Graphviz and LLVM-TV
Edwin, thanks, it starts making sense inline comments... Török Edwin wrote: > On 2009-09-06 19:57, Ioannis Nousias wrote: > >> Edwin, >> >> thank you for your effort, but I'm not sure I understand. >> Are you describing a graph traversal problem? Is the data model stored >> in a predecessor/successor fashion, which requires you to 'walk' the
2015 Jun 10
4
[LLVMdev] The use iterator not working...
Thanks Dan and Jon. I made an incorrect assumption that the "use" iterator was actually giving me the "user" when de-referencing it. Did it always have this behavior in previous LLVM versions? I've seen lots of examples of the "use" iterator being dereferenced and resulting Instruction pointer being treated as the "user"? Thanks, Zack On Tue, Jun 9,
2009 Sep 06
2
[LLVMdev] Graphviz and LLVM-TV
On 2009-09-06 17:30, Ioannis Nousias wrote: > I've tried to write a DFGPrinter based on the CFGPrinter, as you > suggested, but encountered problems. > > The GraphWriter expects > GraphTraits<GraphType>::nodes_begin()/nodes_end(). The way this is > implemented in CFG.h, a function is a graph of basic blocks. A > GraphTraits<Function*> inherits from
2009 Sep 06
0
[LLVMdev] Graphviz and LLVM-TV
Edwin, thank you for your effort, but I'm not sure I understand. Are you describing a graph traversal problem? Is the data model stored in a predecessor/successor fashion, which requires you to 'walk' the graph in order to visit all nodes? (and what happens when you have disjointed DFGs?). inline comments follow... Török Edwin wrote: > On 2009-09-06 17:30, Ioannis Nousias
2009 Jun 24
3
[LLVMdev] Replacing instruction in LLVM IR by an intrinsics
Hi everyone, I am trying to write a pass, that finds some instructions and replaces them with my intrinsics, but I am having problem understanding, how this should be done. Let's say I have this instruction: %tmp14 = load i32* getelementptr ([32 x i32]* @gpregs, i32 0, i64 28) and i need to read the load's operands and replace it by let's say: %tmp14 = call i32
2015 Jun 10
2
[LLVMdev] The use iterator not working...
It appears dereferencing the use iterator returned the "user" in older LLVM versions. See the following commit to Use.h. You can see that the intention is to return the "user". So this is not the behavior anymore. https://github.com/llvm-mirror/llvm/commit/d1fe495464e4abc384565813cbf1cb8b130e5a6d - // Retrieve a pointer to the current User.- UserTy *operator*() const {-
2010 Sep 23
2
[LLVMdev] Finding all values derived from a function argument
Hello! I am trying to retrieve all instructions from a function's body that are dependent on a specific argument. The strategy I am currently using for that is to follow all uses of the argument and record them. Also, whenever I encounter a store of a dependent value, I try to find loads in the function that are dependent on that store and resume use-tracking from there. For this purpose I am
2010 Nov 24
2
[LLVMdev] how to eliminate dead infinite loops?
On 11/24/2010 03:36 PM, Nick Lewycky wrote: > Andrew Clinton wrote: >> Most of my programs contain loops that the LoopDeletion pass is unable >> to remove. It appears that the following code in LoopDeletion.cpp:152 >> is the culprit: >> >> ScalarEvolution& SE = getAnalysis<ScalarEvolution>(); >> const SCEV *S =
2010 Nov 24
0
[LLVMdev] how to eliminate dead infinite loops?
Andrew Clinton wrote: > Most of my programs contain loops that the LoopDeletion pass is unable > to remove. It appears that the following code in LoopDeletion.cpp:152 > is the culprit: > > ScalarEvolution& SE = getAnalysis<ScalarEvolution>(); > const SCEV *S = SE.getMaxBackedgeTakenCount(L); > if (isa<SCEVCouldNotCompute>(S)) > return
2009 Jun 25
0
[LLVMdev] Replacing instruction in LLVM IR by an intrinsics
On Thu, Jun 25, 2009 at 12:32 AM, ihusar<ihusar at fit.vutbr.cz> wrote: >                //now i need to create an instruction that represents a call to a intrinsic >                Function* FIntr = Intrinsic::getDeclaration(&M, Intrinsic::regread_i32); > >                // here it fails: void llvm::CallInst::init(llvm::Value*): >                //Assertion
2011 Aug 29
4
[LLVMdev] insertions with inst_iterators?
I am looping through all instructions in a Function and depending on what I found I may or may not insert code. Despite the fact that I'm only actually inserting *before* instruction I have a infinite loop when I do something like below. For awhile it was simple enough to just increment i enough times but now I need something better. for(inst_iterator i = inst_begin(F); i != inst_end(F); ++i)