Skip to content

Commit 244096d

Browse files
committed
Merge from 'main' to 'sycl-web' (96 commits)
CONFLICT (content): Merge conflict in llvm/lib/Passes/PassBuilderPipelines.cpp
2 parents 342b65e + cedceeb commit 244096d

File tree

434 files changed

+8235
-3435
lines changed

Some content is hidden

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

434 files changed

+8235
-3435
lines changed

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/cmake/modules/ClangConfig.cmake.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ set(CLANG_EXPORTED_TARGETS "@CLANG_EXPORTS@")
1010
set(CLANG_CMAKE_DIR "@CLANG_CONFIG_CMAKE_DIR@")
1111
set(CLANG_INCLUDE_DIRS "@CLANG_CONFIG_INCLUDE_DIRS@")
1212
set(CLANG_LINK_CLANG_DYLIB "@CLANG_LINK_CLANG_DYLIB@")
13+
set(CLANG_DEFAULT_LINKER "@CLANG_DEFAULT_LINKER@")
1314

1415
# Provide all our library targets to users.
1516
@CLANG_CONFIG_INCLUDE_EXPORTS@

clang/docs/OpenMPSupport.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,7 @@ and their implementation status. Please post on the
359359
information or if you want to help with the
360360
implementation.
361361

362+
362363
+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
363364
|Feature | C/C++ Status | Fortran Status | Reviews |
364365
+=============================================================+===========================+===========================+==========================================================================+
@@ -405,6 +406,7 @@ implementation.
405406
| dispatch construct extension to support end directive | :none:`N/A` | :none:`unclaimed` | |
406407
+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
407408

409+
408410
+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
409411
|OpenMP 5.2 Deprecations | C/C++ Status | Fortran Status | Reviews |
410412
+=============================================================+===========================+===========================+==========================================================================+
@@ -444,6 +446,7 @@ and their implementation status. Please post on the
444446
information or if you want to help with the
445447
implementation.
446448

449+
447450
+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
448451
|Feature | C/C++ Status | Fortran Status | Reviews |
449452
+=============================================================+===========================+===========================+==========================================================================+
@@ -580,7 +583,8 @@ implementation.
580583
+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
581584
| Changes to omp_target_is_accessible | :part:`In Progress` | :part:`In Progress` | |
582585
+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
583-
586+
| defaultmap implicit-behavior 'storage' | :good:`done` | :none:`unclaimed` | https://github.com/llvm/llvm-project/pull/158336 |
587+
+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
584588

585589
.. _OpenMP 6.1 implementation details:
586590

clang/docs/ReleaseNotes.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ C/C++ Language Potentially Breaking Changes
5858

5959
- The ``__has_builtin`` function now only considers the currently active target when being used with target offloading.
6060

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+
6164
C++ Specific Potentially Breaking Changes
6265
-----------------------------------------
6366
- For C++20 modules, the Reduced BMI mode will be the default option. This may introduce
@@ -529,6 +532,7 @@ OpenMP Support
529532
- Fixed non-contiguous strided update in the ``omp target update`` directive with the ``from`` clause.
530533
- Properly handle array section/assumed-size array privatization in C/C++.
531534
- Added support for ``variable-category`` modifier in ``default clause``.
535+
- Added support for ``defaultmap`` directive implicit-behavior ``storage``.
532536

533537
Improvements
534538
^^^^^^^^^^^^

clang/include/clang/Basic/CodeGenOptions.def

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,6 @@ 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.
326325
CODEGENOPT(UnrollLoops , 1, 0, Benign) ///< Control whether loops are unrolled.
327326
CODEGENOPT(RerollLoops , 1, 0, Benign) ///< Control whether loops are rerolled.
328327
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
@@ -9154,7 +9154,7 @@ def ext_typecheck_convert_incompatible_pointer : ExtWarn<
91549154
"; take the address with &|"
91559155
"; remove *|"
91569156
"; remove &}3">,
9157-
InGroup<IncompatiblePointerTypes>;
9157+
InGroup<IncompatiblePointerTypes>, DefaultError;
91589158
def err_typecheck_convert_incompatible_pointer : Error<
91599159
"incompatible pointer types "
91609160
"%select{%diff{assigning to $ from $|assigning to different types}0,1"

