Loading…
For full conference details, see the website: http://llvm.org/devmtg/2019-10/

Sign up or log in to bookmark your favorites and sync them to your phone or calendar.

Technical Talk [clear filter]
Tuesday, October 22
 

10:20am

arm64e: An ABI for Pointer Authentication
arm64e is a variant of Apple's arm64 ABI which supports pointer authentication using the ARMv8.3 PAC instructions. All code pointers and some data pointers are signed using a cryptographic hash, improving the security of the system by making Return-Oriented Programming and Jump-Oriented Programming attacks harder to carry out. In this talk, we go over the pointer authentication mechanisms, how they're represented at each level in the compiler, and how arm64e takes advantage of them in programming languages.

Speakers

Tuesday October 22, 2019 10:20am - 10:55am
General Session (LL20ABC)

10:55am

Code-Generation for the Arm M-profile Vector Extension
In this talk we share design and implementation details how the code-generation techniques auto-vectorisation, hardware-loops, and predication are combined to enable efficient code-generation for tail-predicated hardware loops that are introduced in Arm's new M-Profile Vector Extension.

Speakers
SM

Sjoerd Meijer

ARM
This is a brief bio.


Tuesday October 22, 2019 10:55am - 11:30am
General Session (LL20ABC)

11:30am

Ownership SSA
Reference-counted memory management is used by a number of programming languages, including Swift, Python, PHP, Perl, and Objective-C. Reference counting operations are usually introduced as part of lowering to the compiler's IR as, e.g., calls to builtins or library functions, but this approach leads to both missed optimization opportunities (if the presence of these calls inhibit optimizations) and correctness bugs (if optimizations reason about reference-counting incorrectly). In Swift, we have mitigated these problems by changing the Swift Intermediate Language (SIL) to express statically verifiable ownership constraints on def-use chains defining an augmented form of SSA called Ownership SSA (OSSA). OSSA has yielded many benefits such as improved frontend correctness/verification and the implementation of safer, more aggressive reference counting optimizations. The improvements allowed by OSSA may be of interest to other developers of high level languages that use reference counting memory management.

Speakers

Tuesday October 22, 2019 11:30am - 12:05pm
General Session (LL20ABC)

12:05pm

An MLIR Dialect for High-Level Optimization of Fortran
The LLVM-based Flang project is actively developing a standards-compliant compiler for Fortran—the world’s first high-level programming language and still an important language for science and engineering today.  While Fortran’s core strength of writing computations on arrays remains, the standard language continues to add new facilities such as object-oriented programming. The Flang project has been exploring the use of MLIR, specifically the definition of Flang’s Fortran IR (FIR) as a framework upon which to build a more comprehensive and regular set of optimizations for both better performance and overall reliability of Flang. This talk will explore what the FIR dialect is, how it is built upon and uses other aspects of MLIR, as well as some of the high-level optimizations achieved.

Speakers

Tuesday October 22, 2019 12:05pm - 12:40pm
General Session (LL20ABC)

2:00pm

Link Time Optimization For Swift
The code size of iOS apps is critical due to the size limit of apple store. More and more iOS apps are written in Swift. The Swift programming language provides many new language features such as protocol to facilitate software development. In order to support the implementation of these new features, the existing Swift compiler has to generate the protocol related code and data. However, these generated code and data may not be used in the whole project. For example, some protocol definition is used one module as public and not really consumed by any other modules. Preliminary experiment shows the size of some commercial iOS app can be potentially reduced by 9% through aggressive dead code elimination. Those unused code and data cannot be eliminated easily by the compiler optimizations since they are recorded in llvm.used data structure. In addition, the generated code and data might be implicitly used by Swift runtime library. This calls for a smarter, much more advanced static analysis and novel additions to the classic dead code elimination technique. 
We introduce a novel building pipeline that eliminates the protocol from swift class by leveraging the link time optimization in existing LLVM compiler. In this framework, the swift files are first compiled as LLVM bitcode files and the llvm-link is used to merge all the LLVM bitcode files as one bitcode file. A new LLVM optimization is proposed to eliminate the protocol conformance related variables from the LLVM.used array in this bitcode file. It enables more opportunities for link time optimization to transform global variables into local variables and then identify the dead local variables. The following dead code elimination is extended to update the protocol conformance tables as well as LLVM.used array. The experiment shows that this novel approach reduces the code size of some commercial iOS app by 2%.

