Displaying 20 results from an estimated 600 matches similar to: "[LLVMdev] Walking all the predecessors for a basic block"
2008 Jan 23
1
[LLVMdev] Walking all the predecessors for a basic block
Hi,
Well, yes i did try your suggestion but i keep on running into a
compilation problem.
The error is:
llvm[0]: Compiling Hello.cpp for Release build (PIC)
/home/saraswat/llvm/llvm-2.1/include/llvm/ADT/GraphTraits.h: In
instantiation of
`llvm::GraphTraits<llvm::ilist_iterator<llvm::BasicBlock> >':
Hello.cpp:59: instantiated from here
2008 Jan 22
0
[LLVMdev] Walking all the predecessors for a basic block
Hi Pabhat,
Have you checked out DepthFirstIterator? (include/llvm/ADT/
DepthFirstIterator.h). It provides an iterator abstraction to perform
a forward/reverse DFS traversal of a graph.
Many of the LLVM datatypes that represent graphs have a template
specialization of the GraphTraits<> class which allows separate
algorithms to treat them as graphs, walk them, etc. (Both BasicBlock
2007 Mar 18
4
[LLVMdev] idf_iterator and MachineFunctions
Hi,
I need to do an inverse-depth-first iteration over the basic blocks in
a machine function (i.e. starting from the last block and following
predecessor edges) for a liveness analysis I'm writing.
idf_iterator seems like it's almost the class I need, but it starts at
the first block in the function at present, rather than the last one
(because of the specialisiation of GraphTraits for
2002 Nov 08
1
[LLVMdev] Iterating on the DSGraph... (fwd)
I use the following code to do the depth first search on the DSGraph. And
I always got this error message. Couldn't figure out what's wrong. Could
you please let me know? Besides, I really have no idea about what those
functions do. Is there any documentation about DSGraph functions besides
the pool allocation paper?
Thanks,
xiaodong
Code:
for( df_iterator<DSNode*> I =
2007 Mar 19
0
[LLVMdev] idf_iterator and MachineFunctions
On Sun, 18 Mar 2007, Lang Hames wrote:
> I need to do an inverse-depth-first iteration over the basic blocks in
> a machine function (i.e. starting from the last block and following
> predecessor edges) for a liveness analysis I'm writing.
As Gordon mentioned, there isn't a trivial way to do this, as there isn't
a single exit node in the MBB CFG.
> idf_iterator seems
2017 Aug 09
2
[ThinLTO] Suggestions on how to traverse SCCs in the Module Summary Index bottom up
Hey all,
I'm working on adding function attribute propagation to function summaries
in the ThinLTO index, and have run into some trouble with ensuring
bottom-up traversal when finding the SCCs in the call graph.
I'm basing my implementation for the GraphTraits for the ModuleSummaryIndex
off the GraphTraits<CallGraph *> implementation (
2007 Dec 20
0
[LLVMdev] First time!
Hi aditya,
There are two ways to cound the number of predecessors for each basic block.
You can generate the control flow graph using the CallGraphScc pass with the
granularity of basic block and can simply traverse the graph bottom up till
the root. The number of nodes encountered would be the number of
predecessors.
The second way would be to use the special ;preds marker in the llvm IR.
Each
2007 Dec 20
4
[LLVMdev] First time!
Hi!
I want to know
How to count the number of predecessors for each basic
block?
Thank You
____________________________________________________________________________________
Never miss a thing. Make Yahoo your home page.
http://www.yahoo.com/r/hs
2008 Mar 04
2
[LLVMdev] Register Allocation by Graph Coloring
Dear all,
I was looking for to compile some benchmarks and generate code using
different register allocation algorithms. As i can see, the built in
options for register allocation in llvm are
1. Simple
2. Local
3. Linear Scan
I want to compare the generating code also with a graph coloring based
register allocation approach. Is this also built in by default by
llvm. Are there some other
2009 Mar 16
3
[LLVMdev] Shrink Wrapping - RFC and initial implementation
Here is the latest shrink wrapping patch, with fixes for issues identified
by Evan.
I am including a few small additions/fixes to
include/llvm/ADT/{SparseBitVector,DepthFirstIterator}.h.
Files:
include/llvm/ADT/DepthFirstIterator.h
include/llvm/ADT/SparseBitVector.h
lib/CodeGen/PrologEpilogInserter.cpp
Evan, let me know how it looks when you get a chance.
Thanks much,
John
>
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
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
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
2010 Apr 07
2
[LLVMdev] graph abstraction proposal
Hi!
while trying to use llvm::DominatorTreeBase on a custom graph that
has nothing to do with llvm::BasicBlock I ran into some difficulties,
because llvm::DominatorTreeBase calls e.g. getParent()->front()
directly on the nodes and uses llvm::Inverse which forced me to
implement my GraphTraits also for Inverse.
This could be solved using a compile time abstraction of Graph
instread of
2009 Aug 13
1
[LLVMdev] Graphviz and LLVM-TV
Hi Ioannis,
On Thu, 2009-08-13 at 19:31 +0100, Ioannis Nousias wrote:
> Thanks Tobi for the tip.
>
> however I also need the Data-Flow-Graph of each basic block/functions.
> As I said, I need a view of how the instructions 'link' to each other
> (via registers or memory aliasing or whatnot)
I believe that there is not yet a DOT printer for this kind of
information.
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
2017 May 24
3
GraphTraits dereferencing
Hello,
I’m trying to port a project up to 4.0 and I’m seeing the following error:
In file included from /Users/jaredcarlson/Projects/llvm-4.0.0.src/include/llvm/ADT/StringRef.h:13:
/Users/jaredcarlson/Projects/llvm-4.0.0.src/include/llvm/ADT/STLExtras.h:139:13: error: no type named 'type' in 'std::__1::result_of<std::__1::pointer_to_unary_function<llvm::DSNode *, llvm::DSNode
2008 Feb 05
1
[LLVMdev] Induction Variables vs Loop Control Variable
Hi all,
I was wondering if its possible to identify loop control
variables from the induction variables in a Loop using LLVM.
Also, How does one can use the LoopInfo class to identify the natural
loops from the IR. In other words how to use the class in the pass?
Thanks,
Regards
Prabhat
2008 Feb 26
1
[LLVMdev] Program Slicing using LLVM?
Hi all...
I am developing a program slicing framework using LLVM. The idea
is to remove the computation parts from the program and only keep the
parts relevant for the control flow.
For example, in the following C loop.
for (i=0;i<=VAL;)
{
printf("In the loop");
a=b+c;
b=h+k;
i++;
printf("%d",i);
}
after slicing...
for (i=0;i<=VAL;)
{
i++;
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