Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
e0d9c9c
[MLIR] Apply clang-tidy fixes for llvm-qualified-auto in Vectorizatio…
joker-eph Aug 21, 2025
4d7093b
[AMDGPU] Enable "amdgpu-uniform-intrinsic-combine" pass in pipeline. …
PankajDwivedi-25 Oct 30, 2025
98ceb45
[mlir] Fix use-after-move issues (#165660)
noclowns Oct 30, 2025
67db5fd
[clang] Add Bytes/Columns types to TextDiagnostic (#165541)
tbaederr Oct 30, 2025
44f5ae3
[utils][UpdateTestChecks] Extract MIR functionality into separate mir…
vpykhtin Oct 30, 2025
e760542
[clang] Update C++ DR status page
Endilll Oct 30, 2025
31890c5
[AArch64][GlobalISel] Add some GISel test coverage for icmp-and tests…
davemgreen Oct 30, 2025
30579c0
[DebugInfo] Add bit size to _BitInt name in debug info (#165583)
OCHyams Oct 30, 2025
8f62481
[MemCpyOpt] Allow stack move optimization if one address captured (#1…
nikic Oct 30, 2025
43ea75d
[DeveloperPolicy] Add guidelines for adding/enabling passes (#158591)
nikic Oct 30, 2025
bb1158f
[libc++] Fix LLVM 22 TODOs (#153367)
philnik777 Oct 30, 2025
689e95c
[GVN] Add tests for pointer replacement with different addr size (NFC)
nikic Oct 30, 2025
eccbfde
[AMDGPU] insert eof white space (#165673)
PankajDwivedi-25 Oct 30, 2025
932fa0e
[ORC] Fix missing include for MemoryAccess interface (NFC) (#165576)
weliveindetail Oct 30, 2025
96feee4
[clang][NFC] Make ellipse strings constexpr (#165680)
tbaederr Oct 30, 2025
25ece5b
[clang][OpenMP] New OpenMP 6.0 threadset clause (#135807)
Ritanya-B-Bharadwaj Oct 30, 2025
f205be0
Revert "[lldb-dap] Improving consistency of tests by removing concurr…
DavidSpickett Oct 30, 2025
838f643
[lldb-dap][test] skip io_redirection in debug builds (#165593)
da-viper Oct 30, 2025
d929146
[Clang][AArch64] Lower NEON vaddv/vminv/vmaxv builtins to llvm.vector…
paulwalker-arm Oct 30, 2025
0e2b890
[DA] Add tests where dependencies are missed due to overflow (NFC) (#…
kasuga-fj Oct 30, 2025
84fc780
[LoongArch][NFC] Pre-commit tests for vector type average (#161076)
zhaoqi5 Oct 30, 2025
3b30010
[X86] Add ldexp test coverage for avx512 targets (#165698)
RKSimon Oct 30, 2025
a8656c5
[llvm-cxxfilt] update docs to reflect #106233 (#165709)
madsmtm Oct 30, 2025
8c8bead
[X86] combinePTESTCC - ensure repeated operands are frozen (#165697)
RKSimon Oct 30, 2025
a55a720
[X86] Narrow BT/BTC/BTR/BTS compare + RMW patterns on very large inte…
RKSimon Oct 30, 2025
ea03447
Reapply "[HIP][Clang] Remove __AMDGCN_WAVEFRONT_SIZE macros" (#164217)
ritter-x2a Oct 30, 2025
5c5cef3
[CIR] Upstream handling for __builtin_prefetch (Typo Fix) (#165209)
kimsh02 Oct 30, 2025
da709f5
[X86] combinePTESTCC - fold PTESTZ(X,SIGNMASK) -> VTESTPD/PSZ(X,X) on…
RKSimon Oct 30, 2025
8954011
[AMDGPU][FixIrreducible][UnifyLoopExits] Support callbr with inline-a…
ro-i Oct 30, 2025
6106b94
bunch of small changes to fix a number of LIT tests on z/OS (#165567)
perry-ca Oct 30, 2025
9423d59
Revert "[LLDB][Windows]: Don't pass duplicate HANDLEs to CreateProces…
DavidSpickett Oct 30, 2025
beadb9e
[clang] Use File Location for debug info resolution. (#163982)
SergejSalnikov Oct 30, 2025
9d5c354
[mlir][gpu] Loose the condition to convert scf.parallel to gpu.launch…
Hsiangkai Oct 30, 2025
53e7443
[LSR] Don't count conditional loads/store as enabling pre/post-index …
john-brawn-arm Oct 30, 2025
c56fdf9
[mlir] Remove unused "using" decls (NFC) (#165652)
kazutakahirata Oct 30, 2025
8e6ef2d
[Hexagon] Remove a redundant cast (NFC) (#165654)
kazutakahirata Oct 30, 2025
469702c
[LICM] Sink unused l-invariant loads in preheader. (#157559)
VigneshwarJ Oct 30, 2025
6ccd1e8
Reapply "[lit] Support more ulimit options"
boomanaiden154 Oct 30, 2025
57ff891
[lit] Remove setting stack size in ulimit_okay.txt
boomanaiden154 Oct 30, 2025
8d186e2
[LoopUnroll][NFCI] Clean up remainder followup metadata handling (#16…
jdenny-ornl Oct 30, 2025
d09b505
[bazel] Add missing dependency for 9d5c35408e7a38b3062667bbebb3c0953f…
d0k Oct 30, 2025
128f850
[lldb][test] Fix libc++ API tests on older Clang versions
Michael137 Oct 30, 2025
f0d8092
[flang] One more fix for dumping evaluate::Expr (#165730)
kparzysz Oct 30, 2025
0030fac
[AMDGPU][MC][NFC] Use the lit substitution to extract instruction cod…
kosarev Oct 30, 2025
ba5cde7
[AMDGPU][GlobalISel] Fix issue with copy_scc_vcc on gfx7 (#165355)
vangthao95 Oct 30, 2025
f5e175f
[mlir][linalg] Genericize MapOp (#162742)
srcarroll Oct 30, 2025
64f1ca7
[bazel][mlir] Port #164978: [mlir][gpu] Loose the condition to conver…
google-yfyang Oct 30, 2025
521fb93
[RISCV] Support P extension ABSW instruction. (#165047)
topperc Oct 30, 2025
b1d5a2a
[AMDGPU] Add regbankselect rules for G_ADD/SUB and variants (#159860)
gandhi56 Oct 30, 2025
a98295d
[libc++] Fix localization failures on macOS 15.4 (#138744)
ldionne Oct 30, 2025
cc1022c
[InstrProf] Remove deprecated -debug-info-correlate flag (#165289)
ellishg Oct 30, 2025
916e8f7
[DA] Check nsw when extracting a constant operand of SCEVMul (#164408)
kasuga-fj Oct 30, 2025
9a51879
[Flang] Solved issue with inline compiler directive (#143699)
EbinJose2002 Oct 30, 2025
f814446
[lldb][AArch64][test] Require SVE for some Linux tests
DavidSpickett Oct 30, 2025
9b02901
[lit] Add support for setting limits to unlimited
boomanaiden154 Oct 30, 2025
9ed8896
[lldb][DWARF] Support DW_AT_bit_size on type tags (#165686)
Michael137 Oct 30, 2025
1523332
[ARM] Mark function calls as possibly changing FPSCR (#160699)
Varnike Oct 30, 2025
88cee4c
[profile] Use correct flag in InstrProf test (#165738)
ellishg Oct 30, 2025
6b5afdc
[AMDGPU] Support bfloat comparison for ballot intrinsic (#165495)
changpeng Oct 30, 2025
9cf3e8a
[MLIR] Apply clang-tidy fixes for bugprone-argument-comment in TestTr…
joker-eph Aug 21, 2025
24c75a2
[AMDGPU][Clang] Support for type inferring extended image builtins fo…
ranapratap55 Oct 30, 2025
22079e3
[libc][hdrgen] Add extra_standards and license_text (#165459)
frobtech Oct 30, 2025
3056727
[clang][lex] Use `FileManager` to make prebuilt module paths absolute…
jansvoboda11 Oct 30, 2025
0029815
[ADT] Support `.Default` with `nullptr` and `nullopt` values in TypeS…
kuhar Oct 30, 2025
17dbd86
Reland "[lldb-dap] Improving consistency of tests by removing concurr…
DavidSpickett Oct 30, 2025
eec44c0
[lldb][test] Fix typo in Arm Linux lldb-dap skip
DavidSpickett Oct 30, 2025
b1acd6d
[libc] Remove faccessat entrypoint if faccessat2 syscall is not avail…
mleleszi Oct 30, 2025
784b74c
[libc] Fix off by one error in strftime (#165711)
mleleszi Oct 30, 2025
e63f0f5
[SLU][profcheck] Estimate branch weights in partial unswitch cases (#…
mtrofin Oct 30, 2025
8d9cd5b
Move GlobalISel sync up meeting information from "past" to current sy…
aemerson Oct 30, 2025
160058f
[lit] Move ulimit_unlimited.txt test to non Darwin tests
boomanaiden154 Oct 30, 2025
b73951f
[RISCV] Adjust stackmaps test to provide coverage for non-64 bit values
preames Oct 30, 2025
6a10d1d
[clang][docs] assert.h is not a good candidate for a textual header (…
ian-twilightcoder Oct 30, 2025
28e98b8
[lit] Expand late substitutions before running builtins
boomanaiden154 Oct 30, 2025
87673d3
ELF: Rename RandomizePaddingSection to PaddingSection.
pcc Oct 30, 2025
01fbbda
[LV] Strengthen assert: VPlan0 doesn't have WidenPHIs (NFC) (#165715)
artagnon Oct 30, 2025
25afea7
[lldb][test] Fix typo in lldb-dap skip for Arm 32-bit
DavidSpickett Oct 30, 2025
a24a754
[libc][hdrgen] Sort identifiers with leading underscores specially (#…
frobtech Oct 30, 2025
546e91b
[ASan] Make tests work with internal shell
boomanaiden154 Oct 30, 2025
9f64d75
[Support] Simplify the continuation condition in encodeSLEB128 (NFC) …
kazutakahirata Oct 30, 2025
a1db777
[Hexagon] Use default member initializations (NFC) (#165653)
kazutakahirata Oct 30, 2025
2504f5f
[llvm] Proofread HowToCrossCompileBuiltinsOnArm.rst (#165655)
kazutakahirata Oct 30, 2025
5723b8a
merge main into amd-staging
z1-cciauto Oct 30, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 0 additions & 4 deletions clang/docs/AMDGPUSupport.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,6 @@ Predefined Macros
- Defined as 1 if the CU mode is enabled and 0 if the WGP mode is enabled.
* - ``__AMDGCN_UNSAFE_FP_ATOMICS__``
- Defined if unsafe floating-point atomics are allowed.
* - ``__AMDGCN_WAVEFRONT_SIZE__``
- Defines the wavefront size. Allowed values are 32 and 64 (deprecated).
* - ``__AMDGCN_WAVEFRONT_SIZE``
- Alias to ``__AMDGCN_WAVEFRONT_SIZE__`` (deprecated).
* - ``__HAS_FMAF__``
- Defined if FMAF instruction is available (deprecated).
* - ``__HAS_LDEXPF__``
Expand Down
3 changes: 1 addition & 2 deletions clang/docs/HIPSupport.rst
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,7 @@ Predefined Macros
- Alias to ``__HIP_API_PER_THREAD_DEFAULT_STREAM__``. Deprecated.

Note that some architecture specific AMDGPU macros will have default values when
used from the HIP host compilation. Other :doc:`AMDGPU macros <AMDGPUSupport>`
like ``__AMDGCN_WAVEFRONT_SIZE__`` (deprecated) will default to 64 for example.
used from the HIP host compilation.

Compilation Modes
=================
Expand Down
17 changes: 5 additions & 12 deletions clang/docs/Modules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -421,13 +421,7 @@ As an example, the module map file for the C standard library might look a bit l

.. parsed-literal::

module std [system] [extern_c] {
module assert {
textual header "assert.h"
header "bits/assert-decls.h"
export *
}

module std [system] {
module complex {
header "complex.h"
export *
Expand All @@ -440,7 +434,6 @@ As an example, the module map file for the C standard library might look a bit l

module errno {
header "errno.h"
header "sys/errno.h"
export *
}

Expand Down Expand Up @@ -673,14 +666,14 @@ of checking *use-declaration*\s, and must still be a lexically-valid header
file. In the future, we intend to pre-tokenize such headers and include the
token sequence within the prebuilt module representation.

A header with the ``exclude`` specifier is excluded from the module. It will not be included when the module is built, nor will it be considered to be part of the module, even if an ``umbrella`` header or directory would otherwise make it part of the module.
A header with the ``exclude`` specifier is excluded from the module. It will not be included when the module is built, nor will it be considered to be part of the module, even if an ``umbrella`` directory would otherwise make it part of the module.

**Example:** The C header ``assert.h`` is an excellent candidate for a textual header, because it is meant to be included multiple times (possibly with different ``NDEBUG`` settings). However, declarations within it should typically be split into a separate modular header.
**Example:** A "X macro" header is an excellent candidate for a textual header, because it is can't be compiled standalone, and by itself does not contain any declarations.

.. parsed-literal::

module std [system] {
textual header "assert.h"
module MyLib [system] {
textual header "xmacros.h"
}

A given header shall not be referenced by more than one *header-declaration*.
Expand Down
1,324 changes: 662 additions & 662 deletions clang/docs/OpenMPSupport.rst

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions clang/docs/ReleaseNotes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -915,6 +915,7 @@ OpenMP Support
modifier in the ``adjust_args`` clause.
- Allow array length to be omitted in array section subscript expression.
- Fixed non-contiguous strided update in the ``omp target update`` directive with the ``from`` clause.
- Added support for threadset clause in task and taskloop directives.
- Properly handle array section/assumed-size array privatization in C/C++.
- Added support to handle new syntax of the ``uses_allocators`` clause.
- Added support for ``variable-category`` modifier in ``default clause``.
Expand Down
80 changes: 80 additions & 0 deletions clang/include/clang/AST/OpenMPClause.h
Original file line number Diff line number Diff line change
Expand Up @@ -1424,6 +1424,86 @@ class OMPDefaultClause : public OMPClause {
}
};

/// This represents 'threadset' clause in the '#pragma omp task ...' directive.
///
/// \code
/// #pragma omp task threadset(omp_pool)
/// \endcode
/// In this example directive '#pragma omp task' has simple 'threadset'
/// clause with kind 'omp_pool'.
class OMPThreadsetClause final : public OMPClause {
friend class OMPClauseReader;

/// Location of '('.
SourceLocation LParenLoc;

/// A kind of the 'threadset' clause.
OpenMPThreadsetKind Kind = OMPC_THREADSET_unknown;

/// Start location of the kind in source code.
SourceLocation KindLoc;

/// Set kind of the clauses.
///
/// \param K Argument of clause.
void setThreadsetKind(OpenMPThreadsetKind K) { Kind = K; }

/// Set argument location.
///
/// \param KLoc Argument location.
void setThreadsetKindLoc(SourceLocation KLoc) { KindLoc = KLoc; }

public:
/// Build 'threadset' clause with argument \a A ('omp_team' or 'omp_pool').
///
/// \param A Argument of the clause ('omp_team' or 'omp_pool').
/// \param ALoc Starting location of the argument.
/// \param StartLoc Starting location of the clause.
/// \param LParenLoc Location of '('.
/// \param EndLoc Ending location of the clause.
OMPThreadsetClause(OpenMPThreadsetKind A, SourceLocation ALoc,
SourceLocation StartLoc, SourceLocation LParenLoc,
SourceLocation EndLoc)
: OMPClause(llvm::omp::OMPC_threadset, StartLoc, EndLoc),
LParenLoc(LParenLoc), Kind(A), KindLoc(ALoc) {}

/// Build an empty clause.
OMPThreadsetClause()
: OMPClause(llvm::omp::OMPC_threadset, SourceLocation(),
SourceLocation()) {}

/// Sets the location of '('.
void setLParenLoc(SourceLocation Loc) { LParenLoc = Loc; }

/// Returns the location of '('.
SourceLocation getLParenLoc() const { return LParenLoc; }

/// Returns kind of the clause.
OpenMPThreadsetKind getThreadsetKind() const { return Kind; }

/// Returns location of clause kind.
SourceLocation getThreadsetKindLoc() const { return KindLoc; }

child_range children() {
return child_range(child_iterator(), child_iterator());
}

const_child_range children() const {
return const_child_range(const_child_iterator(), const_child_iterator());
}

child_range used_children() {
return child_range(child_iterator(), child_iterator());
}
const_child_range used_children() const {
return const_child_range(const_child_iterator(), const_child_iterator());
}

static bool classof(const OMPClause *T) {
return T->getClauseKind() == llvm::omp::OMPC_threadset;
}
};

/// This represents 'proc_bind' clause in the '#pragma omp ...'
/// directive.
///
Expand Down
6 changes: 6 additions & 0 deletions clang/include/clang/AST/RecursiveASTVisitor.h
Original file line number Diff line number Diff line change
Expand Up @@ -3523,6 +3523,12 @@ bool RecursiveASTVisitor<Derived>::VisitOMPDefaultClause(OMPDefaultClause *) {
return true;
}

template <typename Derived>
bool RecursiveASTVisitor<Derived>::VisitOMPThreadsetClause(
OMPThreadsetClause *) {
return true;
}

template <typename Derived>
bool RecursiveASTVisitor<Derived>::VisitOMPProcBindClause(OMPProcBindClause *) {
return true;
Expand Down
1 change: 1 addition & 0 deletions clang/include/clang/Basic/Builtins.def
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
// SJ -> sigjmp_buf
// K -> ucontext_t
// p -> pid_t
// e -> _Float16 for HIP/C++ and __fp16 for OpenCL
// . -> "...". This may only occur at the end of the function list.
//
// Types may be prefixed with the following modifiers:
Expand Down
41 changes: 41 additions & 0 deletions clang/include/clang/Basic/BuiltinsAMDGPU.def
Original file line number Diff line number Diff line change
Expand Up @@ -975,6 +975,47 @@ TARGET_BUILTIN(__builtin_amdgcn_image_sample_3d_v4f32_f32, "V4fifffQtV4ibii", "n
TARGET_BUILTIN(__builtin_amdgcn_image_sample_3d_v4f16_f32, "V4hifffQtV4ibii", "nc", "image-insts")
TARGET_BUILTIN(__builtin_amdgcn_image_sample_cube_v4f32_f32, "V4fifffQtV4ibii", "nc", "image-insts")
TARGET_BUILTIN(__builtin_amdgcn_image_sample_cube_v4f16_f32, "V4hifffQtV4ibii", "nc", "image-insts")
TARGET_BUILTIN(__builtin_amdgcn_image_sample_lz_1d_v4f32_f32, "V4fifQtV4ibii", "nc", "extended-image-insts")
TARGET_BUILTIN(__builtin_amdgcn_image_sample_lz_1d_v4f16_f32, "V4eifQtV4ibii", "nc", "extended-image-insts")
TARGET_BUILTIN(__builtin_amdgcn_image_sample_lz_1darray_v4f32_f32, "V4fiffQtV4ibii", "nc", "extended-image-insts")
TARGET_BUILTIN(__builtin_amdgcn_image_sample_lz_1darray_v4f16_f32, "V4eiffQtV4ibii", "nc", "extended-image-insts")
TARGET_BUILTIN(__builtin_amdgcn_image_sample_lz_2d_f32_f32, "fiffQtV4ibii", "nc", "extended-image-insts")
TARGET_BUILTIN(__builtin_amdgcn_image_sample_lz_2d_v4f32_f32, "V4fiffQtV4ibii", "nc", "extended-image-insts")
TARGET_BUILTIN(__builtin_amdgcn_image_sample_lz_2d_v4f16_f32, "V4eiffQtV4ibii", "nc", "extended-image-insts")
TARGET_BUILTIN(__builtin_amdgcn_image_sample_lz_2darray_f32_f32, "fifffQtV4ibii", "nc", "extended-image-insts")
TARGET_BUILTIN(__builtin_amdgcn_image_sample_lz_2darray_v4f32_f32, "V4fifffQtV4ibii", "nc", "extended-image-insts")
TARGET_BUILTIN(__builtin_amdgcn_image_sample_lz_2darray_v4f16_f32, "V4eifffQtV4ibii", "nc", "extended-image-insts")
TARGET_BUILTIN(__builtin_amdgcn_image_sample_lz_3d_v4f32_f32, "V4fifffQtV4ibii", "nc", "extended-image-insts")
TARGET_BUILTIN(__builtin_amdgcn_image_sample_lz_3d_v4f16_f32, "V4eifffQtV4ibii", "nc", "extended-image-insts")
TARGET_BUILTIN(__builtin_amdgcn_image_sample_lz_cube_v4f32_f32, "V4fifffQtV4ibii", "nc", "extended-image-insts")
TARGET_BUILTIN(__builtin_amdgcn_image_sample_lz_cube_v4f16_f32, "V4eifffQtV4ibii", "nc", "extended-image-insts")
TARGET_BUILTIN(__builtin_amdgcn_image_sample_l_1d_v4f32_f32, "V4fiffQtV4ibii", "nc", "extended-image-insts")
TARGET_BUILTIN(__builtin_amdgcn_image_sample_l_1d_v4f16_f32, "V4eiffQtV4ibii", "nc", "extended-image-insts")
TARGET_BUILTIN(__builtin_amdgcn_image_sample_l_1darray_v4f32_f32, "V4fifffQtV4ibii", "nc", "extended-image-insts")
TARGET_BUILTIN(__builtin_amdgcn_image_sample_l_1darray_v4f16_f32, "V4eifffQtV4ibii", "nc", "extended-image-insts")
TARGET_BUILTIN(__builtin_amdgcn_image_sample_l_2d_f32_f32, "fifffQtV4ibii", "nc", "extended-image-insts")
TARGET_BUILTIN(__builtin_amdgcn_image_sample_l_2d_v4f32_f32, "V4fifffQtV4ibii", "nc", "extended-image-insts")
TARGET_BUILTIN(__builtin_amdgcn_image_sample_l_2d_v4f16_f32, "V4eifffQtV4ibii", "nc", "extended-image-insts")
TARGET_BUILTIN(__builtin_amdgcn_image_sample_l_2darray_f32_f32, "fiffffQtV4ibii", "nc", "extended-image-insts")
TARGET_BUILTIN(__builtin_amdgcn_image_sample_l_2darray_v4f32_f32, "V4fiffffQtV4ibii", "nc", "extended-image-insts")
TARGET_BUILTIN(__builtin_amdgcn_image_sample_l_2darray_v4f16_f32, "V4eiffffQtV4ibii", "nc", "extended-image-insts")
TARGET_BUILTIN(__builtin_amdgcn_image_sample_l_3d_v4f32_f32, "V4fiffffQtV4ibii", "nc", "extended-image-insts")
TARGET_BUILTIN(__builtin_amdgcn_image_sample_l_3d_v4f16_f32, "V4eiffffQtV4ibii", "nc", "extended-image-insts")
TARGET_BUILTIN(__builtin_amdgcn_image_sample_l_cube_v4f32_f32, "V4fiffffQtV4ibii", "nc", "extended-image-insts")
TARGET_BUILTIN(__builtin_amdgcn_image_sample_l_cube_v4f16_f32, "V4eiffffQtV4ibii", "nc", "extended-image-insts")
TARGET_BUILTIN(__builtin_amdgcn_image_sample_d_1d_v4f32_f32, "V4fifffQtV4ibii", "nc", "extended-image-insts")
TARGET_BUILTIN(__builtin_amdgcn_image_sample_d_1d_v4f16_f32, "V4eifffQtV4ibii", "nc", "extended-image-insts")
TARGET_BUILTIN(__builtin_amdgcn_image_sample_d_1darray_v4f32_f32, "V4fiffffQtV4ibii", "nc", "extended-image-insts")
TARGET_BUILTIN(__builtin_amdgcn_image_sample_d_1darray_v4f16_f32, "V4eiffffQtV4ibii", "nc", "extended-image-insts")
TARGET_BUILTIN(__builtin_amdgcn_image_sample_d_2d_f32_f32, "fiffffffQtV4ibii", "nc", "extended-image-insts")
TARGET_BUILTIN(__builtin_amdgcn_image_sample_d_2d_v4f32_f32, "V4fiffffffQtV4ibii", "nc", "extended-image-insts")
TARGET_BUILTIN(__builtin_amdgcn_image_sample_d_2d_v4f16_f32, "V4eiffffffQtV4ibii", "nc", "extended-image-insts")
TARGET_BUILTIN(__builtin_amdgcn_image_sample_d_2darray_f32_f32, "fifffffffQtV4ibii", "nc", "extended-image-insts")
TARGET_BUILTIN(__builtin_amdgcn_image_sample_d_2darray_v4f32_f32, "V4fifffffffQtV4ibii", "nc", "extended-image-insts")
TARGET_BUILTIN(__builtin_amdgcn_image_sample_d_2darray_v4f16_f32, "V4eifffffffQtV4ibii", "nc", "extended-image-insts")
TARGET_BUILTIN(__builtin_amdgcn_image_sample_d_3d_v4f32_f32, "V4fifffffffffQtV4ibii", "nc", "extended-image-insts")
TARGET_BUILTIN(__builtin_amdgcn_image_sample_d_3d_v4f16_f32, "V4eifffffffffQtV4ibii", "nc", "extended-image-insts")
TARGET_BUILTIN(__builtin_amdgcn_image_gather4_lz_2d_v4f32_f32, "V4fiffQtV4ibii", "nc", "extended-image-insts")

#undef BUILTIN
#undef TARGET_BUILTIN
8 changes: 7 additions & 1 deletion clang/include/clang/Basic/OpenMPKinds.def
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@
#ifndef OPENMP_ALLOCATE_MODIFIER
#define OPENMP_ALLOCATE_MODIFIER(Name)
#endif
#ifndef OPENMP_THREADSET_KIND
#define OPENMP_THREADSET_KIND(Name)
#endif

// Static attributes for 'schedule' clause.
OPENMP_SCHEDULE_KIND(static)
Expand Down Expand Up @@ -255,6 +258,9 @@ OPENMP_DOACROSS_MODIFIER(sink)
OPENMP_DOACROSS_MODIFIER(sink_omp_cur_iteration)
OPENMP_DOACROSS_MODIFIER(source_omp_cur_iteration)

OPENMP_THREADSET_KIND(omp_pool)
OPENMP_THREADSET_KIND(omp_team)

#undef OPENMP_NUMTASKS_MODIFIER
#undef OPENMP_NUMTHREADS_MODIFIER
#undef OPENMP_GRAINSIZE_MODIFIER
Expand Down Expand Up @@ -284,4 +290,4 @@ OPENMP_DOACROSS_MODIFIER(source_omp_cur_iteration)
#undef OPENMP_DEFAULTMAP_MODIFIER
#undef OPENMP_DOACROSS_MODIFIER
#undef OPENMP_ALLOCATE_MODIFIER

#undef OPENMP_THREADSET_KIND
7 changes: 7 additions & 0 deletions clang/include/clang/Basic/OpenMPKinds.h
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,13 @@ enum OpenMPAllocateClauseModifier {
OMPC_ALLOCATE_unknown
};

/// OpenMP modifiers for 'threadset' clause.
enum OpenMPThreadsetKind {
#define OPENMP_THREADSET_KIND(Name) OMPC_THREADSET_##Name,
#include "clang/Basic/OpenMPKinds.def"
OMPC_THREADSET_unknown
};

/// Number of allowed allocate-modifiers.
static constexpr unsigned NumberOfOMPAllocateClauseModifiers =
OMPC_ALLOCATE_unknown;
Expand Down
6 changes: 6 additions & 0 deletions clang/include/clang/Sema/SemaOpenMP.h
Original file line number Diff line number Diff line change
Expand Up @@ -975,6 +975,12 @@ class SemaOpenMP : public SemaBase {
OpenMPDefaultClauseVariableCategory VCKind,
SourceLocation VCKindLoc, SourceLocation StartLoc,
SourceLocation LParenLoc, SourceLocation EndLoc);
/// Called on well-formed 'threadset' clause.
OMPClause *ActOnOpenMPThreadsetClause(OpenMPThreadsetKind Kind,
SourceLocation KindLoc,
SourceLocation StartLoc,
SourceLocation LParenLoc,
SourceLocation EndLoc);
/// Called on well-formed 'proc_bind' clause.
OMPClause *ActOnOpenMPProcBindClause(llvm::omp::ProcBindKind Kind,
SourceLocation KindLoc,
Expand Down
5 changes: 5 additions & 0 deletions clang/lib/AST/ASTContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12408,6 +12408,11 @@ static QualType DecodeTypeFromStr(const char *&Str, const ASTContext &Context,
// Read the base type.
switch (*Str++) {
default: llvm_unreachable("Unknown builtin type letter!");
case 'e':
assert(HowLong == 0 && !Signed && !Unsigned &&
"Bad modifiers used with 'e'!");
Type = Context.getLangOpts().OpenCL ? Context.HalfTy : Context.Float16Ty;
break;
case 'x':
assert(HowLong == 0 && !Signed && !Unsigned &&
"Bad modifiers used with 'x'!");
Expand Down
8 changes: 8 additions & 0 deletions clang/lib/AST/OpenMPClause.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ const OMPClauseWithPreInit *OMPClauseWithPreInit::get(const OMPClause *C) {
case OMPC_nowait:
case OMPC_untied:
case OMPC_mergeable:
case OMPC_threadset:
case OMPC_threadprivate:
case OMPC_groupprivate:
case OMPC_flush:
Expand Down Expand Up @@ -2035,6 +2036,13 @@ void OMPClausePrinter::VisitOMPDefaultClause(OMPDefaultClause *Node) {
OS << ")";
}

void OMPClausePrinter::VisitOMPThreadsetClause(OMPThreadsetClause *Node) {
OS << "threadset("
<< getOpenMPSimpleClauseTypeName(OMPC_threadset,
unsigned(Node->getThreadsetKind()))
<< ")";
}

void OMPClausePrinter::VisitOMPProcBindClause(OMPProcBindClause *Node) {
OS << "proc_bind("
<< getOpenMPSimpleClauseTypeName(OMPC_proc_bind,
Expand Down
2 changes: 2 additions & 0 deletions clang/lib/AST/StmtProfile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -546,6 +546,8 @@ void OMPClauseProfiler::VisitOMPNocontextClause(const OMPNocontextClause *C) {

void OMPClauseProfiler::VisitOMPDefaultClause(const OMPDefaultClause *C) { }

void OMPClauseProfiler::VisitOMPThreadsetClause(const OMPThreadsetClause *C) {}

void OMPClauseProfiler::VisitOMPProcBindClause(const OMPProcBindClause *C) { }

void OMPClauseProfiler::VisitOMPUnifiedAddressClause(
Expand Down
19 changes: 19 additions & 0 deletions clang/lib/Basic/OpenMPKinds.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,15 @@ unsigned clang::getOpenMPSimpleClauseType(OpenMPClauseKind Kind, StringRef Str,
#define OPENMP_ALLOCATE_MODIFIER(Name) .Case(#Name, OMPC_ALLOCATE_##Name)
#include "clang/Basic/OpenMPKinds.def"
.Default(OMPC_ALLOCATE_unknown);
case OMPC_threadset: {
unsigned Type = llvm::StringSwitch<unsigned>(Str)
#define OPENMP_THREADSET_KIND(Name) .Case(#Name, OMPC_THREADSET_##Name)
#include "clang/Basic/OpenMPKinds.def"
.Default(OMPC_THREADSET_unknown);
if (LangOpts.OpenMP < 60)
return OMPC_THREADSET_unknown;
return Type;
}
case OMPC_num_threads: {
unsigned Type = llvm::StringSwitch<unsigned>(Str)
#define OPENMP_NUMTHREADS_MODIFIER(Name) .Case(#Name, OMPC_NUMTHREADS_##Name)
Expand Down Expand Up @@ -565,6 +574,16 @@ const char *clang::getOpenMPSimpleClauseTypeName(OpenMPClauseKind Kind,
#include "clang/Basic/OpenMPKinds.def"
}
llvm_unreachable("Invalid OpenMP 'num_threads' clause modifier");
case OMPC_threadset:
switch (Type) {
case OMPC_THREADSET_unknown:
return "unknown";
#define OPENMP_THREADSET_KIND(Name) \
case OMPC_THREADSET_##Name: \
return #Name;
#include "clang/Basic/OpenMPKinds.def"
}
llvm_unreachable("Invalid OpenMP 'threadset' clause modifier");
case OMPC_unknown:
case OMPC_threadprivate:
case OMPC_groupprivate:
Expand Down
6 changes: 0 additions & 6 deletions clang/lib/Basic/Targets/AMDGPU.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -356,12 +356,6 @@ void AMDGPUTargetInfo::getTargetDefines(const LangOptions &Opts,
if (hasFastFMA())
Builder.defineMacro("FP_FAST_FMA");

Builder.defineMacro("__AMDGCN_WAVEFRONT_SIZE__", Twine(WavefrontSize),
"compile-time-constant access to the wavefront size will "
"be removed in a future release");
Builder.defineMacro("__AMDGCN_WAVEFRONT_SIZE", Twine(WavefrontSize),
"compile-time-constant access to the wavefront size will "
"be removed in a future release");
Builder.defineMacro("__AMDGCN_CUMODE__", Twine(CUMode));
}

Expand Down
Loading