Speakers
avatar for Jin Lin

Jin Lin

Compiler Engineer, Uber


Tuesday October 22, 2019 2:00pm - 2:35pm
General Session (LL20ABC)

2:00pm

LLVM-Reduce for testcase reduction
LLVM-Reduce is a new and powerful tool that can reduce IR testcases in new and interesting ways; reducing IR code to almost a fraction of the original size. 
In this talk I will demonstrate how to use the tool and how to build a proper interesting-ness test - a key element used by llvm-reduce in order to minimize testcases. The more powerful the test is, the better testcase it will produce.


Tuesday October 22, 2019 2:00pm - 2:35pm
Breakout Room-1 (LL21AB)

2:35pm

LLVM-Canon: Shooting for Clear Diffs
Comparing intermediate representation dumps after various transformations can be extremely laborious. This is especially true when reasoning through differences in shaders or compute modules which have undergone several optimization passes. Most of these differences tend to be semantically equivalent and are just a consequence of irregular instruction ordering and naming. In the need to save time we have developed a tool called llvm-canon which transforms the code into a canonical form. Thereby in ideal conditions, canonicalized semantically identical code should result in a clear diff, making important semantic differences stand out.
The challenges we faced during the development of this project gave us many sleepless nights. Puzzling over the right point of reference for canonicalization, calculating the odds of similarity, and finding the golden mean between precision and being human-friendly resulted in a very useful tool. A tool with broad possibilities for further expansion and improvements.
In this talk I will go through countless ideas for what is known today as llvm-canon (including ditched ones). Discuss the algorithms behind all the transformations, including instruction reordering and all the magic behind naming values. Yet more importantly I will demonstrate the benefits of diffing canonical code and what we have learned from this interesting experiment.





Speakers

Tuesday October 22, 2019 2:35pm - 3:10pm
Breakout Room-1 (LL21AB)

3:10pm

Porting by a 1000 Patches: Bringing Swift to Windows
Swift is a modern language based upon the LLVM compiler framework.  It takes advantage of Clang to provide seamless interoperability with C/C++.  The Swift compiler and language are designed to take advantage of modern Unix facilities to the fullest, and this made porting to Windows a particularly interesting task.  This talk covers the story of bringing Swift to Windows from the ground up through an unusual route: cross-compilation on Linux. The talk will cover interesting challenges in porting the Swift compiler, standard library, and core libraries that were overcome in the process of  bringing Swift to a platform that challenges the Unix design assumptions.


Tuesday October 22, 2019 3:10pm - 3:45pm
Breakout Room-1 (LL21AB)

3:45pm

Optimizing builds on Windows: some practical considerations
We will share our experience on using Clang & LLD on large (50M LoC) video game codebases, and we will show some pitfalls and considerations for improving build times on Windows 10. Profile traces based on practical scenarios will be used to demonstrate our changes. Finally we intend to present new ways for compiling code with Clang to ultimately increase iteration times.

Speakers
AG

Alexandre Ganea

Ubisoft Inc.


Tuesday October 22, 2019 3:45pm - 4:20pm
Breakout Room-1 (LL21AB)

4:40pm

Better C++ debugging using Clang Modules in LLDB
Expression evaluators in the C++ debuggers we use today still struggle to consistently support many language features. In this talk we show by using Clang’s C++ Modules, LLDB can support most of the previously unsupported language features in its expression evaluator.

Speakers

Tuesday October 22, 2019 4:40pm - 5:15pm
Breakout Room-1 (LL21AB)

4:40pm

Propeller: Profile Guided Large Scale Performance Enhancing Relinker
We discuss the design of Propeller which is a framework for Post Link Optimizations and we show how Propeller can optimize binaries beyond PGO and ThinLTO via basic block layout.

Speakers
avatar for Sriraman Tallam

Sriraman Tallam

Software Engineer, Google Inc.
Link time Optimizations, Scalability of builds, Linkers, Code Layout.


Tuesday October 22, 2019 4:40pm - 5:15pm
General Session (LL20ABC)

5:15pm

