https://github.com/yxsamliu closed
https://github.com/llvm/llvm-project/pull/114841
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/erichkeane approved this pull request.
https://github.com/llvm/llvm-project/pull/114841
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -5442,6 +5442,155 @@ third argument, can only occur at file scope.
a = b[i] * c[i] + e;
}
+Extensions for controlling atomic code generation
+=
+
+The ``[[clang::atomic]]`` statement attribute enables users to control ho
@@ -5442,6 +5442,155 @@ third argument, can only occur at file scope.
a = b[i] * c[i] + e;
}
+Extensions for controlling atomic code generation
+=
+
+The ``[[clang::atomic]]`` statement attribute enables users to control ho
@@ -132,6 +132,12 @@ Attribute Changes in Clang
This forces the global to be considered small or large in regards to the
x86-64 code model, regardless of the code model specified for the
compilation.
+- Introduced a new statement attribute ``[[clang::atomic]]`` that enabl
@@ -5442,6 +5442,155 @@ third argument, can only occur at file scope.
a = b[i] * c[i] + e;
}
+Extensions for controlling atomic code generation
+=
+
+The ``[[clang::atomic]]`` statement attribute enables users to control ho
@@ -5442,6 +5442,155 @@ third argument, can only occur at file scope.
a = b[i] * c[i] + e;
}
+Extensions for controlling atomic code generation
+=
+
+The ``[[clang::atomic]]`` statement attribute enables users to control ho
@@ -5442,6 +5442,155 @@ third argument, can only occur at file scope.
a = b[i] * c[i] + e;
}
+Extensions for controlling atomic code generation
+=
+
+The ``[[clang::atomic]]`` statement attribute enables users to control ho
@@ -3286,6 +3286,8 @@ def err_invalid_branch_protection_spec : Error<
"invalid or misplaced branch protection specification '%0'">;
def warn_unsupported_branch_protection_spec : Warning<
"unsupported branch protection specification '%0'">,
InGroup;
+def err_attribute_inval
@@ -1107,6 +1113,66 @@ inline void FPOptions::applyChanges(FPOptionsOverride
FPO) {
*this = FPO.applyOverrides(*this);
}
+// The three atomic code-generation options.
+// The canonical (positive) names are:
+// "remote_memory", "fine_grained_memory", and "ignore_denormal_
@@ -625,6 +625,43 @@ static Attr *handleHLSLControlFlowHint(Sema &S, Stmt *St,
const ParsedAttr &A,
return ::new (S.Context) HLSLControlFlowHintAttr(S.Context, A);
}
+static Attr *handleAtomicAttr(Sema &S, Stmt *St, const ParsedAttr &A,
+ Source
@@ -5442,6 +5442,155 @@ third argument, can only occur at file scope.
a = b[i] * c[i] + e;
}
+Extensions for controlling atomic code generation
+=
+
+The ``[[clang::atomic]]`` statement attribute enables users to control ho
@@ -5442,6 +5442,155 @@ third argument, can only occur at file scope.
a = b[i] * c[i] + e;
}
+Extensions for controlling atomic code generation
+=
+
+The ``[[clang::atomic]]`` statement attribute enables users to control ho
@@ -5442,6 +5442,155 @@ third argument, can only occur at file scope.
a = b[i] * c[i] + e;
}
+Extensions for controlling atomic code generation
+=
+
+The ``[[clang::atomic]]`` statement attribute enables users to control ho
@@ -5442,6 +5442,155 @@ third argument, can only occur at file scope.
a = b[i] * c[i] + e;
}
+Extensions for controlling atomic code generation
+=
+
+The ``[[clang::atomic]]`` statement attribute enables users to control ho
@@ -5442,6 +5442,155 @@ third argument, can only occur at file scope.
a = b[i] * c[i] + e;
}
+Extensions for controlling atomic code generation
+=
+
+The ``[[clang::atomic]]`` statement attribute enables users to control ho
@@ -5442,6 +5442,155 @@ third argument, can only occur at file scope.
a = b[i] * c[i] + e;
}
+Extensions for controlling atomic code generation
+=
+
+The ``[[clang::atomic]]`` statement attribute enables users to control ho
@@ -5442,6 +5442,155 @@ third argument, can only occur at file scope.
a = b[i] * c[i] + e;
}
+Extensions for controlling atomic code generation
+=
+
+The ``[[clang::atomic]]`` statement attribute enables users to control ho
@@ -132,6 +132,12 @@ Attribute Changes in Clang
This forces the global to be considered small or large in regards to the
x86-64 code model, regardless of the code model specified for the
compilation.
+- Introduced a new statement attribute ``[[clang::atomic]]`` that enabl
@@ -5442,6 +5442,155 @@ third argument, can only occur at file scope.
a = b[i] * c[i] + e;
}
+Extensions for controlling atomic code generation
+=
+
+The ``[[clang::atomic]]`` statement attribute enables users to control ho
@@ -5442,6 +5442,155 @@ third argument, can only occur at file scope.
a = b[i] * c[i] + e;
}
+Extensions for controlling atomic code generation
+=
+
+The ``[[clang::atomic]]`` statement attribute enables users to control ho
@@ -5442,6 +5442,155 @@ third argument, can only occur at file scope.
a = b[i] * c[i] + e;
}
+Extensions for controlling atomic code generation
+=
+
+The ``[[clang::atomic]]`` statement attribute enables users to control ho
@@ -5442,6 +5442,155 @@ third argument, can only occur at file scope.
a = b[i] * c[i] + e;
}
+Extensions for controlling atomic code generation
+=
+
+The ``[[clang::atomic]]`` statement attribute enables users to control ho
@@ -5442,6 +5442,155 @@ third argument, can only occur at file scope.
a = b[i] * c[i] + e;
}
+Extensions for controlling atomic code generation
+=
+
+The ``[[clang::atomic]]`` statement attribute enables users to control ho
@@ -5442,6 +5442,155 @@ third argument, can only occur at file scope.
a = b[i] * c[i] + e;
}
+Extensions for controlling atomic code generation
+=
+
+The ``[[clang::atomic]]`` statement attribute enables users to control ho
@@ -1107,6 +1113,66 @@ inline void FPOptions::applyChanges(FPOptionsOverride
FPO) {
*this = FPO.applyOverrides(*this);
}
+// The three atomic code-generation options.
+// The canonical (positive) names are:
+// "remote_memory", "fine_grained_memory", and "ignore_denormal_
@@ -3286,6 +3286,8 @@ def err_invalid_branch_protection_spec : Error<
"invalid or misplaced branch protection specification '%0'">;
def warn_unsupported_branch_protection_spec : Warning<
"unsupported branch protection specification '%0'">,
InGroup;
+def err_attribute_inval
@@ -625,6 +625,43 @@ static Attr *handleHLSLControlFlowHint(Sema &S, Stmt *St,
const ParsedAttr &A,
return ::new (S.Context) HLSLControlFlowHintAttr(S.Context, A);
}
+static Attr *handleAtomicAttr(Sema &S, Stmt *St, const ParsedAttr &A,
+ Source
@@ -625,6 +625,41 @@ static Attr *handleHLSLControlFlowHint(Sema &S, Stmt *St,
const ParsedAttr &A,
return ::new (S.Context) HLSLControlFlowHintAttr(S.Context, A);
}
+static Attr *handleAtomicAttr(Sema &S, Stmt *St, const ParsedAttr &AL,
+ Sourc
@@ -1101,6 +1107,187 @@ inline void FPOptions::applyChanges(FPOptionsOverride
FPO) {
*this = FPO.applyOverrides(*this);
}
+// The three atomic code-generation options.
+// The canonical (positive) names are:
+// "remote_memory", "fine_grained_memory", and "ignore_denormal
@@ -4979,3 +4979,16 @@ def NoTrivialAutoVarInit: InheritableAttr {
let Documentation = [NoTrivialAutoVarInitDocs];
let SimpleHandler = 1;
}
+
+def Atomic : StmtAttr {
+ let Spellings = [Clang<"atomic">];
+ let Args = [VariadicStringArgument<"Options">];
y
@@ -1101,6 +1107,187 @@ inline void FPOptions::applyChanges(FPOptionsOverride
FPO) {
*this = FPO.applyOverrides(*this);
}
+// The three atomic code-generation options.
+// The canonical (positive) names are:
+// "remote_memory", "fine_grained_memory", and "ignore_denormal
@@ -625,6 +625,43 @@ static Attr *handleHLSLControlFlowHint(Sema &S, Stmt *St,
const ParsedAttr &A,
return ::new (S.Context) HLSLControlFlowHintAttr(S.Context, A);
}
+static Attr *handleAtomicAttr(Sema &S, Stmt *St, const ParsedAttr &A,
+ Source
@@ -625,6 +625,43 @@ static Attr *handleHLSLControlFlowHint(Sema &S, Stmt *St,
const ParsedAttr &A,
return ::new (S.Context) HLSLControlFlowHintAttr(S.Context, A);
}
+static Attr *handleAtomicAttr(Sema &S, Stmt *St, const ParsedAttr &A,
+ Source
@@ -3101,6 +3101,11 @@ class Parser : public CodeCompletionHandler {
std::optional ParseAvailabilitySpec();
ExprResult ParseAvailabilityCheckExpr(SourceLocation StartLoc);
+ void ParseAtomicAttribute(IdentifierInfo &AttrName,
yxsamliu wrote:
will use Var
@@ -1101,6 +1107,187 @@ inline void FPOptions::applyChanges(FPOptionsOverride
FPO) {
*this = FPO.applyOverrides(*this);
}
+// The three atomic code-generation options.
+// The canonical (positive) names are:
+// "remote_memory", "fine_grained_memory", and "ignore_denormal
@@ -1101,6 +1107,187 @@ inline void FPOptions::applyChanges(FPOptionsOverride
FPO) {
*this = FPO.applyOverrides(*this);
}
+// The three atomic code-generation options.
+// The canonical (positive) names are:
+// "remote_memory", "fine_grained_memory", and "ignore_denormal
@@ -5400,6 +5400,151 @@ third argument, can only occur at file scope.
a = b[i] * c[i] + e;
}
+Extensions for controlling atomic code generation
+=
+
+The ``[[clang::atomic]]`` statement attribute enables users to control ho
@@ -313,6 +313,8 @@ EXTENSION(datasizeof, LangOpts.CPlusPlus)
FEATURE(cxx_abi_relative_vtable, LangOpts.CPlusPlus &&
LangOpts.RelativeCXXABIVTables)
+FEATURE(atomic_attributes, true)
yxsamliu wrote:
will change
https://github.com/llvm/llvm-project/pull/114
@@ -5400,6 +5400,151 @@ third argument, can only occur at file scope.
a = b[i] * c[i] + e;
}
+Extensions for controlling atomic code generation
+=
+
+The ``[[clang::atomic]]`` statement attribute enables users to control ho
erichkeane wrote:
> ping
As mentioned in the discourse, quite a few of us were out of contact thanks to
the WG21 meeting that was last week. I'll take another look now.
https://github.com/llvm/llvm-project/pull/114841
___
cfe-commits mailing list
cf
yxsamliu wrote:
ping
https://github.com/llvm/llvm-project/pull/114841
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/yxsamliu edited
https://github.com/llvm/llvm-project/pull/114841
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/yxsamliu edited
https://github.com/llvm/llvm-project/pull/114841
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -5404,6 +5404,151 @@ third argument, can only occur at file scope.
a = b[i] * c[i] + e;
}
+Extensions for controlling atomic code generation
+=
+
+The ``[[clang::atomic]]`` statement attribute enables users to control ho
@@ -5404,6 +5404,151 @@ third argument, can only occur at file scope.
a = b[i] * c[i] + e;
}
+Extensions for controlling atomic code generation
+=
+
+The ``[[clang::atomic]]`` statement attribute enables users to control ho
@@ -5404,6 +5404,151 @@ third argument, can only occur at file scope.
a = b[i] * c[i] + e;
}
+Extensions for controlling atomic code generation
+=
+
+The ``[[clang::atomic]]`` statement attribute enables users to control ho
@@ -5404,6 +5404,151 @@ third argument, can only occur at file scope.
a = b[i] * c[i] + e;
}
+Extensions for controlling atomic code generation
+=
+
+The ``[[clang::atomic]]`` statement attribute enables users to control ho
@@ -5404,6 +5404,151 @@ third argument, can only occur at file scope.
a = b[i] * c[i] + e;
}
+Extensions for controlling atomic code generation
+=
+
+The ``[[clang::atomic]]`` statement attribute enables users to control ho
@@ -764,6 +764,73 @@ void Parser::ParseGNUAttributeArgs(
ScopeLoc, Form);
}
+void Parser::ParseAtomicAttribute(
yxsamliu wrote:
I've simplified ParseAtomicAttribute by introducing a lambda that handles
parsing a single option (inc
@@ -5958,6 +5968,58 @@ void Clang::ConstructJob(Compilation &C, const JobAction
&JA,
RenderFloatingPointOptions(TC, D, OFastEnabled, Args, CmdArgs, JA);
+ if (Arg *AtomicArg = Args.getLastArg(options::OPT_fatomic_EQ)) {
yxsamliu wrote:
Refactored the cod
@@ -1096,6 +1100,177 @@ inline void FPOptions::applyChanges(FPOptionsOverride
FPO) {
*this = FPO.applyOverrides(*this);
}
+/// Atomic control options
+class AtomicOptionsOverride;
+class AtomicOptions {
+public:
+ using storage_type = uint16_t;
+
+ static constexpr unsign
@@ -1096,6 +1100,177 @@ inline void FPOptions::applyChanges(FPOptionsOverride
FPO) {
*this = FPO.applyOverrides(*this);
}
+/// Atomic control options
+class AtomicOptionsOverride;
+class AtomicOptions {
+public:
+ using storage_type = uint16_t;
+
+ static constexpr unsign
@@ -0,0 +1,19 @@
+//===--- AtomicOptions.def - Atomic Options database -*- C++
-*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Ap
@@ -5404,6 +5404,115 @@ third argument, can only occur at file scope.
a = b[i] * c[i] + e;
}
+Extensions for controlling atomic code generation
+=
+
+The ``[[clang::atomic]]`` statement attribute enables users to control ho
@@ -0,0 +1,19 @@
+//===--- AtomicOptions.def - Atomic Options database -*- C++
-*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Ap
@@ -764,6 +764,73 @@ void Parser::ParseGNUAttributeArgs(
ScopeLoc, Form);
}
+void Parser::ParseAtomicAttribute(
erichkeane wrote:
I'm very much beginning to dislike the syntax for this, if it needs this much
special handling. We s
@@ -5958,6 +5968,58 @@ void Clang::ConstructJob(Compilation &C, const JobAction
&JA,
RenderFloatingPointOptions(TC, D, OFastEnabled, Args, CmdArgs, JA);
+ if (Arg *AtomicArg = Args.getLastArg(options::OPT_fatomic_EQ)) {
erichkeane wrote:
IMO, we need a s
@@ -1096,6 +1100,177 @@ inline void FPOptions::applyChanges(FPOptionsOverride
FPO) {
*this = FPO.applyOverrides(*this);
}
+/// Atomic control options
+class AtomicOptionsOverride;
+class AtomicOptions {
+public:
+ using storage_type = uint16_t;
+
+ static constexpr unsign
@@ -1096,6 +1100,177 @@ inline void FPOptions::applyChanges(FPOptionsOverride
FPO) {
*this = FPO.applyOverrides(*this);
}
+/// Atomic control options
+class AtomicOptionsOverride;
+class AtomicOptions {
+public:
+ using storage_type = uint16_t;
+
+ static constexpr unsign
@@ -5404,6 +5404,115 @@ third argument, can only occur at file scope.
a = b[i] * c[i] + e;
}
+Extensions for controlling atomic code generation
+=
+
+The ``[[clang::atomic]]`` statement attribute enables users to control ho
@@ -5404,6 +5404,115 @@ third argument, can only occur at file scope.
a = b[i] * c[i] + e;
}
+Extensions for controlling atomic code generation
+=
+
+The ``[[clang::atomic]]`` statement attribute enables users to control ho
https://github.com/yxsamliu edited
https://github.com/llvm/llvm-project/pull/114841
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -623,6 +623,10 @@ class LangOptions : public LangOptionsBase {
// WebAssembly target.
bool NoWasmOpt = false;
+ /// The default atomic codegen options specified by command line in the
+ /// format of key:{on|off}.
+ std::vector AtomicOptionsAsWritten;
---
@@ -3292,6 +3292,8 @@ def err_invalid_branch_protection_spec : Error<
"invalid or misplaced branch protection specification '%0'">;
def warn_unsupported_branch_protection_spec : Warning<
"unsupported branch protection specification '%0'">,
InGroup;
+def err_attribute_inval
@@ -305,6 +305,13 @@ def err_drv_invalid_int_value : Error<"invalid integral
value '%1' in '%0'">;
def err_drv_invalid_value_with_suggestion : Error<
"invalid value '%1' in '%0', expected one of: %2">;
def err_drv_alignment_not_power_of_two : Error<"alignment is not a powe
@@ -4972,3 +4972,59 @@ def NoTrivialAutoVarInit: InheritableAttr {
let Documentation = [NoTrivialAutoVarInitDocs];
let SimpleHandler = 1;
}
+
+def Atomic : StmtAttr {
+ let Spellings = [Clang<"atomic">];
+ let Args = [
+EnumArgument<"NoRemoteMemory", "NoRemoteMemoryTy
yxsamliu wrote:
> The changes should definitely come with a release note in
> `clang/docs/ReleaseNotes.rst`, but this also seems like it maybe should get
> wider documentation in the language extensions manual. I mentioned a need for
> attribute documentation, that could be simple docs which p
yxsamliu wrote:
> Mostly drive-by comments. Don't have strong opinion on either the attributes
> themselves nor how the values get parsed.
>
> One thing that's missing is the documentation for the attributes. Their
> format and meaning are far from obvious and should be documented along with
@@ -240,3 +240,49 @@ LLVM_DUMP_METHOD void FPOptionsOverride::dump() {
#include "clang/Basic/FPOptions.def"
llvm::errs() << "\n";
}
+
+AtomicOptionsOverride
+AtomicOptions::getChangesSlow(const AtomicOptions &Base) const {
+ AtomicOptions::storage_type OverrideMask = 0;
+#de
@@ -2355,6 +2355,14 @@ def fsymbol_partition_EQ : Joined<["-"],
"fsymbol-partition=">, Group,
Visibility<[ClangOption, CC1Option]>,
MarshallingInfoString>;
+def fatomic_EQ : CommaJoined<["-"], "fatomic=">, Group,
+ Visibility<[ClangOption, CC1Option]>,
+ HelpText<"Speci
@@ -305,6 +305,13 @@ def err_drv_invalid_int_value : Error<"invalid integral
value '%1' in '%0'">;
def err_drv_invalid_value_with_suggestion : Error<
"invalid value '%1' in '%0', expected one of: %2">;
def err_drv_alignment_not_power_of_two : Error<"alignment is not a powe
@@ -623,6 +623,10 @@ class LangOptions : public LangOptionsBase {
// WebAssembly target.
bool NoWasmOpt = false;
+ /// The default atomic codegen options specified by command line in the
+ /// format of key:{on|off}.
+ std::vector AtomicOptionsAsWritten;
---
@@ -305,6 +305,13 @@ def err_drv_invalid_int_value : Error<"invalid integral
value '%1' in '%0'">;
def err_drv_invalid_value_with_suggestion : Error<
"invalid value '%1' in '%0', expected one of: %2">;
def err_drv_alignment_not_power_of_two : Error<"alignment is not a powe
https://github.com/AaronBallman commented:
The changes should definitely come with a release note in
`clang/docs/ReleaseNotes.rst`, but this also seems like it maybe should get
wider documentation in the language extensions manual. I mentioned a need for
attribute documentation, that could be
@@ -4972,3 +4972,59 @@ def NoTrivialAutoVarInit: InheritableAttr {
let Documentation = [NoTrivialAutoVarInitDocs];
let SimpleHandler = 1;
}
+
+def Atomic : StmtAttr {
+ let Spellings = [Clang<"atomic">];
+ let Args = [
+EnumArgument<"NoRemoteMemory", "NoRemoteMemoryTy
@@ -3292,6 +3292,8 @@ def err_invalid_branch_protection_spec : Error<
"invalid or misplaced branch protection specification '%0'">;
def warn_unsupported_branch_protection_spec : Warning<
"unsupported branch protection specification '%0'">,
InGroup;
+def err_attribute_inval
https://github.com/AaronBallman edited
https://github.com/llvm/llvm-project/pull/114841
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -305,6 +305,13 @@ def err_drv_invalid_int_value : Error<"invalid integral
value '%1' in '%0'">;
def err_drv_invalid_value_with_suggestion : Error<
"invalid value '%1' in '%0', expected one of: %2">;
def err_drv_alignment_not_power_of_two : Error<"alignment is not a powe
@@ -2355,6 +2355,14 @@ def fsymbol_partition_EQ : Joined<["-"],
"fsymbol-partition=">, Group,
Visibility<[ClangOption, CC1Option]>,
MarshallingInfoString>;
+def fatomic_EQ : CommaJoined<["-"], "fatomic=">, Group,
+ Visibility<[ClangOption, CC1Option]>,
+ HelpText<"Speci
@@ -240,3 +240,49 @@ LLVM_DUMP_METHOD void FPOptionsOverride::dump() {
#include "clang/Basic/FPOptions.def"
llvm::errs() << "\n";
}
+
+AtomicOptionsOverride
+AtomicOptions::getChangesSlow(const AtomicOptions &Base) const {
+ AtomicOptions::storage_type OverrideMask = 0;
+#de
https://github.com/Artem-B commented:
Mostly drive-by comments. Don't have strong opinion on either the attributes
themselves nor how the values get parsed.
One thing that's missing is the documentation for the attributes. Their format
and meaning are far from obvious and should be documented
https://github.com/Artem-B edited
https://github.com/llvm/llvm-project/pull/114841
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,19 @@
+//===--- AtomicOptions.def - Atomic Options database -*- C++
-*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Ap
@@ -0,0 +1,19 @@
+//===--- AtomicOptions.def - Atomic Options database -*- C++
-*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Ap
@@ -0,0 +1,19 @@
+//===--- AtomicOptions.def - Atomic Options database -*- C++
-*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Ap
yxsamliu wrote:
ping
https://github.com/llvm/llvm-project/pull/114841
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,30 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -fcuda-is-device %s
+// RUN: %clang_cc1 -fsyntax-only -verify -fcuda-is-device %s \
+// RUN:
-fatomic=no_fine_grained_memory:off,no_remote_memory:on,ignore_denormal_mode:on
+
@@ -0,0 +1,30 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -fcuda-is-device %s
+// RUN: %clang_cc1 -fsyntax-only -verify -fcuda-is-device %s \
+// RUN:
-fatomic=no_fine_grained_memory:off,no_remote_memory:on,ignore_denormal_mode:on
+
@@ -569,19 +569,21 @@ void AMDGPUTargetCodeGenInfo::setTargetAtomicMetadata(
AtomicInst.setMetadata(llvm::LLVMContext::MD_noalias_addrspace, ASRange);
}
- if (!RMW || !CGF.getTarget().allowAMDGPUUnsafeFPAtomics())
+ if (!RMW)
return;
- // TODO: Introduce new, m
@@ -0,0 +1,19 @@
+//===--- AtomicOptions.def - Atomic Options database -*- C++
-*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Ap
@@ -1093,6 +1097,169 @@ inline void FPOptions::applyChanges(FPOptionsOverride
FPO) {
*this = FPO.applyOverrides(*this);
}
+/// Atomic control options
+class AtomicOptionsOverride;
+class AtomicOptions {
+public:
+ using storage_type = uint16_t;
+
+ static constexpr unsign
@@ -1093,6 +1097,169 @@ inline void FPOptions::applyChanges(FPOptionsOverride
FPO) {
*this = FPO.applyOverrides(*this);
}
+/// Atomic control options
+class AtomicOptionsOverride;
+class AtomicOptions {
+public:
+ using storage_type = uint16_t;
+
+ static constexpr unsign
llvmbot wrote:
@llvm/pr-subscribers-clang-driver
Author: Yaxun (Sam) Liu (yxsamliu)
Changes
Add option and statement attribute for controlling emitting of target-specific
metadata to atomicrmw instructions in IR.
The RFC for this attribute and option is
https://discourse.llvm.org/t/rfc-a
@@ -0,0 +1,19 @@
+//===--- AtomicOptions.def - Atomic Options database -*- C++
-*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Ap
@@ -569,19 +569,21 @@ void AMDGPUTargetCodeGenInfo::setTargetAtomicMetadata(
AtomicInst.setMetadata(llvm::LLVMContext::MD_noalias_addrspace, ASRange);
}
- if (!RMW || !CGF.getTarget().allowAMDGPUUnsafeFPAtomics())
+ if (!RMW)
return;
- // TODO: Introduce new, m
@@ -0,0 +1,30 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -fcuda-is-device %s
+// RUN: %clang_cc1 -fsyntax-only -verify -fcuda-is-device %s \
+// RUN:
-fatomic=no_fine_grained_memory:off,no_remote_memory:on,ignore_denormal_mode:on
+
llvmbot wrote:
@llvm/pr-subscribers-backend-amdgpu
Author: Yaxun (Sam) Liu (yxsamliu)
Changes
Add option and statement attribute for controlling emitting of target-specific
metadata to atomicrmw instructions in IR.
The RFC for this attribute and option is
https://discourse.llvm.org/t/rfc
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Yaxun (Sam) Liu (yxsamliu)
Changes
Add option and statement attribute for controlling emitting of target-specific
metadata to atomicrmw instructions in IR.
The RFC for this attribute and option is
https://discourse.llvm.org/t/rfc-add-clan
99 matches
Mail list logo