Displaying 20 results from an estimated 1000 matches similar to: "[LLVMdev] subtle problem with inst_iterator"
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
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
>
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 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
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
0
[LLVMdev] subtle problem with inst_iterator
On Tue, 27 Apr 2004, Vladimir Prus wrote:
> > Yeah, fishy huh? :)
>
> Yea, a bit. I've decided that before changing that I'd better find other
> problems, if any, so I run inst_iterator via checks provided by
> Boost.Iterators.
>
> First problem is that inst_iterator (and actually InstIterator class template)
> is not Assignable, because it has a reference data
2011 May 07
1
[LLVMdev] def-use chain for Instruction
Hello all,
I am a LLVM newer who want to obtain the use-def chain for all instruction
of a sample code, for this purpose i use the following code.
///////////////sample code://///////////////////////
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
#define ARRAY_SIZE 5
int main() {
int x, y, holder;
int k,z,f,i;
z=0;
f=0;
k=0;
for(x = 0; x < ARRAY_SIZE;
2015 Jun 15
2
[LLVMdev] Program order in inst_iterator?
On Mon, Jun 15, 2015 at 10:50 AM, mats petersson <mats at planetcatfish.com> wrote:
> It will iterate over the instructions in the order that they are stored in
> the module/function/basicblock that they belong to. And that SHOULD,
> assuming llvm-dis does what it is expected to do, be the same order.
>
Thanks for the reply. What about instruction ordering across basic
blocks?
2015 Jun 16
2
[LLVMdev] Program order in inst_iterator?
On 6/16/15 1:09 AM, Nick Lewycky wrote:
> Anirudh Sivaraman wrote:
>> On Mon, Jun 15, 2015 at 10:50 AM, mats
>> petersson<mats at planetcatfish.com> wrote:
>>> It will iterate over the instructions in the order that they are
>>> stored in
>>> the module/function/basicblock that they belong to. And that SHOULD,
>>> assuming llvm-dis does
2015 Jun 15
2
[LLVMdev] Program order in inst_iterator?
Does inst_iterator
(http://llvm.org/docs/ProgrammersManual.html#iterating-over-the-instruction-in-a-function)
guarantee that the iterated instructions are in program order: the
order of instructions printed by llvm-dis?
Thanks in advance,
Anirudh
2012 May 31
2
[LLVMdev] DFG of machine functions
Hi,
I am trying to generate the DFG of machine functions.
Initially, I added a pass to generate the DFG of LLVM IR functions. This
was based on the mail thread -
http://lists.cs.uiuc.edu/pipermail/llvmdev/2009-September/025582.html. This
pass worked fine and I was able to generate DFG of LLVM IR functions.
Later, I ported the DFG pass code for machine functions. I ported the
InstIterator.h
2012 Jun 02
0
[LLVMdev] DFG of machine functions
I tried debugging it and the issue seems to be in the implementation of
MachineInstrIterator.h and the way it interacts with GraphWriter.h
functions. I found this by replacing the ( template <> struct
GraphTraits<MCDFGraph<MachineFunction*> >) with a similar MCDFGraph based
template of CFG similar to the one in MachineFunction.h (similarly
replacing the DOTGraphTraits with the
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)
2011 Aug 29
0
[LLVMdev] insertions with inst_iterators?
On Aug 29, 2011, at 12:38 PM, ret val wrote:
> 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
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
2011 Aug 29
0
[LLVMdev] insertions with inst_iterators?
On Mon, Aug 29, 2011 at 12:38 PM, ret val <retval386 at gmail.com> wrote:
> 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
2010 Nov 23
5
[LLVMdev] how to eliminate dead infinite loops?
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 Changed;
So, LoopDeletion thinks my loops might be infinite so it
2013 Nov 03
3
[LLVMdev] Appropriate DS for implementing worklist
Hi,
I am writing an analysis which requires creating worklist of basic blocks.
The worklist should be in FIFO order. I checked SmallVector (and similar
others) and found out this is working in LIFO order when I use the
functions push_back and pop_back_val to insert and delete elements in the
worklist.
Can someone suggest an appropriate DS to implement my worklist. Note: I am
not concerned about
2013 Apr 25
0
[LLVMdev] Proposal for new Legalization framework
On 4/24/2013 8:05 PM, Nadav Rotem wrote:
>
> Everything. This includes all of the custom lowering code for all of the
> targets, all of dagcombine, and maybe all of the patterns in the TD files.
I may have missed the discussion, but why are we trying to move away
from the SelectionDAG? Are there specific problems that we don't want
to fix or live with? If so, what are they?
2013 Oct 17
2
[LLVMdev] [Debug Info PATCH] for support of ref_addr and removal of DIE duplication
On Wed, Oct 16, 2013 at 1:58 PM, David Blaikie <dblaikie at gmail.com> wrote:
>
>
>
> On Wed, Oct 16, 2013 at 1:21 PM, Manman Ren <manman.ren at gmail.com> wrote:
>
>>
>> There are a few places where we break the assumption:
>> 1> formal_parameter constructed in DwarfDebug when adding attribute type
>> we call SPCU->addType(Arg, ATy),