Hot Cold Splitting Optimization Pass In LLVM
Hot Cold splitting is an optimization to improve instruction locality. It is used to outline basic blocks which execute less frequently. The hot/cold splitting pass identifies cold basic blocks and moves them into separate functions. The linker can then put newly-created cold functions away from the rest of the program . The idea here is to have these cold pages faulted in relatively infrequently, and to improve the memory locality of code outside of the cold area.
The algorithm is novel in the sense it is based on region and implemented at the IR level. Because it is implemented at the IR level, all the backend targets benefit from this implementation. Other implementations of hot-cold splitting outline each basic block separately and are implemented at the RTL level.

Speakers
avatar for Aditya Kumar

Aditya Kumar

Senior Compiler Engineer, Facebook
I've been working on LLVM since 2012. I've contributed to GVNHoist, Hot Cold Splitting, Hexagon specific optimizations, clang static analyzer, libcxx, libstdc++, and graphite framework of gcc.


Tuesday October 22, 2019 5:15pm - 5:50pm
General Session (LL20ABC)

5:15pm

Memoro: Scaling an LLVM-based Heap profiler
Memoro is a heap profiler built using the LLVM Sanitizer infrastructure. It instruments your program during the compilation and its visualiser helps you navigate the collected profile by highlighting bad patterns, such as frequent allocation and waste of memory. Collecting data proved to be a challenge: instrumented programs don’t meet our expectations and the run-time overhead makes Memoro impractical to use on larger services. This talk presents our work to overcome those constraints, understand the source of the overhead and reduce it, so Memoro can be applied more easily on Facebook services.

Speakers
avatar for Thierry Treyer

Thierry Treyer

Performance and Capacity Engineer, Facebook
I'm working on Memoro, a heap memory profiler, and want to better how memory impact performance!


Tuesday October 22, 2019 5:15pm - 5:50pm
Breakout Room-1 (LL21AB)

5:50pm

Maturing an LLVM backend: Lessons learned from the RISC-V target
The RISC-V backend will ship as an official target in the 9.0 release, due the end of August. This talk will give a brief overview of the current status, but primarily focus on elaborating on the development and testing process, picking out lessons to be learned for other backends and for the LLVM community as a whole. Which aspects of our methodology should others adopt? Are there opportunities to improve LLVM to make it easier to bring up new backends? Or opportunities to better share tests? How can we make it easier for language frontends like Rust to support new targets?

Speakers
avatar for Alex Bradbury

Alex Bradbury

Co-founder and Director, lowRISC CIC


Tuesday October 22, 2019 5:50pm - 6:20pm
Breakout Room-1 (LL21AB)

5:50pm

The Attributor: A Versatile Inter-procedural Fixpoint Iteration Framework
This is a technical talk on the Attributor. There is also a tutorial: link

The Attributor fixpoint iteration framework is a new addition to LLVM that, first and foremost, offers powerful inter-procedural attribute deduction. While it was initially designed as a replacement for the existing “function attribute deduction” pass, the Attributor framework is already more than that. The framework, as well as the deduced information which does not directly translate to LLVM-IR attributes, can be used for various other purposes where information about the code is required.In this talk we will give an overview about the design, showcase current and future use cases, discuss the interplay with other (inter-procedural) passes, highlight ongoing and future extensions, and finally present an evolution. Actual deduction (and use) of attributes will be described but also discussed in our lighting talk presentations and poster.

Speakers
avatar for Johannes Doerfert

Johannes Doerfert

Argonne National Laboratory


Tuesday October 22, 2019 5:50pm - 6:20pm
General Session (LL20ABC)
 
Wednesday, October 23
 

9:50am

Address spaces in LLVM
Address spaces have various uses in different languages and targets, but are commonly misunderstood. The rules for address spaces have not always been clear and there are differing interpretations. I will describe features address spaces currently have, rules surrounding casting, aliasing, bit-representation/non-integral pointers, dereferencability and intended uses.

Speakers

Wednesday October 23, 2019 9:50am - 10:25am
General Session (LL20ABC)

9:50am

