Skip to content

Commit da965fc

Browse files
Merge branch 'main' into cleanup_20250831_SmallPtrSet_NumEntries2
2 parents 00f0b71 + 638bd11 commit da965fc

File tree

471 files changed

+22767
-7712
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

471 files changed

+22767
-7712
lines changed

.github/new-prs-labeler.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,6 @@ LTO:
9090
- llvm/lib/Transforms/*/FunctionImport*
9191
- llvm/tools/gold/**
9292

93-
mc:
94-
- llvm/*/MC/**
95-
9693
clang:driver:
9794
- clang/*/Driver/**
9895

@@ -621,6 +618,12 @@ llvm:adt:
621618
llvm:support:
622619
- llvm/**/Support/**
623620

621+
# Skip llvm/test/MC and llvm/unittests/MC, which includes target-specific directories.
622+
llvm:mc:
623+
- llvm/include/llvm/MC/**
624+
- llvm/lib/MC/**
625+
- llvm/tools/llvm-mc/**
626+
624627
llvm:transforms:
625628
- llvm/lib/Transforms/**
626629
- llvm/include/llvm/Transforms/**

.github/workflows/bazel-checks.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Bazel Checks
2+
3+
permissions:
4+
contents: read
5+
6+
on:
7+
push:
8+
paths:
9+
- '.github/workflows/bazel-checks.yml'
10+
- 'utils/bazel/**'
11+
branches:
12+
- main
13+
pull_request:
14+
paths:
15+
- '.github/workflows/bazel-checks.yml'
16+
- 'utils/bazel/**'
17+
18+
jobs:
19+
buildifier:
20+
name: "Buildifier"
21+
runs-on: ubuntu-24.04
22+
if: github.repository == 'llvm/llvm-project'
23+
steps:
24+
- name: Fetch LLVM sources
25+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
26+
- name: Setup Buildifier
27+
run: |
28+
sudo curl -L https://github.com/bazelbuild/buildtools/releases/download/v8.2.1/buildifier-linux-amd64 -o /usr/bin/buildifier
29+
sudo chmod +x /usr/bin/buildifier
30+
- name: Run Buildifier
31+
run: |
32+
buildifier --mode=check $(find ./utils/bazel -name *BUILD*)

.github/workflows/containers/github-action-ci/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ RUN curl -L 'https://github.com/mozilla/sccache/releases/download/v0.10.0/sccach
8181

8282
ENV LLVM_SYSROOT=$LLVM_SYSROOT
8383
ENV PATH=${LLVM_SYSROOT}/bin:${PATH}
84+
ENV CC=clang
85+
ENV CXX=clang++
8486

8587
# Create a new user to avoid test failures related to a lack of expected
8688
# permissions issues in some tests. Set the user id to 1001 as that is the

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,11 @@ autoconf/autom4te.cache
5252
# CLion project configuration
5353
/.idea
5454
/cmake-build*
55+
# Coding assistants' stuff
56+
/CLAUDE.md
57+
/.claude/
58+
/GEMINI.md
59+
/.gemini/
5560

5661
#==============================================================================#
5762
# Directories to ignore (do not add trailing '/'s, they skip symlinks).

bolt/include/bolt/Core/MCPlusBuilder.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -740,6 +740,10 @@ class MCPlusBuilder {
740740
return false;
741741
}
742742

743+
/// Return true if the hlt instruction under the x86, otherwise, default to
744+
/// false.
745+
virtual bool isX86HLT(const MCInst &Inst) const { return false; }
746+
743747
/// Return the width, in bytes, of the memory access performed by \p Inst, if
744748
/// this is a pop instruction. Return zero otherwise.
745749
virtual int getPopSize(const MCInst &Inst) const {

bolt/lib/Core/MCPlusBuilder.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,10 @@ bool MCPlusBuilder::equals(const MCSpecifierExpr &A, const MCSpecifierExpr &B,
132132
}
133133

134134
bool MCPlusBuilder::isTerminator(const MCInst &Inst) const {
135-
return Analysis->isTerminator(Inst) ||
136-
(opts::TerminalTrap && Info->get(Inst.getOpcode()).isTrap());
135+
return (opts::TerminalTrap && Info->get(Inst.getOpcode()).isTrap()) ||
136+
Analysis->isTerminator(Inst)
137+
? !isX86HLT(Inst)
138+
: false;
137139
}
138140

139141
void MCPlusBuilder::setTailCall(MCInst &Inst) const {

bolt/lib/Target/X86/X86MCPlusBuilder.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,10 @@ class X86MCPlusBuilder : public MCPlusBuilder {
223223
return Inst.getOpcode() == X86::ENDBR32 || Inst.getOpcode() == X86::ENDBR64;
224224
}
225225

226+
bool isX86HLT(const MCInst &Inst) const override {
227+
return Inst.getOpcode() == X86::HLT;
228+
}
229+
226230
int getPopSize(const MCInst &Inst) const override {
227231
switch (Inst.getOpcode()) {
228232
case X86::POP16r:

bolt/test/X86/cfg_build_hlt.s

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
## Check CFG for halt instruction
2+
3+
# RUN: %clang %cflags %s -static -o %t.exe -nostdlib
4+
# RUN: llvm-bolt %t.exe --print-cfg --print-only=main -o %t 2>&1 | FileCheck %s --check-prefix=CHECK-CFG
5+
# RUN: llvm-objdump -d %t --print-imm-hex | FileCheck %s --check-prefix=CHECK-BIN
6+
7+
# CHECK-CFG: BB Count : 1
8+
# CHECK-BIN: <main>:
9+
# CHECK-BIN-NEXT: f4 hlt
10+
# CHECK-BIN-NEXT: c3 retq
11+
12+
.global main
13+
.type main, %function
14+
main:
15+
hlt
16+
retq
17+
.size main, .-main

clang-tools-extra/docs/ReleaseNotes.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
.. If you want to modify sections/contents permanently, you should modify both
2+
ReleaseNotes.rst and ReleaseNotesTemplate.txt.
3+
14
====================================================
25
Extra Clang Tools |release| |ReleaseNotesTitle|
36
====================================================
Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
.. If you want to modify sections/contents permanently, you should modify both
2+
ReleaseNotes.rst and ReleaseNotesTemplate.txt.
3+
4+
====================================================
5+
Extra Clang Tools |release| |ReleaseNotesTitle|
6+
====================================================
7+
8+
.. contents::
9+
:local:
10+
:depth: 3
11+
12+
Written by the `LLVM Team <https://llvm.org/>`_
13+
14+
.. only:: PreRelease
15+
16+
.. warning::
17+
These are in-progress notes for the upcoming Extra Clang Tools |version| release.
18+
Release notes for previous releases can be found on
19+
`the Download Page <https://releases.llvm.org/download.html>`_.
20+
21+
Introduction
22+
============
23+
24+
This document contains the release notes for the Extra Clang Tools, part of the
25+
Clang release |release|. Here we describe the status of the Extra Clang Tools in
26+
some detail, including major improvements from the previous release and new
27+
feature work. All LLVM releases may be downloaded from the `LLVM releases web
28+
site <https://llvm.org/releases/>`_.
29+
30+
For more information about Clang or LLVM, including information about
31+
the latest release, please see the `Clang Web Site <https://clang.llvm.org>`_ or
32+
the `LLVM Web Site <https://llvm.org>`_.
33+
34+
Note that if you are reading this file from a Git checkout or the
35+
main Clang web page, this document applies to the *next* release, not
36+
the current one. To see the release notes for a specific release, please
37+
see the `releases page <https://llvm.org/releases/>`_.
38+
39+
What's New in Extra Clang Tools |release|?
40+
==========================================
41+
42+
Some of the major new features and improvements to Extra Clang Tools are listed
43+
here. Generic improvements to Extra Clang Tools as a whole or to its underlying
44+
infrastructure are described first, followed by tool-specific sections.
45+
46+
Major New Features
47+
------------------
48+
49+
Improvements to clangd
50+
----------------------
51+
52+
Inlay hints
53+
^^^^^^^^^^^
54+
55+
Diagnostics
56+
^^^^^^^^^^^
57+
58+
Semantic Highlighting
59+
^^^^^^^^^^^^^^^^^^^^^
60+
61+
Compile flags
62+
^^^^^^^^^^^^^
63+
64+
Hover
65+
^^^^^
66+
67+
Code completion
68+
^^^^^^^^^^^^^^^
69+
70+
Code actions
71+
^^^^^^^^^^^^
72+
73+
Signature help
74+
^^^^^^^^^^^^^^
75+
76+
Cross-references
77+
^^^^^^^^^^^^^^^^
78+
79+
Objective-C
80+
^^^^^^^^^^^
81+
82+
Miscellaneous
83+
^^^^^^^^^^^^^
84+
85+
Improvements to clang-doc
86+
-------------------------
87+
88+
Improvements to clang-query
89+
---------------------------
90+
91+
Improvements to clang-tidy
92+
--------------------------
93+
94+
New checks
95+
^^^^^^^^^^
96+
97+
New check aliases
98+
^^^^^^^^^^^^^^^^^
99+
100+
Changes in existing checks
101+
^^^^^^^^^^^^^^^^^^^^^^^^^^
102+
103+
Removed checks
104+
^^^^^^^^^^^^^^
105+
106+
Miscellaneous
107+
^^^^^^^^^^^^^
108+
109+
Improvements to include-fixer
110+
-----------------------------
111+
112+
Improvements to clang-include-fixer
113+
-----------------------------------
114+
115+
Improvements to modularize
116+
--------------------------
117+
118+
Improvements to pp-trace
119+
------------------------
120+
121+
Clang-tidy Visual Studio plugin
122+
-------------------------------

0 commit comments

Comments
 (0)