clang/include/clang/Basic/OpenMPKinds.def

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ OPENMP_DEFAULTMAP_MODIFIER(firstprivate)
137137
OPENMP_DEFAULTMAP_MODIFIER(none)
138138
OPENMP_DEFAULTMAP_MODIFIER(default)
139139
OPENMP_DEFAULTMAP_MODIFIER(present)
140+
OPENMP_DEFAULTMAP_MODIFIER(storage)
140141

141142
// Static attributes for 'depend' clause.
142143
OPENMP_DEPEND_KIND(in)

clang/include/clang/Driver/Options.td

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4423,10 +4423,6 @@ def floop_interchange : Flag<["-"], "floop-interchange">, Group<f_Group>,
44234423
HelpText<"Enable the loop interchange pass">, Visibility<[ClangOption, CC1Option, FlangOption, FC1Option]>;
44244424
def fno_loop_interchange: Flag<["-"], "fno-loop-interchange">, Group<f_Group>,
44254425
HelpText<"Disable the loop interchange pass">, Visibility<[ClangOption, CC1Option, FlangOption, FC1Option]>;
4426-
defm experimental_loop_fusion
4427-
: OptInCC1FFlag<"experimental-loop-fusion", "Enable", "Disable",
4428-
"Enable the loop fusion pass",
4429-
[ClangOption, FlangOption, FC1Option]>;
44304426
def funroll_loops : Flag<["-"], "funroll-loops">, Group<f_Group>,
44314427
HelpText<"Turn on loop unroller">, Visibility<[ClangOption, CC1Option, FlangOption, FC1Option]>;
44324428
def fno_unroll_loops : Flag<["-"], "fno-unroll-loops">, Group<f_Group>,
@@ -4801,8 +4797,10 @@ def gdbx : Flag<["-"], "gdbx">, Group<gTune_Group>;
48014797
// Equivalent to our default dwarf version. Forces usual dwarf emission when
48024798
// CodeView is enabled.
48034799
def gdwarf : Flag<["-"], "gdwarf">, Group<g_Group>,
4804-
Visibility<[ClangOption, CLOption, DXCOption]>,
4800+
Visibility<[ClangOption, CLOption, DXCOption, FlangOption]>,
48054801
HelpText<"Generate source-level debug information with the default dwarf version">;
4802+
4803+
let Visibility = [ClangOption, FlangOption] in {
48064804
def gdwarf_2 : Flag<["-"], "gdwarf-2">, Group<g_Group>,
48074805
HelpText<"Generate source-level debug information with dwarf version 2">;
48084806
def gdwarf_3 : Flag<["-"], "gdwarf-3">, Group<g_Group>,
@@ -4811,6 +4809,7 @@ def gdwarf_4 : Flag<["-"], "gdwarf-4">, Group<g_Group>,
48114809
HelpText<"Generate source-level debug information with dwarf version 4">;
48124810
def gdwarf_5 : Flag<["-"], "gdwarf-5">, Group<g_Group>,
48134811
HelpText<"Generate source-level debug information with dwarf version 5">;
4812+
}
48144813
def gdwarf64 : Flag<["-"], "gdwarf64">, Group<g_Group>,
48154814
Visibility<[ClangOption, CC1Option, CC1AsOption]>,
48164815
HelpText<"Enables DWARF64 format for ELF binaries, if debug information emission is enabled.">,
@@ -8063,6 +8062,8 @@ def debug_info_kind_EQ : Joined<["-"], "debug-info-kind=">;
80638062
def record_command_line : Separate<["-"], "record-command-line">,
80648063
HelpText<"The string to embed in the .LLVM.command.line section.">,
80658064
MarshallingInfoString<CodeGenOpts<"RecordCommandLine">>;
8065+
def dwarf_version_EQ : Joined<["-"], "dwarf-version=">,
8066+
MarshallingInfoInt<CodeGenOpts<"DwarfVersion">>;
80668067

