Skip to content

[CFP] Optimizing Clang with BOLT #11

Description

@aaupov

Title

Optimizing Clang with BOLT

Author

Amir Ayupov, aaupov@fb.com, Facebook

Distribution

Abstract (optional)

https://github.com/facebookincubator/BOLT/blob/main/bolt/docs/OptimizingClang.md

BOLT (Binary Optimization and Layout Tool) is designed to improve the application performance by laying out code in a manner that helps CPU better utilize its caching and branch predicting resources.

The most obvious candidates for BOLT optimizations are programs that suffer from many instruction cache and iTLB misses, such as large applications measuring over hundreds of megabytes in size. However, medium-sized programs can benefit too. Clang, one of the most popular open-source C/C++ compilers, is a good example of the latter. Its code size could easily be in the order of tens of megabytes. Clang executable suffers from many instruction cache misses and can be significantly improved with BOLT, even on top of profile-guided and link-time optimizations.

What's unique about the environment you package LLVM for? (optional)

What makes your distribution of LLVM unique? (optional)

What might others learn from your experience? (optional)

How to apply BOLT optimizations to make Clang up to 15% faster on top of PGO and LTO.

What could be improved in upstream LLVM to make working with it easier as a downstream packager? (optional)

We're working on preparing BOLT for inclusion into LLVM monorepo as a subproject, and upstreaming BOLT-specific patches is a major part of the effort. Engagement and productive collaboration with reviewers, maintainers and other interested parties on upstreaming reviews is critical for the success.


Reminder that this is meant to be a 15 minute lightning talk; enough to pique
interests but follow up should be done after. Slides can always include links
to more info; we will ask that you send a PR to this repo with your slides when
they are ready.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions