MIT 6.172 Performance Engineering of Software Systems, Fall 2018
Instructor: Tao B. Schardl
View the complete course:
YouTube Playlist:
This lecture focuses on how C code is implemented in x86-64 assembly. Dr. Schardl reasons through the mapping from C code to assembly in two steps: C to LLVM IR and then LLVM IR to Assembly.
License: Creative Commons BY-NC-SA
More information at
More courses at
source

43:39 It's called a phi instruction/function because it stands for phony.
dude's amish, arent they suppose to live like its 18th centure yet hes driving the technological progress lol
Can someone tell me which course of ocw covers topics of Compiler design/principles of compiler design subject ?
Like the book by the same name by Aho, Ullman
Great lecture Sir❤
Best course on optimization. I would like MIT to make a summary of the most important topics edited by the three teachers.
I love this. it makes me happy
bro nailed it
41:17 static single assignment
31:56 controflow graph for fib
17:18 type system
13:39 control flow conditional branches
11:46 destination operand..register
6:29 fib.s assembly
He could have explained phi better I think… It's just assignment based on where the code branched from
Parabéns pela aula, professor!
Love this open courseware, truly thank you… but as an aside, I don't think we need to donate to a school with a $23.5 billion endowment.
I was planning to dig more under 'C' but after seeing this video I lost interest, It's so messy and more complex than 'C' or even 'C++'.
very clear talk, thanks
حقـاً شيـيء رائـع 🤍🤍.
Amish man is my new favorite instructor right now <3
Nice to have a look on the intermediary LLVM output files and the way compilers do their work.
@9:34 "Primer" is not pronounced "prim-mer" if it were then it would be written "primmer". It is "prime-er" as in "priming" you for something.
Brilliant simple straight forward explanation. Why does everyone else make this seem complicated????
OMG x86? Really? What a highly limited, brain dead processor.
The x86 is a toy trying to compete in a grown up world.
Im am old timer who has written about a million lines of assembler code for over 14 different CPUs. X86 has got to be the worst live coded on, the best? IBM mainframes. I've written for: Data General, General Automation 460, CDC 1700, PDP 11 series, Quotron, IBM Series/1, Intel 8080, Zilog Z80, PIC processors, TI, IBM mainframes from 1401 thru s/390. Cray, Silicon graphics and a bunch of other types of machines. I even wrote microcode for IBM 360/30 and PDP 11/44. So I am pretty well versed in many CPU architectures.
I taught COBOL programmers how to read core dumps as well.
I used to read 3,000 page core dumps often when major subsystems failed.
I taught mainframe operating systems concepts at NYU in NY.
To me, computers are tools to get a job done. Some computers do things very well others do not. Same thing for computer languages. There is no one language that is efficient for all cases. This is why I learned 12 different languages. As a programmer you should ALWAYS be learning. I was self taught IBM assembler and when I did, a big light went on. Suddenly everything made sense. I was a sponge to learn more. Things I could do in assembly could not even be dreamed of by a high level language programmer. I could do more with very limited memory by adopting assembly concepts. I made the mainframe do things that IBM said could not be done. Some code I wrote in the 80s is still running today
Will yea look at all the numberphile someone times yea need a good old head from logic problems and puzzles 😉
learning assembly in 2020 = reinventing wheel…
1:10 ahh college life of pulling multiple all-nighters to cram…
Way too high-level. I feel like anyone who has heard of LLVM wouldn't get a lot out of this. No details were given on how it WORKS. He just talks about what it does.
How to draw an owl:
1) Draw a circle
2) Draw the rest of the owl
At 1:18:26, why did it use leaq to calculate n-1, but movq and addq to compute n-2? Why not again use leaq -2(%rbx), %rdi to compute n-2?
@16:44 it might just be the network security guy in me but when I saw ICMP I thought of something other than Boolean logic LOL. How confusing.
Thank you for video.
The only assembly language I can read are IKEA instructions.
Great content.
im just looking at these and am completely clueless as to what is going on…. is there anyway to get used to RISC-V architecture??
The shape of the greek letter phi looks like the graph with lots of loops.
Much of india dudes in lecture. Seems to be the same anywhere in that sort of lectures 😀
After watching 5min of that video i remembered why i changed the subject from embedded systems to electrical engineering xD
This class was really amazing.
Assembly is easiest than LLVM lol
So many MIT jokes
you. in the background. with the squeaky chair: I don't know who you are. I don't know what you want. If you are looking for ransom I can tell you I don't have money, but what I do have are a very particular set of skills. Skills I have acquired over a very long career. Skills that make me a nightmare for people like you.
In european universities they teach us exactly the same. But we can study for free, and in US the price is 100k. Why?
What’s this, only plebes use C?
gcc -S untitled.c > untitled.s (am I correct?)
I wonder why in llvm ir representation of mm_base function on 25:22 parameters A and B marked as readonly. They'd better be preceded by a const keyword.