LLVM Tutorials: How to write Beginner-Friendly, Inclusive Tutorials
As a beginner with no connection to the LLVM community, getting into contributing to LLVM is hard. To keep the LLVM developer community healthy with a steady stream of new developers coming in, we need tutorials that explain how to accomplish basic tasks in the real LLVM code base. Examples include writing/improving a Clang warning, and adding/improving an optimization pass. Those tutorials are not only helpful for unaffiliated beginners, but can also help onboard new employees as well as provide insights for experienced LLVM developers into parts of the project we are not familiar with.
To start this effort, we wrote three new tutorials with supporting documentation: “My First Typo Fix” (explaining the end-to-end development workflow), “My First Clang Warning”, and “My First Clang/LLVM Tutorial” (showcasing the contents of this talk), with more tutorials to come. To scale this effort of creating new tutorials and cover most parts of the LLVM project, we need to engage more members of the LLVM community to join us.
We will share our experience of writing and testing the tutorials we created and give recommendations on how to write beginner-friendly, inclusive tutorials for the LLVM project.

Speakers

Wednesday October 23, 2019 9:50am - 10:25am
Breakout Room-1 (LL21AB)

10:45am

The clang constexpr interpreter
Constexpr enables C++ to implement NP-complete solutions in constant time at execution time. In order to ensure that programmers do not grow old while such sources compile, C++ frontends should provide effective constexpr evaluators. In order to improve on the performance of the existing tree-walking evaluator  and provide a mechanism which scales as the complexity of constexpr use cases  increases, we present an interpreter which we are upstreaming, aimed to  completely replace the existing evaluator.

Speakers
NL

Nandor Licker

University of Cambridge


Wednesday October 23, 2019 10:45am - 11:20am
General Session (LL20ABC)

11:20am

From C++ for OpenCL to C++ for accelerator devices
In this talk we will describe the new language mode that has been added into Clang for using functionality of C++17 in the OpenCL kernel language - C++ for OpenCL. As this language mode is fully backwards compatible with OpenCL C 2.0, existing OpenCL applications can gradually switch to using C++ features without any major modifications.
During the implementation the strategy was chosen to generalize features that exist in a range of accelerator devices to C++. For example, address space support was improved in C++ to be used as a language extension and OpenCL functionality was built on top of it. This was done to take advantage of common logic in some language features among multiple C++ dialects and extensions that are available in Clang.
At the end of the talk we will describe the future roadmap. Some documentation has been started in Clang (https://clang.llvm.org/docs/LanguageExtensions.html#opencl-features). There is also discussion with the Khronos Group about wider adoption of this language mode and possibly more formal documentation to appear in the future. Additionally we would like to highlight our positive experience of community engagement and the help we have received with early testing and feature evaluation from the users of Clang.

Speakers
avatar for Anastasia Stulova

Anastasia Stulova

Senior Compiler Engineer, Arm
GPGPU, OpenCL, Parallel Programming, Frontend, SPIR-V


Wednesday October 23, 2019 11:20am - 11:55am
General Session (LL20ABC)

11:55am

Mitigating Undefined Behavior: security mitigations through automatic variable initialization
clang recently started supporting automatic variable initialization, where it unconditionally initializes stack variables. It addresses concrete issues in security-related C and C++ applications, and serves as a last-defense guardrail against some stack use-after-free and memory disclosures. We’ll dive into how this removes sharp edges in C-based languages, what optimizations are required to make this option palatable, and what current overheads look like.

Speakers
avatar for JF Bastien

JF Bastien

Apple
JF is a compiler engineer. He leads C++ development at Apple.


Wednesday October 23, 2019 11:55am - 12:30pm
General Session (LL20ABC)

11:55am

Souper-Charging Peepholes with Target Machine Info
Souper, a LLVM-based superoptimization framework, has seen adoption in both academic research and industry projects. Given an LLVM IR as an input, Souper tries to generate peephole patterns by synthesizing semantically equivalent but shorter instruction sequences. However, as a platform-independent framework, it lacks a model of the actual cost of an instruction sequence on the target machine. This leads to missing optimizations opportunities or generation of peephole patterns which degrade performance.
In this talk, we’re going to demonstrate how Souper can benefit from target machine information. Then, we will explore some possible approaches to providing Souper with target machine info to steer the superoptimizer to find more patterns with improvements than regressions. This will enable Souper to be used in a more automated way and reduce the manual intervention required.

Speakers
avatar for Min-Yih Hsu

Min-Yih Hsu

University of California, Irvine


Wednesday October 23, 2019 11:55am - 12:30pm
Breakout Room-2 (LL21CD)

11:55am

The Penultimate Challange: Constructing bug reports in the Clang Static Analyzer
Static analysis is used to find errors or code smells statically. As the highest cost factor regarding static analysis is the human effort the expert makes evaluating whether a report is a true positive, presenting our findings in an easy-to-understand manner is of the utmost importance.
This talk will explore the techniques and data structures used by the Clang Static Analyzer to construct bug reports. It will briefly explain the construction of the ExplodedGraph during symbolic execution, and how it will be processed after the analysis. Using a combination of data and control dependency analysis with the help of the inspection of the ExplodedGraph, the analyzer tries to construct user friendly diagnostics. Since symbolic execution is a kind of path sensitive analysis, the idea behind the solution the analyzer employs is general enough to create diagnostics for other kinds of analyses. We will also discuss the challenges the analyzer faces and future development possibilities.

Speakers
KU

Kristóf Umann

Eötvös Loránd University, Ericsson


Wednesday October 23, 2019 11:55am - 12:30pm
Breakout Room-1 (LL21AB)

5:00pm

Alive2: Verifying Existing Optimizations

Alive is regularly used to verify InstCombine optimizations. However, it is limited mostly to InstCombine-style optimizations, and it can only verify optimizations written in Alive's own IR-like DSL.

Alive2 is a re-implementation of Alive that removes several limitations of the previous tool. It supports floating point operations and has better support for memory and loops. It handles optimizations beyond those found in InstCombine. It includes a standalone tool that can prove equivalence / refinement between two bitcode functions as well as an `opt` plugin that can prove that an LLVM optimization is correct. Neither of these new tools requires optimizations to be rewritten in the Alive DSL.

In this talk, we will give an overview on Alive2 and show how you can use it to 1) ensure your optimization is correct, and 2) to find that bug that is triggering a miscompilation.


