llvm-project是一个模块化、可复用的编译器及工具链技术的集合。此fork用于添加昇腾上编译器的功能,支持AscendNPU IR等项目。
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[CI] Make Premerge only Comment if Tests Failed (#169102) Before, we were unconditionally writing a message. After this patch, we only write a message when the tests failed, or there is already an existing comment. This is how this workflow was intended to work originally, but is not how it ended up working, mostly due to my misconceptions around how the existing code formatter pass handled this case (we need to actually not write out any comments, not write out a specific message). | 8 个月前 | |
Update actions/checkout action to v6 (#169258) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [actions/checkout](https://redirect.github.com/actions/checkout) | action | major | v5.0.0 -> v6.0.0 | | 7 个月前 | |
[BOLT] Extend Inliner to work on functions with Pointer Authentication (#162458) The inliner uses DirectSP to check if a function has instructions that modify the SP. Exceptions are stack Push and Pop instructions. We can also allow pointer signing and authenticating instructions. The inliner removes the Return instructions from the inlined functions. If it is a fused pointer-authentication-and-return (e.g. RETAA), we have to generate a new authentication instruction. | 7 个月前 | |
Revert " [clang] Refactor to remove clangDriver dependency from clangFrontend and flangFrontend (#165277)" (#169397) This reverts commit 3773bbe and relands the last revert attempt 40334b8. 3773bbe broke the build for the build configuration described in here: https://github.com/llvm/llvm-project/pull/165277#issuecomment-3572432250 | 7 个月前 | |
[libclang/python] Enable packaging clang python bindings (#125806) This adds a pyproject.toml file for packaging the clang Python bindings as a sdist tarball and pure Python wheel packages for the clang python bindings. It is required to move updates of the clang and libclang PyPI packages to the LLVM monorepo. Versioning information is derived from LLVM git tags (using hatch-vcs, which is based on setuptools_scm), so no manual updates are needed to bump version numbers. The minimum python version required is set to 3.10 due to cindex.py using PEP 604 union type syntax (str | bytes | None). The .git_archival.txt file is populated with version information needed to get accurate version information if the bindings are installed from an LLVM/clang source code archive. The .gitignore file is populated with files that may get created as part of building/testing the sdist and wheel that should not be committed to source control. This is first step for addressing #125220, and moving publishing of the clang and libclang PyPI packages into the LLVM monorepo. Signed-off-by: Ryan Mast <mast.ryan@gmail.com> | 7 个月前 | |
[CMake][gRPC] Update FindGRPC.cmake to support newer gRPC versions (#162935) Update the logic to find gRPC to always favor CMake find_package implementation including for builds on macOS that uses homebrew, where gRPCConfig.cmake is also installed to provide an accurate target dependencies to link against. This fixes the problem that newer gRPC version has broken up the libraries into smaller pieces and the hard coded list of libraries in the implementation can no longer work. Fixes: https://github.com/llvm/llvm-project/issues/59844 | 9 个月前 | |
[scudo] Only print stats when the test fails. (#168000) When running the tests on other platforms, printing the stats on all of the passing tests makes it hard to see failure output. Therefore, this change only prints the stats if the test actually fails. | 7 个月前 | |
[llvm][DebugInfo] Unwrap template parameters that are typedefs when reconstructing DIE names (#168734) Depends on: * https://github.com/llvm/llvm-project/pull/168725 When compiling with -glldb, we repoint the DW_AT_type of a DIE to be a typedef that refers to the preferred_name. I.e.,: template <typename T> structure t7; using t7i = t7<int>; template <typename T> struct __attribute__((__preferred_name__(t7i))) t7 {}; template <typename... Ts> void f1() int main() { f1<t7i>(); } would produce following (minified) DWARF: DW_TAG_subprogram DW_AT_name ("_STN|f1|<t7<int> >") DW_TAG_template_type_parameter DW_AT_type (0x0000299c "t7i") ... DW_TAG_typedef DW_AT_type (0x000029a7 "t7<int>") DW_AT_name ("t7i") Note how the DW_AT_type of the template parameter is a typedef itself (instead of the canonical type). The DWARFTypePrinter would take the DW_AT_name of this typedef when reconstructing the name of f1, so we would end up with a verifier failure: error: Simplified template DW_AT_name could not be reconstituted: original: f1<t7<int> > reconstituted: f1<t7i> Fixing this allows us to un-XFAIL the simplified-template-names.cpp test in cross-project-tests. Unfortunately this is only tested on Darwin, where LLDB tuning is the default. AFAIK, there is no other case where the template parameter type wouldn't be canonical. | 8 个月前 | |
| 8 个月前 | ||
[flang][cuda] Add support for cluster_block_index in cooperative groups (#169427) | 7 个月前 | |
[libc] Add missing dependencies for arpa/inet.h header. (#168951) Add dependency on headers with in_addr and in_addr_t type definitions to ensure that these headers will be properly installed by "install-libc" CMake target. | 8 个月前 | |
[libclc] Add atomic_init, atomic_flag_clear and atomic_flag_test_and_set (#168329) | 7 个月前 | |
[libc++][string] Applied [[nodiscard]] to non-member functions (#169330) [[nodiscard]] should be applied to functions where discarding the return value is most likely a correctness issue. - https://libcxx.llvm.org/CodingGuidelines.html#apply-nodiscard-where-relevant | 7 个月前 | |
[libc++][NFC] Move __memory/aligned_alloc.h into src/ (#166172) This header is only ever used inside src/, so we might as well move it there. As a drive-by this also removes some dead code. | 7 个月前 | |
[libsycl] Add Maintainers.md file (#168550) Signed-off-by: Tikhomirova, Kseniya <kseniya.tikhomirova@intel.com> | 7 个月前 | |
[Unwind][AArch64] Match sigreturn instructions in big endian (#167139) Since insns are always stored LE, on a BE system the opcodes will be loaded byte-reversed. Therefore, define two sets of opcodes, one for LE and one for BE. | 8 个月前 | |
[LLD][MinGW] Handle MIPS machine (#157742) | 8 个月前 | |
[lldb] Add mock dwarf delegate for testing dwarf expressions (#168468) This commit adds a MockDwarfDelegate class that can be used to control what dwarf version is used when evaluating an expression. We also add a simple test that shows how dwarf version can change the result of the expression. | 7 个月前 | |
[runtimes] Correctly apply libdir subdir for multilib (#93354) We weren't applying the libdir subdir to header directories but this is necessary for correctness when building e.g. ASan variant. This change also updates path construction logic accross all runtimes and ensures they're consistent. | 2 年前 | |
[Mips] Add instruction selection for strict FP (#168870) This consists of marking the various strict opcodes as legal, and adjusting instruction selection patterns so that 'op' is 'any_op'. The changes are similar to those in D114946 for AArch64 and #160696 for ARM. Only Mips32/64 FPU instructions are affected. Added lowering for for STRICT_FP_TO_UINT and STRICT_FP_TO_SINT ops. | 7 个月前 | |
[mlir][arith] Add support for sitofp, uitofp to ArithToAPFloat (#169284) Add support for arith.sitofp and arith.uitofp. | 7 个月前 | |
[NFC][OpenMP] Add use_device_ptr/addr tests for when the lookup fails. (#169428) As per OpenMP 5.1, the pointers are expected to retain their original values when a lookup fails and there is no device pointer to translate to. | 7 个月前 | |
[OpenMP][libomp] Add transparent task flag bit to kmp_tasking_flags (#168873) Clang is adding support for the new OpenMP transparent clause on task and taskloop directives. The parsing and semantic handling for this clause is introduced in https://github.com/llvm/llvm-project/pull/166810 . To allow the compiler to communicate this clause to the OpenMP runtime, a dedicated bit in kmp_tasking_flags is required. This patch adds a new compiler-reserved bit transparent to the kmp_tasking_flags structure. | 8 个月前 | |
[orc-rt] Remove unused Session argument from WrapperFunction::call. (#169255) | 7 个月前 | |
[Polly] Remove ScopPass infrastructure (#125783) PR #125442 replaces the pass-based Polly architecture with a monolithic pass consisting of phases. Reasons listed in https://github.com/llvm/llvm-project/pull/125442. With this change, the SCoP-passes became redundant problematic versions of the same functionality and are removed. | 8 个月前 | |
[Runtimes] Default build must use its own output dirs (#168266) Post-commit fix of #164794 reported at https://github.com/llvm/llvm-project/pull/164794#issuecomment-3536253493 LLVM_LIBRARY_OUTPUT_INTDIR and LLVM_RUNTIME_OUTPUT_INTDIR is used by AddLLVM.cmake as output directories. Unless we are in a bootstrapping-build, It must not point to directories found by find_package(LLVM) which may be read-only directories. MLIR for instance sets thesese variables to its own build output directory, so should the runtimes. | 8 个月前 | |
[runtimes][GTest] LLVM-independent unittests (#164794) The LLVM-customized GTest has a dependency on LLVM to support llvm::raw_ostream and hence has to link to LLVMSupport. The runtimes use the LLVMSupport from the bootstrapping LLVM build. The problem is that the boostrapping compiler and the runtimes target can diverge in their ABI, even in the runtimes default build. For instance, Clang is built using gcc which uses libstdc++, but the runtimes is built by Clang which can be configured to use libcxx by default. Altough it does not use gcc, this issue has caused [flang-aarch64-libcxx](https://lab.llvm.org/buildbot/#/builders/89)) to break, and is still (again?) broken. This patch makes the runtimes' GTest independent from LLVMSupport so we do not link any runtimes component with LLVM components. Runtime projects that use GTest unittests: * flang-rt * libc * compiler-rt: Adds gtest-all.cpp with [GTEST_NO_LLVM_SUPPORT=1](https://github.com/llvm/llvm-project/blob/f801b6f67ea896d6e4d2de38bce9a79689ceb254/compiler-rt/CMakeLists.txt#L723) to each unittest without using llvm_gtest. Not touched by this PR. * openmp: Handled by #159416. Not touched for now by this PR to avoid conflict. The current state of this PR tries to reuse https://github.com/llvm/llvm-project/blob/main/third-party/unittest/CMakeLists.txt as much as possible, altough personally I would prefer to make it use "modern CMake" style. third-party/unittest/CMakeLists.txt will detect whether it is used in runtimes build and adjaust accordingly. It creates a different target for LLVM (llvm_gtest, NFCI) and another one for the runtimes (runtimes_gtest). It is not possible to reuse llvm_gtest for both since llvm_gtest is imported using find_package(LLVM) if configured using LLVM_INSTALL_GTEST. An alias default_gtest is used to select between the two. default_gtest could also be used for openmp which also supports standalone and [LLVM_ENABLE_PROJECTS](https://github.com/llvm/llvm-project/pull/152189) build mode. | 8 个月前 | |
[bazel][libc] Remove target compatibility restrictions for float128 (#169292) The restrictions here aren't nearly as much about the OS as the compiler and architecture, but the Bazel restriction was OS-based. Everything seems to work well on even Arm64 macOS, and I would expect most BSDs and other OSes to work well with Clang's support on x86-64. The source code here already handles detecting when there is compiler support for the type. And the users of this don't select or do anything else to conditionally include the header, so it seems better to not restrict access to the header from the build system, and instead continue making the source code compatible or a no-op on relevant configurations. | 7 个月前 | |
Enforce Unix line endings for Clang/LLVM/MLIR projects (#161460) Change top-level and LLVM/MLIR/Clang .clang-format files to enforce Unix line ending. | 9 个月前 | |
Add empty top level .clang-format-ignore (#136022) Otherwise if the source tree is embedded in another project with a .clang-format-ignore, some clang-format tests fail because they use that .clang-format-ignore. | 1 年前 | |
Add default empty header filter regex to root .clang-tidy (#167386) After https://github.com/llvm/llvm-project/pull/164165, we emit warnings from non-system headers by default. This change only preserves functionality of clang-tidy as it was before the change. | 8 个月前 | |
[clang-tidy][NFC] Add clang-tidy formatting commit to .git-blame-ignore-revs (#167126) Co-authored-by: Baranov Victor <bar.victor.2002@gmail.com> | 8 个月前 | |
[libclang/python] Enable packaging clang python bindings (#125806) This adds a pyproject.toml file for packaging the clang Python bindings as a sdist tarball and pure Python wheel packages for the clang python bindings. It is required to move updates of the clang and libclang PyPI packages to the LLVM monorepo. Versioning information is derived from LLVM git tags (using hatch-vcs, which is based on setuptools_scm), so no manual updates are needed to bump version numbers. The minimum python version required is set to 3.10 due to cindex.py using PEP 604 union type syntax (str | bytes | None). The .git_archival.txt file is populated with version information needed to get accurate version information if the bindings are installed from an LLVM/clang source code archive. The .gitignore file is populated with files that may get created as part of building/testing the sdist and wheel that should not be committed to source control. This is first step for addressing #125220, and moving publishing of the clang and libclang PyPI packages into the LLVM monorepo. Signed-off-by: Ryan Mast <mast.ryan@gmail.com> | 7 个月前 | |
[.gitignore] Ignore .claude and .gemini in subdirectories (#167029) Currently .claude/ and .gemini/ are only ignored in the root of the repo. Developers might conceivable run these tools in project subdirectories, in which case these should be ignored as well. | 8 个月前 | |
[mailmap] Update my name | 1 年前 | |
[llvm] Add CODE_OF_CONDUCT.md (#65816) Add a CODE_OF_CONDUCT.md file to the root of the repository. The file itself references the LLVM Community Code of Conduct. GitHub will recognize this file and put a link to it to the right of the repository, similar to the license and security policy, making the CoC easier to discover. | 2 年前 | |
[www][docs] Remove last mentions of IRC (#139076) It's the end of an era. The IRC channel was previously where the community gathered to discuss technical topics but is now a ghost town where the primary activity is moderators (me) kickbanning the same individual dozens of times a day for CoC violations and the secondary activity is telling the occasional person to come to Discord for help. The number of people engaging on IRC for the community's intended purposes seems to be roughly one person a month. So this removes all remaining mentions of IRC from our documentation so that it no longer appears to be an "official" channel for communicating with the community. It also removes IRC handles from the various maintainers lists, since those would stand out as confusing anachronisms. The IRC channel topic already recommends people come to the Discord server. There is no way to "shut down" an IRC channel such that it no longer exists, so the channel will continue to exist on OFTC, but will be unmoderated. (This was previously discussed in https://discourse.llvm.org/c/llvm/5 but some mentions persisted.) | 1 年前 | |
[docs] Add LICENSE.txt to the root of the mono-repo This will make it easier to find the LICENSE and some software also looks in the root to automatically find it. Reviewed By: kristof.beyls, lattner Differential Revision: https://reviews.llvm.org/D132018 | 3 年前 | |
[docs] README: Switch link to clang.llvm.org to use HTTPS. | 2 年前 | |
[docs] Describe reporting security issues on the chromium tracker. To track security issues, we're starting with the chromium bug tracker (using the llvm project there). We considered using Github Security Advisories. However, they are currently intended as a way for project owners to publicize their security advisories, and aren't well-suited to reporting issues. This also moves the issue-reporting paragraph to the beginning of the document, in part to make it more discoverable, in part to allow the anchor-linking to actually display the paragraph at the top of the page. Note that this doesn't update the concrete list of security-sensitive areas, which is still an open item. When we do, we may want to move the list of security-sensitive areas next to the issue-reporting paragraph as well, as it seems like relevant information needed in the reporting process. Finally, when describing the discission medium, this splits the topics discussed into two: the concrete security issues, discussed in the issue tracker, and the logistics of the group, in our mailing list, as patches on public lists, and in the monthly sync-up call. While there, add a SECURITY.md page linking to the relevant paragraph. Differential Revision: https://reviews.llvm.org/D100873 | 5 年前 | |
[lldb] Configure pyright to the documented minimum python version (#162952) Pyright is an MIT-licensed static type checker and can be found at https://github.com/microsoft/pyright there are also various integrations to use it as an LSP server in various editors which is the main way I use it. It's useful on our python scripts to detect issues such as where functions are called with unexpected types or it's possible to access obj.attr on an object that doesn't have that attribute. It can be used without any configuration this config setting causes it to also report issues with type hints that do not meet our python 3.8 minimum such as this one from dap_server.py: init_commands: list[str], subscripting the builtin type like that requires python 3.9 while the 3.8 equivalent is: from typing import List ... init_commands: List[str], In practice these scripts still work on 3.8 because type hints aren't normally evaluated during normal execution but since we have a minimum, we should fully comply with it. Note: The error pyright reports for this particular issue isn't great: error: Subscript for class "list" will generate runtime exception; enclose type expression in quotes This is technically correct as it is possible to evaluate type hints at runtime but I believe anything that would do so would also evaluate the string form as well and still hit the runtime exception. A better suggestion in this case would have been the 3.8 compatible List[str]. However, it is better than silently passing code that doesn't confirm to the minimum. | 8 个月前 |
以下内容由 AI 翻译,如有问题请 点此提交 issue 反馈
LLVM 编译器基础设施
欢迎来到 LLVM 项目!
本代码库包含 LLVM 的源代码,LLVM 是一个用于构建高度优化的编译器、优化器和运行时环境的工具集。
LLVM 项目包含多个组件。项目的核心部分本身就称为“LLVM”,其中包含处理中间表示并将其转换为目标文件所需的所有工具、库和头文件。工具包括汇编器、反汇编器、位码分析器和位码优化器。
类 C 语言使用 Clang 前端。该组件将 C、C++、Objective-C 和 Objective-C++ 代码编译为 LLVM 位码,然后使用 LLVM 将其进一步转换为目标文件。
其他组件包括: libc++ C++ 标准库、 LLD 链接器 等。
获取源代码并构建 LLVM
有关构建和运行 LLVM 的信息,请参考 LLVM 入门指南 页面。
有关如何为 LLVM 项目做贡献的信息,请查看 LLVM 贡献指南。
联系我们
加入 LLVM Discourse 论坛、Discord 聊天、 LLVM 办公时间 或 定期同步会议。
LLVM 项目已采用 行为准则,适用于项目内所有沟通方式的参与者。