[all-commits] [llvm/llvm-project] 713a20: [CGData] Clang Options (#90304)

Kyungwoo Lee via All-commits all-commits at lists.llvm.org
Sun Sep 15 16:05:03 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 713a2029578eb36a29793105948d8e4fe965da18
      https://github.com/llvm/llvm-project/commit/713a2029578eb36a29793105948d8e4fe965da18
  Author: Kyungwoo Lee <kyulee at meta.com>
  Date:   2024-09-15 (Sun, 15 Sep 2024)

  Changed paths:
    M clang/docs/UsersManual.rst
    M clang/include/clang/Driver/Options.td
    M clang/lib/Driver/ToolChains/CommonArgs.cpp
    M clang/lib/Driver/ToolChains/Darwin.cpp
    A clang/test/Driver/codegen-data.c

  Log Message:
  -----------
  [CGData] Clang Options (#90304)

This adds new Clang flags to support codegen (CG) data:
- `-fcodegen-data-generate{=path}`: This flag passes
`-codegen-data-generate` as a boolean to the LLVM backend, causing the
raw CG data to be emitted into a custom section. Currently, for LLD
MachO only, it also passes `--codegen-data-generate-path=<path>` so that
the indexed CG data file can be automatically produced at link time. For
linkers that do not yet support this feature, `llvm-cgdata` can be used
manually to merge this CG data in object files.
- `-fcodegen-data-use{=path}`: This flag passes
`-codegen-data-use-path=<path>` to the LLVM backend, enabling the use of
specified CG data to optimistically outline functions.
 - The default `<path>` is set to `default.cgdata` when not specified.
 
This depends on https://github.com/llvm/llvm-project/pull/108733.
This is a patch for
https://discourse.llvm.org/t/rfc-enhanced-machine-outliner-part-2-thinlto-nolto/78753.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list