2020 LLVM Developers’ Meeting: “A Deep Dive into the Interprocedural Optimization Infrastructure”

preview_player
Показать описание

A Deep Dive into the Interprocedural Optimization Infrastructure - Luofan Chen, Kuter Dinel, Shinji Okumura, Stefan Stipanovic, Hideto Ueno, Stefanos Baziotis, Johannes Doerfert


In this tutorial we will present the IPO infrastructure of LLVM. This includes Inlining, ArgumentPromotion, IPSCCP, CallGraph etc. We will focus our attention on the Attributor, a new and powerful interprocedural fix-point iteration framework that presents a good candidate both for the future of IPO in LLVM but also for beginners who want to get started in an LLVM project.

We will shortly present the theoretical foundation of each pass as well as important details of the LLVM implementation. A live demo will follow in which the audience can see how to apply these passes and the effect on different inputs.

This tutorial will be run by (GSoC) students.

Рекомендации по теме
Комментарии
Автор

Q&A:

46:08 : How to get involved with IPO and Attributor ?
47:44 : How do you decide which branch is hot when inlining ?
48:57 : Does it make sense to also support top-down inlining ?
50:05 : Are there any thoughts on separating traversal of call-graph to find inline candidates and the inlining order itself ? For example,
with PGO information, I may want to sort candidates by call-graph edge hotness.
51:14 : Are there are any optimizations to change argument types ? For example, only the low 32 bits of an i64 attached anywhere and the
argument replaced with i32.
54:42 : Will the function specialization add to the code size ?
57:44 : Is there any way to retrieve instructions or info about them in the caller that corresponds to the inlined function ?
58:35 : Have you noticed whether the kind of code benefits from IPO, say C apps vs C++ apps and if there is way to take advantage of that ?
1:00:16 : Can you go a bit into inlining at when recursion is a problem ?
1:03:23 : Is devirtualization for C-style vtable struct with callbacks visible to LLVM ?
1:09:52 : What are the plans for enabling Attributor by default ?

stefanosbaziotis