Speakers
NL

Nuno Lopes

Microsoft Research


Wednesday October 23, 2019 5:00pm - 5:35pm
General Session (LL20ABC)

5:00pm

Loop-transformation #pragmas in the front-end
Code-transformation directives allow the programmer to specify which trans- formation the compiler should apply and in which order (e.g. tile the loop nest, then parallelize the outermost and vectorize the inner most loop) with- out impacting the source’s maintainability. Currently, Clang only supports the "#pragma clang loop directives" which do not reliably take a sequence of trans- formations into account.
We present the "#pragma clang transform" directive that specifically supports chaining transformations. These directives must be parsed, represented in the AST, instantiated for templates, (de-)serialized, dumped, semantically verified, and its LLVM-IR generated.

Speakers
MK

Michael Kruse

Argonne National Laboratory


Wednesday October 23, 2019 5:00pm - 5:35pm
Breakout Room-1 (LL21AB)

5:35pm

Transitioning the Networking Software Toolchain to Clang/LLVM
In this talk we will share our experience in the journey of transitioning Cisco Enterprise Networking software with a high market share to Clang/LLVM as the primary compiler. For performance and business reasons, our software stack should run on many different processors. We will describe several contributions to the MIPS and PPC backends to make LLVM on parity with gcc compiler for these processors. We will summarize our contributions to debugging optimized code and enabling LLVM on Cisco data plane component where code must be highly optimized with LTO to forward network packets in the correct byte order.

Speakers
IB

Ivan Baev

CIsco Systems
BS

Bharathi Seshadri

Cisco Systems
JS

Jeremy Stenglein

CIsco Systems


Wednesday October 23, 2019 5:35pm - 6:10pm
Breakout Room-1 (LL21AB)

5:35pm

Using LLVM's portable SIMD with Zig
While not every application that uses SIMD uses only the portable subset that LLVM provides, writing to LLVM instead of assembly (or , , , et cetera) provides more than multiple platforms. It also allows your app to benifit from a rich library of LLVM optimizations. While the portable SIMD features of C (and Rust) are insufficient to write an application, LLVM provides much more. In addition to exporting the full power of LLVM's SIMD functionality, novel Zig features such as comptime are also provided for vector intrinsics.
We show that LLVM and Zig enable a new single libmvec implementation, instead of the many currently in use and in development.

Speakers
SL

Shawn Landden

Position at Company ABC.


Wednesday October 23, 2019 5:35pm - 6:10pm
General Session (LL20ABC)