Manual-sync mirror of chromium.googlesource.com/external/github.com/llvm/llvm-project (bare monorepo, no subtree suffix)
Find a file
1sgtpepper 8518c74b5e
[mlir][llvm] Preserve function entry count metadata (#204707)
Fixes #202374.

Preserve LLVM function `!prof` metadata for:
- `synthetic_function_entry_count`
- `function_entry_count` with import GUID operands

The importer represents the entry count, count kind, and trailing import
GUID operands in a single `#llvm.function_entry_count` attribute,
validates malformed operands before mutating the operation, and exports
the metadata through `llvm::Function::setEntryCount`.

Tests cover import, export, malformed metadata operands, synthetic
counts, synthetic counts with trailing operands, import GUID
round-tripping, and raw i64 bit-pattern preservation.

Checks:
- `git diff --check`
- `git clang-format --diff origin/main -- ...`
- `llvm-as -disable-output` smoke check

Codex was used in making this PR.
2026-07-14 15:12:33 +02:00
.ci Revert "[lldb][Windows][CI] split steps (#206946)" (#208519) 2026-07-09 21:45:47 +01:00
.github [GitHub] Install libedit, libxml2 and liblzma to be used in Linux LLDB builds (#209129) 2026-07-14 09:16:58 +01:00
bolt [llvm-profgen][test] Split tests by target architecture (#207724) 2026-07-13 11:17:29 +05:30
clang [clang] Prevent nested RecoveryExpr in BuildConvertedConstantExpression (#207072) 2026-07-14 06:10:54 -07:00
clang-tools-extra [clang-tidy] Flag consecutive scoped_locks in use-scoped-lock (#209272) 2026-07-14 10:39:24 +03:00
cmake Revert "Reapply "runtimes: Pass CMAKE_SYSTEM_NAME based on target triple" (#205133) (#205522)" (#208644) 2026-07-10 08:58:58 +00:00
compiler-rt Revert "[compiler-rt] [sanitizer_common] Fix SIGSEGV in ForEachMappedRegion for DSOs with custom image base" (#209371) 2026-07-13 21:35:37 -07:00
cross-project-tests [DTLTO] terminology - use extract rather than serialize (#208468) 2026-07-14 13:29:27 +01:00
flang [Passes] Replace OptimizationLevel with an enum (#209424) 2026-07-14 13:24:29 +02:00
flang-rt [flang-rt] Disable tests by default when cross-compiling (#208926) 2026-07-14 20:21:31 +08:00
libc [libc] Fix non-relative includes of __llvm-libc-common.h (#209412) 2026-07-14 14:14:17 +02:00
libclc [CMake] Warn when the version of CMake is older than 3.31.0 (#204203) 2026-06-29 11:16:27 -07:00
libcxx [libc++][NFC] Inline std::function members into the class body (#209461) 2026-07-14 15:05:18 +02:00
libcxxabi [libcxx][libcxxabi] Remove OVERRIDABLE_FUNCTION macro (#209323) 2026-07-14 00:15:30 -07:00
libsycl [libsycl] Implement memcpy API (#205369) 2026-07-07 11:29:57 +02:00
libunwind [libunwind][Hexagon] Save/restore full r0-r7 in getcontext/jumpto (#208753) 2026-07-13 08:18:51 -05:00
lld [DTLTO] terminology - use extract rather than serialize (#208468) 2026-07-14 13:29:27 +01:00
lldb [lldb] Return llvm::Error from DisableLogChannel (#207004) 2026-07-14 11:29:00 +00:00
llvm [DTLTO] terminology - use extract rather than serialize (#208468) 2026-07-14 13:29:27 +01:00
llvm-libgcc [CMake] Warn when the version of CMake is older than 3.31.0 (#204203) 2026-06-29 11:16:27 -07:00
mlir [mlir][llvm] Preserve function entry count metadata (#204707) 2026-07-14 15:12:33 +02:00
offload [OpenMP][AMDGPU][CI] Fix libc build (#209336) 2026-07-13 23:46:24 +00:00
openmp [openmp] Apply a mingw/64 bit codepath to arm64ec too (#209297) 2026-07-14 09:18:39 +03:00
orc-rt [orc-rt] Add ORC_RT_UNREACHABLE / ORC_RT_BUILTIN_UNREACHABLE (#209466) 2026-07-14 13:05:55 +00:00
polly [Passes] Replace OptimizationLevel with an enum (#209424) 2026-07-14 13:24:29 +02:00
runtimes Revert "Reapply "runtimes: Pass CMAKE_SYSTEM_NAME based on target triple" (#205133) (#205522)" (#208644) 2026-07-10 08:58:58 +00:00
third-party Fix a warning and an uninitialized variable in benchmark (#200927) 2026-06-02 13:49:06 -07:00
utils [Bazel] Fixes 16094a8 (#209435) 2026-07-14 06:30:37 -05:00
.clang-format Enforce Unix line endings for Clang/LLVM/MLIR projects (#161460) 2025-10-02 06:09:12 -07:00
.clang-format-ignore [Docs] Update coding standard for TD files (#200848) 2026-06-01 21:35:58 +01:00
.clang-tidy Add default empty header filter regex to root .clang-tidy (#167386) 2025-11-11 01:36:25 +03:00
.git-blame-ignore-revs Add "Split clang/lib/CodeGen/CGBuiltin.cpp" to .git-blame-ignore-revs (#203419) 2026-06-12 12:03:28 +01:00
.gitattributes [libclang/python] Enable packaging clang python bindings (#125806) 2025-11-24 17:21:24 -08:00
.gitignore gitignore: Add emacs lock files (#205055) 2026-06-22 18:19:29 +02:00
.mailmap [mailmap] Add mailmap entry for myself (#189447) 2026-03-30 18:35:34 +00:00
CODE_OF_CONDUCT.md
CONTRIBUTING.md
LICENSE.TXT
pyproject.toml [docs] Create utils/docs (#203962) 2026-06-24 15:12:48 -04:00
README.md
SECURITY.md [SECURITY.md] add pointers to "what is a security issue" (#177372) 2026-01-22 17:19:09 -07:00

The LLVM Compiler Infrastructure

OpenSSF Scorecard OpenSSF Best Practices libc++

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.

Getting the Source Code and Building LLVM

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.

Getting in touch

Join the LLVM Discourse forums, Discord chat, LLVM Office Hours or Regular sync-ups.

The LLVM project has adopted a code of conduct for participants to all modes of communication within the project.