Understanding Compiler Optimization - Chandler Carruth - Opening Keynote Meeting C++ 2015

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments

I found this video the other night while looking to learn more about the LLVM IR. I thought it was a be great introduction to what LLVM does to optimize our code. I know that there has been a lot of talk about introducing optimizations now that the MIR is starting to mature, and there is some good dicussions taking place for establishing a well-defined memory model for Rust, so I felt that some others might find it interesting to see the kind of work that the LLVM will do to optimize our code as well.

👍︎︎ 2 👤︎︎ u/cbreeden 📅︎︎ Sep 14 2016 🗫︎ replies

In the last week I started using LLVM in my DBKit engine project. My goal is to generate host optimized code for a lot of the execution. I'm starting with Expressions (what you feed into the Filter or Compute relational operations).

Right now I'm compiling C code using clang to IR using a spir64 target (because it's pretty generic) with optimizations disabled. Right now I need to do surgery of the IR to remove the target specification and target attributes for functions. I've successfully loaded it and JITed it from Rust code.

For some reason right now I cannot get the Rust code / C LLVM code to optimize for my host CPU. I have to externally run the LLVM: opt -O3 -mcpu=native to transform it, and it spits out nice IR that gets compile to AVX2 when I load it in my Rust JIT. I think this problem has more to do with the C LLVM API, there's no easy way of saying ... just optimize this for me with the same way llvm-opt does.

Once I get this working and the Filter/Expression framework further along I'm going to try to JIT nvptx code to to run it on the GPU.

👍︎︎ 1 👤︎︎ u/mtanski 📅︎︎ Sep 15 2016 🗫︎ replies
Captions
No captions available for this video.
Info
Channel: Meeting Cpp
Views: 99,887
Rating: 4.9108377 out of 5
Keywords: LLVM, C++, Optimizer, Meeting C++, Clang, Optimization, cpp, cplusplus
Id: FnGCDLhaxKU
Channel Id: undefined
Length: 110min 14sec (6614 seconds)
Published: Sat Dec 19 2015
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.