Skip to content

Commit 5f40d22

Browse files
authored
Merge branch 'main' into cir-builtin-prefetch
2 parents 778dee7 + 81a9d75 commit 5f40d22

File tree

687 files changed

+21999
-8320
lines changed

Some content is hidden

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

687 files changed

+21999
-8320
lines changed

.github/workflows/release-binaries.yml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ jobs:
5858
ref: ${{ steps.vars.outputs.ref }}
5959
upload: ${{ steps.vars.outputs.upload }}
6060
target-cmake-flags: ${{ steps.vars.outputs.target-cmake-flags }}
61-
ccache: ${{ steps.vars.outputs.ccache }}
6261
build-flang: ${{ steps.vars.outputs.build-flang }}
6362
release-binary-basename: ${{ steps.vars.outputs.release-binary-basename }}
6463
release-binary-filename: ${{ steps.vars.outputs.release-binary-filename }}
@@ -123,13 +122,6 @@ jobs:
123122
echo "release-binary-filename=$release_binary_basename.tar.xz" >> $GITHUB_OUTPUT
124123
125124
target="$RUNNER_OS-$RUNNER_ARCH"
126-
# The hendrikmuhs/ccache-action action does not support installing sccache
127-
# on arm64 Linux.
128-
if [ "$target" = "Linux-ARM64" ]; then
129-
echo ccache=ccache >> $GITHUB_OUTPUT
130-
else
131-
echo ccache=sccache >> $GITHUB_OUTPUT
132-
fi
133125
134126
# The macOS builds try to cross compile some libraries so we need to
135127
# add extra CMake args to disable them.
@@ -222,8 +214,6 @@ jobs:
222214
- name: Configure
223215
id: build
224216
shell: bash
225-
env:
226-
CCACHE_BIN: ${{ needs.prepare.outputs.ccache }}
227217
run: |
228218
# There were some issues on the ARM64 MacOS runners with trying to build x86 object,
229219
# so we need to set some extra cmake flags to disable this.

clang-tools-extra/clang-include-fixer/IncludeFixer.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ bool IncludeFixerActionFactory::runInvocation(
9090

9191
// Set up Clang.
9292
CompilerInstance Compiler(std::move(Invocation), std::move(PCHContainerOps));
93+
Compiler.setVirtualFileSystem(Files->getVirtualFileSystemPtr());
9394
Compiler.setFileManager(Files);
9495

9596
// Create the compiler's actual diagnostics engine. We want to drop all

clang/docs/AllocToken.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ The default mode to calculate tokens is:
3737
pointers.
3838

3939
Other token ID assignment modes are supported, but they may be subject to
40-
change or removal. These may (experimentally) be selected with ``-mllvm
41-
-alloc-token-mode=<mode>``:
40+
change or removal. These may (experimentally) be selected with ``-Xclang
41+
-falloc-token-mode=<mode>``:
4242

4343
* ``typehash``: This mode assigns a token ID based on the hash of the allocated
4444
type's name.

clang/docs/OpenMPSupport.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ implementation.
256256
+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
257257
| device | device-specific environment variables | :none:`unclaimed` | |
258258
+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
259-
| device | omp_target_is_accessible routine | :part:`In Progress` | https://github.com/llvm/llvm-project/pull/138294 |
259+
| device | omp_target_is_accessible routine | :good:`done` | https://github.com/llvm/llvm-project/pull/138294 |
260260
+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
261261
| device | omp_get_mapped_ptr routine | :good:`done` | D141545 |
262262
+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+

clang/docs/ReleaseNotes.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,7 @@ Bug Fixes to Attribute Support
447447
- Using ``[[gnu::cleanup(some_func)]]`` where some_func is annotated with
448448
``[[gnu::error("some error")]]`` now correctly triggers an error. (#GH146520)
449449
- Fix a crash when the function name is empty in the `swift_name` attribute. (#GH157075)
450+
- Fixes crashes or missing diagnostics with the `device_kernel` attribute. (#GH161905)
450451

451452
Bug Fixes to C++ Support
452453
^^^^^^^^^^^^^^^^^^^^^^^^

clang/include/clang/AST/StmtOpenACC.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -815,6 +815,17 @@ class OpenACCAtomicConstruct final
815815
Stmt *getAssociatedStmt() {
816816
return OpenACCAssociatedStmtConstruct::getAssociatedStmt();
817817
}
818+
819+
// A struct to represent a broken-down version of the associated statement,
820+
// providing the information specified in OpenACC3.3 Section 2.12.
821+
struct StmtInfo {
822+
const Expr *V;
823+
const Expr *X;
824+
// TODO: OpenACC: We should expand this as we're implementing the other
825+
// atomic construct kinds.
826+
};
827+
828+
const StmtInfo getAssociatedStmtInfo() const;
818829
};
819830

820831
} // namespace clang

clang/include/clang/Basic/Attr.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1623,7 +1623,7 @@ def SYCLKernel : InheritableAttr {
16231623
let Documentation = [SYCLKernelDocs];
16241624
}
16251625

1626-
def DeviceKernel : DeclOrTypeAttr {
1626+
def DeviceKernel : InheritableAttr {
16271627
let Spellings = [Clang<"device_kernel">,
16281628
Clang<"nvptx_kernel">, Clang<"amdgpu_kernel">,
16291629
CustomKeyword<"__kernel">, CustomKeyword<"kernel">];

clang/include/clang/Basic/CodeGenOptions.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -447,10 +447,6 @@ class CodeGenOptions : public CodeGenOptionsBase {
447447

448448
std::optional<double> AllowRuntimeCheckSkipHotCutoff;
449449

450-
/// Maximum number of allocation tokens (0 = no max), nullopt if none set (use
451-
/// pass default).
452-
std::optional<uint64_t> AllocTokenMax;
453-
454450
/// List of backend command-line options for -fembed-bitcode.
455451
std::vector<uint8_t> CmdArgs;
456452

clang/include/clang/Basic/DiagnosticSemaKinds.td

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4126,6 +4126,9 @@ def warn_missing_sdksettings_for_availability_checking : Warning<
41264126
"%0 availability is ignored without a valid 'SDKSettings.json' in the SDK">,
41274127
InGroup<DiagGroup<"ignored-availability-without-sdk-settings">>;
41284128

4129+
def err_hidden_device_kernel
4130+
: Error<"%0 is specified as a device kernel but it is not externally visible">;
4131+
41294132
// Thread Safety Attributes
41304133
def warn_thread_attribute_ignored : Warning<
41314134
"ignoring %0 attribute because its argument is invalid">,

clang/include/clang/Basic/LangOptions.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#include "llvm/ADT/FloatingPointMode.h"
2626
#include "llvm/ADT/StringRef.h"
2727
#include "llvm/BinaryFormat/DXContainer.h"
28+
#include "llvm/Support/AllocToken.h"
2829
#include "llvm/TargetParser/Triple.h"
2930
#include <optional>
3031
#include <string>
@@ -565,6 +566,13 @@ class LangOptions : public LangOptionsBase {
565566
bool AtomicFineGrainedMemory = false;
566567
bool AtomicIgnoreDenormalMode = false;
567568

569+
/// Maximum number of allocation tokens (0 = no max), nullopt if none set (use
570+
/// target default).
571+
std::optional<uint64_t> AllocTokenMax;
572+
573+
/// The allocation token mode.
574+
std::optional<llvm::AllocTokenMode> AllocTokenMode;
575+
568576
LangOptions();
569577

570578
/// Set language defaults for the given input language and

0 commit comments

Comments
 (0)