80678068
} // let Visibility = [CC1Option, CC1AsOption, FC1Option]
80688069

@@ -8074,8 +8075,6 @@ def debug_info_macro : Flag<["-"], "debug-info-macro">,
80748075
def default_function_attr : Separate<["-"], "default-function-attr">,
80758076
HelpText<"Apply given attribute to all functions">,
80768077
MarshallingInfoStringVector<CodeGenOpts<"DefaultFunctionAttrs">>;
8077-
def dwarf_version_EQ : Joined<["-"], "dwarf-version=">,
8078-
MarshallingInfoInt<CodeGenOpts<"DwarfVersion">>;
80798078
def debugger_tuning_EQ : Joined<["-"], "debugger-tuning=">,
80808079
Values<"gdb,lldb,sce,dbx">,
80818080
NormalizedValuesScope<"llvm::DebuggerKind">, NormalizedValues<["GDB", "LLDB", "SCE", "DBX"]>,

clang/lib/Basic/OpenMPKinds.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,14 +110,18 @@ unsigned clang::getOpenMPSimpleClauseType(OpenMPClauseKind Kind, StringRef Str,
110110
#define OPENMP_DIST_SCHEDULE_KIND(Name) .Case(#Name, OMPC_DIST_SCHEDULE_##Name)
111111
#include "clang/Basic/OpenMPKinds.def"
112112
.Default(OMPC_DIST_SCHEDULE_unknown);
113-
case OMPC_defaultmap:
114-
return llvm::StringSwitch<unsigned>(Str)
113+
case OMPC_defaultmap: {
114+
unsigned Type = llvm::StringSwitch<unsigned>(Str)
115115
#define OPENMP_DEFAULTMAP_KIND(Name) \
116116
.Case(#Name, static_cast<unsigned>(OMPC_DEFAULTMAP_##Name))
117117
#define OPENMP_DEFAULTMAP_MODIFIER(Name) \
118118
.Case(#Name, static_cast<unsigned>(OMPC_DEFAULTMAP_MODIFIER_##Name))
119119
#include "clang/Basic/OpenMPKinds.def"
120-
.Default(OMPC_DEFAULTMAP_unknown);
120+
.Default(OMPC_DEFAULTMAP_unknown);
121+
if (LangOpts.OpenMP < 60 && Type == OMPC_DEFAULTMAP_MODIFIER_storage)
122+
return OMPC_DEFAULTMAP_MODIFIER_unknown;
123+
return Type;
124+
}
121125
case OMPC_atomic_default_mem_order:
122126
return llvm::StringSwitch<OpenMPAtomicDefaultMemOrderClauseKind>(Str)
123127
#define OPENMP_ATOMIC_DEFAULT_MEM_ORDER_KIND(Name) \

clang/lib/Basic/Targets/AMDGPU.h

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -402,15 +402,12 @@ class LLVM_LIBRARY_VISIBILITY AMDGPUTargetInfo final : public TargetInfo {
402402
/// in the DWARF.
403403
std::optional<unsigned>
404404
getDWARFAddressSpace(unsigned AddressSpace) const override {
405-
const unsigned DWARF_Private = 1;
406-
const unsigned DWARF_Local = 2;
407-
if (AddressSpace == llvm::AMDGPUAS::PRIVATE_ADDRESS) {
408-
return DWARF_Private;
409-
} else if (AddressSpace == llvm::AMDGPUAS::LOCAL_ADDRESS) {
410-
return DWARF_Local;
411-
} else {
405+
int DWARFAS = llvm::AMDGPU::mapToDWARFAddrSpace(AddressSpace);
406+
// If there is no corresponding address space identifier, or it would be
407+
// the default, then don't emit the attribute.
408+
if (DWARFAS == -1 || DWARFAS == llvm::AMDGPU::DWARFAS::DEFAULT)
412409
return std::nullopt;
413-
}
410+
return DWARFAS;
414411
}
415412

416413
CallingConvCheckResult checkCallingConvention(CallingConv CC) const override {

0 commit comments

Comments
 (0)