commit | 12c6ee8fd2046c85ae9693105288fcd749b90733 | [log] [tgz] |
---|---|---|
author | Nikita Popov <npopov@redhat.com> | Tue Nov 07 10:36:45 2023 +0100 |
committer | Tobias Hieta <tobias@hieta.se> | Tue Nov 14 09:22:31 2023 +0100 |
tree | db6139e61de6b479437c4f0e3fc883b27b810a61 | |
parent | 0a1274224ef8928507b8e50c19ea25e62a7a3bf3 [diff] |
[GlobalOpt] Cache whether CC is changeable (#71381) The hasAddressTaken() call in hasOnlyColdCalls() has quadratic complexity if there are many cold calls to a function: We're going to visit each call of the function, and then for each of them iterate all the users of the function. We've recently encountered a case where GlobalOpt spends more than an hour in these hasAddressTaken() checks when full LTO is used. Avoid this by moving the hasAddressTaken() check into hasChangeableCC() and caching its result, so it is only computed once per function. (cherry picked from commit e360a16fee2dc3cb632ace556fb715832f488a90)
Welcome to the LLVM project!
This repository contains the source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and run-time environments.
The LLVM project has multiple components. The core of the project is itself called “LLVM”. This contains all of the tools, libraries, and header files needed to process intermediate representations and convert them into object files. Tools include an assembler, disassembler, bitcode analyzer, and bitcode optimizer.
C-like languages use the Clang frontend. This component compiles C, C++, Objective-C, and Objective-C++ code into LLVM bitcode -- and from there into object files, using LLVM.
Other components include: the libc++ C++ standard library, the LLD linker, and more.
Consult the Getting Started with LLVM page for information on building and running LLVM.
For information on how to contribute to the LLVM project, please take a look at the Contributing to LLVM guide.
Join the LLVM Discourse forums, Discord chat, or #llvm IRC channel on OFTC.
The LLVM project has adopted a code of conduct for participants to all modes of communication within the project.