Questions tagged [control-flow-graph]

A control flow graph (CFG) in computer science is a representation, using graph notation, of all paths that might be traversed through a program during its execution.

A control flow graph (CFG) in computer science is a representation, using graph notation, of all paths that might be traversed through a program during its execution.
In a control flow graph each node in the graph represents a basic block, i.e. a straight-line piece of code without any jumps or jump targets; jump targets start a block, and jumps end a block. Directed edges are used to represent jumps in the control flow. There are, in most presentations, two specially designated blocks: the entry block, through which control enters into the flow graph, and the exit block, through which all control flow leaves.

Reference

138 questions
0
votes
1 answer

simplifyCFG pass in llvm

I was trying to run the simplify CFG Pass in LLVM , and delete an unreachable basic block after running one of my own IR transforms , but I keep getting the error - While deleting: i8* %g Use still stuck around after Def is destroyed: store i8 0,…
mal
  • 143
  • 2
  • 12
0
votes
1 answer

Directed Acyclic Graph Traversal in Java Web Application

So I am building a web application where you can build a directed graph where a node will represent some operation and the edge will represent data flow between those operations. So for an edge {u,v} , u must run before v does. Click this link to…
0
votes
0 answers

CFG of functions: should the called functions' CFGs be included in the CFG of the outer function?

Suppose I've obtained a CFG(control-flow-graph) of a function, and suppose one of the basic block makes a call to another function (of course, the call being made in the last instruction of the Basic Block) . My Question is: should I embed the CFG…
0
votes
0 answers

How to draw Control flow graph and Cyclomatic complexity for this class?

public class Wheel{ public int faceValue; public string[ ] fruitNames=new string[5]; public Wheel(string[ ] fruits){ for(int i=0; i
Ella
  • 1
0
votes
0 answers

Traversing over an AST of python code, need some assistance

I have been trying to figure out what is the correct approach for retrieving a control flow graph for a Python code, I'm looking for similar output as I got with a gcc output on a c program (I have used the gcc -fdump-tree-cfg). I'll give a short…
0
votes
1 answer

What are case-labeled statements and case labels?

Having read McCabe's article about cyclomatic complexity, it reads: A less frequently occurring issue that has greater impact on complexity is the distinction between “case-labeled statements” and “case labels.” When several case labels apply…
0
votes
1 answer

Difference between line, branch and independent path coverage?

What is the difference between line, branch and independent path coverage? given the following scenario, how the paths will look like? Image for control flow graph on the following link --> http://testerstories.com/files/Path.Test.011.png Steps for…
0
votes
1 answer

How are PGOs applied to the source code? How does it affects the CFG?

Recently I've been searching for PGO's related topic, and started wondering how they are applied to the source code and one application effects after another is already applied. I mean, if you enable PGO optimization in GCC or CLang, for example, it…
yZaph
  • 169
  • 1
  • 10
0
votes
0 answers

Basic Block and control flow graph for multiple threads

I am new to multi-threading and C++11 threads, and I am trying to see how threads behave at an architectural level. Now it can be possible that different threads have their own independent control flow. How can I get the basic block information and…
user5079076
0
votes
1 answer

Android APK control flow graph with soot

I'm trying to make a control flow graph with the soot API from an Android APK. I have read a lot but i feel a little bit helpless how to start from scratch. I'm using a nighty build of soot (downloaded here:…
dju
  • 129
  • 4
  • 18
0
votes
2 answers

How to generate control flow graph from Scala code?

I want to see the control flow graph generated by the Scala compiler. Is there a way to do so? I tried searching online but only found Eclipse plugins for Java like the one from here www.drgarbage.com but none for Scala. Thanks EDIT: I took the…
0
votes
1 answer

What's the difference between data flow graph and dependence graph in TBB

I have read about data flow graph and dependence graph from the Intel TBB Tutorial, and feel a bit confusing about these two concepts. Can I say that the key difference between data flow graph and dependence graph is whether there are explicitly…
oneg
  • 38
  • 5
0
votes
1 answer

Distinguishing the type of calls/jumps in RTL dump of GCC

I have got the control flow graph dump of gcc in RTL format and have visualized it using graphviz. However, it is still unclear which jumps/calls are direct and which are indirect. Any suggestion for distinguishing them from each other?
user3684042
  • 651
  • 2
  • 6
  • 16
0
votes
2 answers

identifying a loop in LLVM CFG

I am writing a pass in llvm that would identify loop invariants and hoist those instructions who are using those invariants, above the loop body. But for that i need to know whether there is any back edge from one node to another. For e.g. I want to…
Vikash Joshi
  • 21
  • 1
  • 6
0
votes
1 answer

C#: Access Call hierarchy from code

In Visual Studio you can display the Call hierarchy of a single function. What I'm looking for is the same functionality but accessible from inside C# code. Is it possible to use some API's through a self written Visual Studio Plugin? Or can I…
Tarion
  • 16,283
  • 13
  • 71
  • 107
1 2 3
9
10