Skip to content

Commit 85ae7aa

Browse files
author
z1_cciauto
authored
merge main into amd-staging (llvm#4055)
2 parents ad07f49 + fbefe02 commit 85ae7aa

File tree

259 files changed

+4242
-1517
lines changed

Some content is hidden

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

259 files changed

+4242
-1517
lines changed

.github/workflows/gha-codeql.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ on:
77
pull_request:
88
branches:
99
- main
10+
paths:
11+
- '.github/**'
1012
schedule:
1113
- cron: '30 0 * * *'
1214

.github/workflows/libclang-abi-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,10 @@ jobs:
113113
./configure
114114
sudo make install
115115
- name: Download source code
116-
uses: llvm/actions/get-llvm-project-src@main
116+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
117117
with:
118118
ref: ${{ matrix.ref }}
119-
repo: ${{ matrix.repo }}
119+
repository: ${{ matrix.repo }}
120120
- name: Configure
121121
run: |
122122
mkdir install

.github/workflows/libcxx-run-benchmarks.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,14 @@ jobs:
3333
3434
runs-on: llvm-premerge-libcxx-next-runners # TODO: This should run on a dedicated set of machines
3535
steps:
36-
- uses: actions/setup-python@v6
36+
- uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
3737
with:
3838
python-version: '3.10'
3939

4040
- name: Extract information from the PR
4141
id: vars
42+
env:
43+
COMMENT_BODY: ${{ github.event.comment.body }}
4244
run: |
4345
python3 -m venv .venv
4446
source .venv/bin/activate
@@ -51,7 +53,7 @@ jobs:
5153
print(f"pr_base={pr.base.sha}")
5254
print(f"pr_head={pr.head.sha}")
5355
EOF
54-
BENCHMARKS=$(echo "${{ github.event.comment.body }}" | sed -nE 's/\/libcxx-bot benchmark (.+)/\1/p')
56+
BENCHMARKS=$(echo "$COMMENT_BODY" | sed -nE 's/\/libcxx-bot benchmark (.+)/\1/p')
5557
echo "benchmarks=${BENCHMARKS}" >> ${GITHUB_OUTPUT}
5658
5759
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0

.github/workflows/llvm-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,10 @@ jobs:
101101
./configure
102102
sudo make install
103103
- name: Download source code
104-
uses: llvm/actions/get-llvm-project-src@main
104+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
105105
with:
106106
ref: ${{ matrix.ref }}
107-
repo: ${{ matrix.repo }}
107+
repository: ${{ matrix.repo }}
108108
- name: Configure
109109
run: |
110110
mkdir install

clang-tools-extra/test/clang-tidy/checkers/bugprone/easily-swappable-parameters-implicits.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %check_clang_tidy %s bugprone-easily-swappable-parameters %t \
1+
// RUN: %check_clang_tidy %s --extra-arg=-Wno-error=incompatible-pointer-types bugprone-easily-swappable-parameters %t \
22
// RUN: -config='{CheckOptions: { \
33
// RUN: bugprone-easily-swappable-parameters.MinimumLength: 2, \
44
// RUN: bugprone-easily-swappable-parameters.IgnoredParameterNames: "", \

clang/docs/ReleaseNotes.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,11 @@ Potentially Breaking Changes
5656
C/C++ Language Potentially Breaking Changes
5757
-------------------------------------------
5858

59+
- The ``__has_builtin`` function now only considers the currently active target when being used with target offloading.
60+
61+
- The ``-Wincompatible-pointer-types`` diagnostic now defaults to an error;
62+
it can still be downgraded to a warning by passing ``-Wno-error=incompatible-pointer-types``. (#GH74605)
63+
5964
C++ Specific Potentially Breaking Changes
6065
-----------------------------------------
6166
- For C++20 modules, the Reduced BMI mode will be the default option. This may introduce
@@ -611,6 +616,8 @@ Bug Fixes to C++ Support
611616
authentication enabled. (#GH152601)
612617
- Fix the check for narrowing int-to-float conversions, so that they are detected in
613618
cases where converting the float back to an integer is undefined behaviour (#GH157067).
619+
- Stop rejecting C++11-style attributes on the first argument of constructors in older
620+
standards. (#GH156809).
614621
- Fix a crash when applying binary or ternary operators to two same function types with different spellings,
615622
where at least one of the function parameters has an attribute which affects
616623
the function type.

clang/include/clang/Basic/CodeGenOptions.def

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,7 @@ CODEGENOPT(TimeTrace , 1, 0, Benign) ///< Set when -ftime-trace is enabl
322322
VALUE_CODEGENOPT(TimeTraceGranularity, 32, 500, Benign) ///< Minimum time granularity (in microseconds),
323323
///< traced by time profiler
324324
CODEGENOPT(InterchangeLoops , 1, 0, Benign) ///< Run loop-interchange.
325+
CODEGENOPT(FuseLoops , 1, 0, Benign) ///< Run loop-fusion.
325326
CODEGENOPT(UnrollLoops , 1, 0, Benign) ///< Control whether loops are unrolled.
326327
CODEGENOPT(RerollLoops , 1, 0, Benign) ///< Control whether loops are rerolled.
327328
CODEGENOPT(NoUseJumpTables , 1, 0, Benign) ///< Set when -fno-jump-tables is enabled.

clang/include/clang/Basic/DiagnosticSemaKinds.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9044,7 +9044,7 @@ def ext_typecheck_convert_incompatible_pointer : ExtWarn<
90449044
"; take the address with &|"
90459045
"; remove *|"
90469046
"; remove &}3">,
9047-
InGroup<IncompatiblePointerTypes>;
9047+
InGroup<IncompatiblePointerTypes>, DefaultError;
90489048
def err_typecheck_convert_incompatible_pointer : Error<
90499049
"incompatible pointer types "
90509050
"%select{%diff{assigning to $ from $|assigning to different types}0,1"

clang/include/clang/Driver/Options.td

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4439,6 +4439,10 @@ def floop_interchange : Flag<["-"], "floop-interchange">, Group<f_Group>,
44394439
HelpText<"Enable the loop interchange pass">, Visibility<[ClangOption, CC1Option, FlangOption, FC1Option]>;
44404440
def fno_loop_interchange: Flag<["-"], "fno-loop-interchange">, Group<f_Group>,
44414441
HelpText<"Disable the loop interchange pass">, Visibility<[ClangOption, CC1Option, FlangOption, FC1Option]>;
4442+
defm experimental_loop_fusion
4443+
: OptInCC1FFlag<"experimental-loop-fusion", "Enable", "Disable",
4444+
"Enable the loop fusion pass",
4445+
[ClangOption, FlangOption, FC1Option]>;
44424446
def funroll_loops : Flag<["-"], "funroll-loops">, Group<f_Group>,
44434447
HelpText<"Turn on loop unroller">, Visibility<[ClangOption, CC1Option, FlangOption, FC1Option]>;
44444448
def fno_unroll_loops : Flag<["-"], "fno-unroll-loops">, Group<f_Group>,
@@ -4813,8 +4817,10 @@ def gdbx : Flag<["-"], "gdbx">, Group<gTune_Group>;
48134817
// Equivalent to our default dwarf version. Forces usual dwarf emission when
48144818
// CodeView is enabled.
48154819
def gdwarf : Flag<["-"], "gdwarf">, Group<g_Group>,
4816-
Visibility<[ClangOption, CLOption, DXCOption]>,
4820+
Visibility<[ClangOption, CLOption, DXCOption, FlangOption]>,
48174821
HelpText<"Generate source-level debug information with the default dwarf version">;
4822+
4823+
let Visibility = [ClangOption, FlangOption] in {
48184824
def gdwarf_2 : Flag<["-"], "gdwarf-2">, Group<g_Group>,
48194825
HelpText<"Generate source-level debug information with dwarf version 2">;
48204826
def gdwarf_3 : Flag<["-"], "gdwarf-3">, Group<g_Group>,
@@ -4823,6 +4829,7 @@ def gdwarf_4 : Flag<["-"], "gdwarf-4">, Group<g_Group>,
48234829
HelpText<"Generate source-level debug information with dwarf version 4">;
48244830
def gdwarf_5 : Flag<["-"], "gdwarf-5">, Group<g_Group>,
48254831
HelpText<"Generate source-level debug information with dwarf version 5">;
4832+
}
48264833
def gdwarf64 : Flag<["-"], "gdwarf64">, Group<g_Group>,
48274834
Visibility<[ClangOption, CC1Option, CC1AsOption]>,
48284835
HelpText<"Enables DWARF64 format for ELF binaries, if debug information emission is enabled.">,
@@ -7823,6 +7830,8 @@ def debug_info_kind_EQ : Joined<["-"], "debug-info-kind=">;
78237830
def record_command_line : Separate<["-"], "record-command-line">,
78247831
HelpText<"The string to embed in the .LLVM.command.line section.">,
78257832
MarshallingInfoString<CodeGenOpts<"RecordCommandLine">>;
7833+
def dwarf_version_EQ : Joined<["-"], "dwarf-version=">,
7834+
MarshallingInfoInt<CodeGenOpts<"DwarfVersion">>;
78267835

78277836
} // let Visibility = [CC1Option, CC1AsOption, FC1Option]
78287837

@@ -7834,8 +7843,6 @@ def debug_info_macro : Flag<["-"], "debug-info-macro">,
78347843
def default_function_attr : Separate<["-"], "default-function-attr">,
78357844
HelpText<"Apply given attribute to all functions">,
78367845
MarshallingInfoStringVector<CodeGenOpts<"DefaultFunctionAttrs">>;
7837-
def dwarf_version_EQ : Joined<["-"], "dwarf-version=">,
7838-
MarshallingInfoInt<CodeGenOpts<"DwarfVersion">>;
78397846
def debugger_tuning_EQ : Joined<["-"], "debugger-tuning=">,
78407847
Values<"gdb,lldb,sce,dbx">,
78417848
NormalizedValuesScope<"llvm::DebuggerKind">, NormalizedValues<["GDB", "LLDB", "SCE", "DBX"]>,

clang/lib/CodeGen/BackendUtil.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -896,6 +896,7 @@ void EmitAssemblyHelper::RunOptimizationPipeline(
896896
PipelineTuningOptions PTO;
897897
PTO.LoopUnrolling = CodeGenOpts.UnrollLoops;
898898
PTO.LoopInterchange = CodeGenOpts.InterchangeLoops;
899+
PTO.LoopFusion = CodeGenOpts.FuseLoops;
899900
// For historical reasons, loop interleaving is set to mirror setting for loop
900901
// unrolling.
901902
PTO.LoopInterleaving = CodeGenOpts.UnrollLoops;
@@ -1331,6 +1332,7 @@ runThinLTOBackend(CompilerInstance &CI, ModuleSummaryIndex *CombinedIndex,
13311332
Conf.SampleProfile = std::move(SampleProfile);
13321333
Conf.PTO.LoopUnrolling = CGOpts.UnrollLoops;
13331334
Conf.PTO.LoopInterchange = CGOpts.InterchangeLoops;
1335+
Conf.PTO.LoopFusion = CGOpts.FuseLoops;
13341336
// For historical reasons, loop interleaving is set to mirror setting for loop
13351337
// unrolling.
13361338
Conf.PTO.LoopInterleaving = CGOpts.UnrollLoops;

0 commit comments

Comments
 (0)