llvm-project/clang
Junfeng Dong 72acd042ba Pass split-machine-functions to code generator when flto is used
-fsplit-machine-functions is an optimization in codegen phase. when -flto is use, clang generate IR bitcode in .o files, and linker will call into these codegen optimization passes. Current clang driver doesn't pass this option to linker when both -fsplit-machine-functions and -flto are used, so the optimization is silently ignored.  My fix generates linker option -plugin-opt=-split-machine-functions for this case. It allows the linker to pass "split-machine-functions" to code generator to turn on that optimization.  It works for both gold and lld.

Reviewed By: hoy, wenlei

Differential Revision: https://reviews.llvm.org/D121969
2022-03-23 08:55:30 -07:00
..
bindings
cmake [CMake][Fuchsia] Switch to lld on Apple platforms 2022-03-22 01:06:30 -07:00
docs [Concepts] Fix placeholder constraints when references are involved 2022-03-23 11:14:58 -04:00
examples clang-analyzer plugins require LLVM_ENABLE_PLUGINS also 2022-02-16 11:59:09 -05:00
include [Clang][NFC] Some `const` for `IdentifierInfo *`s feeding `DeclarationName` 2022-03-23 11:07:56 -04:00
lib Pass split-machine-functions to code generator when flto is used 2022-03-23 08:55:30 -07:00
runtime Fix running orc-rt tests with LLVM_BUILD_EXTERNAL_COMPILER_RT 2022-01-25 08:27:40 -08:00
test Pass split-machine-functions to code generator when flto is used 2022-03-23 08:55:30 -07:00
tools [clang-format] [doc] Add script to automatically update help output in ClangFormat.rst. 2022-03-23 13:17:50 +01:00
unittests [clang-format] Handle attributes before case label. Relanded. 2022-03-23 16:24:24 +01:00
utils [RISCV][NFC] Refine and refactor RISCVVEmitter and riscv_vector.td. 2022-03-22 09:58:43 -07:00
www Replace links to archived mailing lists by links to Discourse forums 2022-03-23 10:10:20 -04:00
.clang-format
.clang-tidy
.gitignore
CMakeLists.txt [CMake][Clang] Skip host link version detection for lld on Darwin 2022-03-21 18:32:03 -07:00
CODE_OWNERS.TXT
INSTALL.txt
LICENSE.TXT
ModuleInfo.txt
NOTES.txt
README.txt Replace links to archived mailing lists by links to Discourse forums 2022-03-23 10:10:20 -04:00

README.txt

//===----------------------------------------------------------------------===//
// C Language Family Front-end
//===----------------------------------------------------------------------===//

Welcome to Clang.  This is a compiler front-end for the C family of languages
(C, C++, Objective-C, and Objective-C++) which is built as part of the LLVM
compiler infrastructure project.

Unlike many other compiler frontends, Clang is useful for a number of things
beyond just compiling code: we intend for Clang to be host to a number of
different source-level tools.  One example of this is the Clang Static Analyzer.

If you're interested in more (including how to build Clang) it is best to read
the relevant web sites.  Here are some pointers:

Information on Clang:             http://clang.llvm.org/
Building and using Clang:         http://clang.llvm.org/get_started.html
Clang Static Analyzer:            http://clang-analyzer.llvm.org/
Information on the LLVM project:  http://llvm.org/

If you have questions or comments about Clang, a great place to discuss them is
on the Clang forums:
  https://discourse.llvm.org/c/clang/

If you find a bug in Clang, please file it in the LLVM bug tracker:
  http://llvm.org/bugs/