search for: dataflow

Displaying 20 results from an estimated 297 matches for "dataflow".

2013 Apr 16
2
[LLVMdev] Traditional Dataflow Algorithm
Is there a traditional dataflow algorithm buried in LLVM somewhere? I need to be able to do some very late transformations (after regalloc) and we aren't in SSA anymore. I will need a dataflow analysis to ensure correctness. At one point I thought I remembered seeing a generic fixed-point dataflow analysis engine but now I...
2009 Sep 06
2
[LLVMdev] Graphviz and LLVM-TV
...in CFG.h, a function is a graph of basic blocks. A > GraphTraits<Function*> inherits from GraphTraits<BasicBlock*>, and > implements those nodes_begin()/nodes_end() wrapper functions. Should I > modify CFG.h and make now BasicBlock a graph of Instruction(s) ? > > The DataFlow.h deals with Value and User. Now BasicBlock is derived from > Value and Instruction from User, but I don't understand how that helps. > > It's a bit confusing to be honest. Can you help? > Here are some examples on how to use the dataflow graphs: Value *V = ... for(df_iter...
2009 Sep 06
3
[LLVMdev] Graphviz and LLVM-TV
...ng 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 confusion, it was only an example on how to use the dataflow graphs from DataFlow.h, you don't need depth-first iteration to implement dot graphs for DFGs. Disjoint DFGs are the reason I mentioned the need to walk all instructions/arguments in order to get all DFGs. If you are only interested in a DFG starting from a particular Value*, then forget about...
2013 Apr 16
0
[LLVMdev] Traditional Dataflow Algorithm
On 4/16/13 11:30 AM, dag at cray.com wrote: > Is there a traditional dataflow algorithm buried in LLVM somewhere? I > need to be able to do some very late transformations (after regalloc) > and we aren't in SSA anymore. I will need a dataflow analysis to ensure > correctness. > > At one point I thought I remembered seeing a generic fixed-point > dataf...
2009 Sep 06
0
[LLVMdev] Graphviz and LLVM-TV
...n is a graph of basic blocks. A >> GraphTraits<Function*> inherits from GraphTraits<BasicBlock*>, and >> implements those nodes_begin()/nodes_end() wrapper functions. Should I >> modify CFG.h and make now BasicBlock a graph of Instruction(s) ? >> >> The DataFlow.h deals with Value and User. Now BasicBlock is derived from >> Value and Instruction from User, but I don't understand how that helps. >> >> It's a bit confusing to be honest. Can you help? >> >> > > Here are some examples on how to use the dataf...
2017 Jul 05
3
Dataflow analysis regression in 3.7
Hi all, I just found an optimization regression regarding simple dataflow/constprop analysis: https://godbolt.org/g/Uz8P7t This code ``` int dataflow(int b) { int a; if (b==4) a = 3*b; // fully optimized when changed to a = 3; else a = 5; if (a == 4) return 0; else return 1; } ``` is no longer optimized to just a "return 1". The reg...
2009 Sep 07
0
[LLVMdev] Graphviz and LLVM-TV
...a 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 confusion, it was only an example on how to use the > dataflow graphs from DataFlow.h, you don't need depth-first iteration to > implement dot graphs for DFGs. > > Disjoint DFGs are the reason I mentioned the need to walk all > instructions/arguments in order to get all DFGs. > If you are only interested in a DFG starting from a particular V...
2005 Jul 05
1
[LLVMdev] Writing a dataflow analysis
Hi I have just taken a look at the LLVM-compiler and i am trying to write a pass which analyses the dataflow and sideeffects. So far i have written my own pass which works and i can traverse the blocks, functions and instructions. Currently i am using the "runOnFunction" function and iterate over the functions and blocks. But this seems to be not optimal since the instructions itself seem to...
2016 Jan 21
2
Could I do some control-flow and dataflow analysis cross files and functions via IR
As mentioned in the title, I want to do some control-flow and dataflow analysis. I can only find the assignment statement in a function, but the assigned variable is just a parameter of this function. For example, **************************************** int foo(struct A* a, int b, ...){ ... a->Int_field = b; ... return 0; } ************************...
2016 Mar 01
2
How to do some dataflow analysis via IR on a large project?
I am learning to do some basic dataflow analysis on C code projects, such as Apache httpd. Now I am a newbie of LLVM IR, and there are some problems in doing that. In the official User Manual of how to write a LLVM PASS, they only show the way to generate IR of a single ".c" source file. But in fact there are so many examples t...
2017 Jul 06
2
Dataflow analysis regression in 3.7
On Thu, Jul 6, 2017 at 7:00 AM, Davide Italiano <davide at freebsd.org> wrote: > On Wed, Jul 5, 2017 at 3:59 PM, Johan Engelen via llvm-dev > <llvm-dev at lists.llvm.org> wrote: > > Hi all, > > I just found an optimization regression regarding simple > > dataflow/constprop analysis: > > https://godbolt.org/g/Uz8P7t > > > > This code > > ``` > > int dataflow(int b) { > > int a; > > > > if (b==4) > > a = 3*b; // fully optimized when changed to a = 3; > > else > > a = 5; > >...
2013 Apr 18
2
[LLVMdev] Traditional Dataflow Algorithm
On Apr 16, 2013, at 10:27 AM, John Criswell <criswell at illinois.edu> wrote: > On 4/16/13 11:30 AM, dag at cray.com wrote: >> Is there a traditional dataflow algorithm buried in LLVM somewhere? I >> need to be able to do some very late transformations (after regalloc) >> and we aren't in SSA anymore. I will need a dataflow analysis to ensure >> correctness. >> >> At one point I thought I remembered seeing a generic f...
2009 Aug 13
1
[LLVMdev] Graphviz and LLVM-TV
...not yet a DOT printer for this kind of information. grep DOTGraphTraits -R * should give you all data types, for which dot printing is implemented, and the data flow does not seem to exist. However there is already a graph representation of the data flow information in "include/llvm/Support/DataFlow.h": ------------------------------------------------------------------------- This file defines specializations of GraphTraits that allows Use-Def and Def-Use relations to be treated as proper graphs for generic algorithms. ---------------------------------------------------------------------...
2009 Sep 06
0
[LLVMdev] Graphviz and LLVM-TV
...way this is implemented in CFG.h, a function is a graph of basic blocks. A GraphTraits<Function*> inherits from GraphTraits<BasicBlock*>, and implements those nodes_begin()/nodes_end() wrapper functions. Should I modify CFG.h and make now BasicBlock a graph of Instruction(s) ? The DataFlow.h deals with Value and User. Now BasicBlock is derived from Value and Instruction from User, but I don't understand how that helps. It's a bit confusing to be honest. Can you help? thanks, Ioannis Tobias Grosser wrote: > Hi Ioannis, > > On Thu, 2009-08-13 at 19:31 +0100, Ioann...
2017 Jun 16
2
How does sanitizers in compiler-rt work?
...e any pointer on how compiler-rt, especially the sanitizers work? Do they operate on IR as any other LLVM pass? Or are they integral part of the frontend itself? I couldn't spot any documentation on the internals of compiler-rt project? What happens (sequence of actions) when I pass -fsanitizer=dataflow to clang? Precisely, I intend to alter the behaviour of DFSan to suit my need. Therefore, I need to know how it gets integrated in the tool-chain. Initially, my idea was to insert the dfsan_set_label() calls to the IR and pass it to DFSan. However, I am not sure if it's designed to run on the...
2016 Mar 01
0
How to do some dataflow analysis via IR on a large project?
...examples online. You probably need to dig into the source code. (in lib/LTO ?) Correct me where I'm wrong or if there are any other good approaches. Regards, Kevin On Mon, Feb 29, 2016 at 9:15 PM 周书林 via llvm-dev <llvm-dev at lists.llvm.org> wrote: > I am learning to do some basic dataflow analysis on C code projects, > such as Apache httpd. Now I am a newbie of LLVM IR, and there are some > problems in doing that. > In the official User Manual of how to write a LLVM PASS, they only > show the way to generate IR of a single ".c" source file. But in fact > the...
2019 Nov 08
2
Register Dataflow Analysis on X86
I came across this thread from a couple years ago: http://lists.llvm.org/pipermail/llvm-dev/2017-November/119346.html Has there been any progress on RDF for X86? Or is there some other preferred alternative for performing reachability analysis after register allocation? Thanks, Scott Constable -------------- next part -------------- An HTML attachment was scrubbed... URL:
2016 May 25
1
Live interval analysis on LLVM IR (not on Machine instructions)
Hello. Thank you very much for the research paper. I will try to make use of the algorithms it presents. I just want to add that I found a 3rd party project doing dataflow analysis for LLVM IR at https://github.com/rohitjha/cse231-proj2. As written at http://cseweb.ucsd.edu/~r1jha/#five , the project's description is: "Dataflow Analysis Framework for LLVM This is an extensible dataflow analysis framework for analyzing and optimizing LLVM IR code. The...
2011 Jun 30
2
[LLVMdev] Generating DFG or CDFG from C code
Hi All, I am new to LLVM. I want to generate a Dataflow graph or Control Dataflow graph from C code using LLVM. I have no idea how to do it in LLVM. I tried to use analysis and transform passes such as "-dot-cfg" but it doesn't give what I want. I want to generate a node for each operation in C code.  Thanks in advance.JM. -------------- n...
2011 Jul 01
2
[LLVMdev] Generating DFG or CDFG from C code
...k <canarbekmatay at yahoo.com> wrote: > > From: janarbek <canarbekmatay at yahoo.com> > Subject: Generating DFG or CDFG from C code > To: llvmdev at cs.uiuc.edu > Date: Thursday, June 30, 2011, 11:55 AM > > Hi All, > > I am new to LLVM. I want to generate a Dataflow graph or Control Dataflow graph from C code using LLVM. I have no idea how to do it in LLVM. I tried to use analysis and transform passes such as "-dot-cfg" but it doesn't give what I want. I want to generate a node for each operation in C code. > > Thanks in advance. > JM....