I am a little new to LLVM and compilers.
I decided to create a DAG using the following command
llc -view-sched-dags hello_world.ll
I have a really big chart with different types of dependencies. "Getting Started with Basic LLVM Libraries" explains that:
Black arrows indicate data flow dependency.
Red arrows indicate glue addiction
Blue dotted arrows indicate chain addiction.
I clearly remember talking about data flow dependencies in my compiler class at school. But I donโt remember talking about the other two. Can someone explain the meaning of the other dependencies? Any help is appreciated.
hello_world.cpp
#include <stdio.h> #include <assert.h> int sum(int a, int b) { return a + b; } int main(int argc, char** argv) { printf("Hello World! %d\n", sum(argc, 1)); return 0; }
hello_world.ll
; ModuleID = 'hello_world.cpp' target datalayout = "em:e-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-unknown-linux-gnu" @.str = private unnamed_addr constant [17 x i8] c"Hello World! %d\0A\00", align 1 ; Function Attrs: nounwind uwtable define i32 @_Z3sumii(i32 %a, i32 %b)
hello_world.main.jpg 
hello_world.sum.jpg 
source share