-
Notifications
You must be signed in to change notification settings - Fork 243
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: Support C11 atomics required by dav1d #814
base: master
Are you sure you want to change the base?
Conversation
a3bff0f
to
ce04e4e
Compare
As atomics are being implemented, these warnings are becoming wrong. Any operations on atomics that stay unimplmented will be caught more precisely at later translation stages.
ce04e4e
to
d84fa89
Compare
d84fa89
to
042845b
Compare
@@ -363,7 +365,7 @@ class TypeEncoder final : public TypeVisitor<TypeEncoder> { | |||
} | |||
}(); | |||
// All the SVE types present in Clang 10 are 128-bit vectors | |||
// (see `AArch64SVEACLETypes.def`), so we can divide 128 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unrelated formatting change
@@ -403,7 +405,7 @@ class TypeEncoder final : public TypeVisitor<TypeEncoder> { | |||
// Constructed as a consequence of the conversion of | |||
// built-in to normal vector types. | |||
case BuiltinType::Float16: return TagHalf; | |||
case BuiltinType::Half: return TagHalf; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unrelated formatting change.
@@ -1756,6 +1766,11 @@ impl ConversionContext { | |||
let typ = node.type_id.expect("Expected expression to have type"); | |||
let typ = self.visit_qualified_type(typ); | |||
|
|||
// Perhaps as an optimization since atomic_init has no order, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should really define a fixed operand ordering here in our interchange format, but this technically works.
"__atomic_compare_exchange" | "__atomic_compare_exchange_n" => { | ||
"__atomic_compare_exchange" | ||
| "__atomic_compare_exchange_n" | ||
| "__c11_atomic_compare_exchange_strong" => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
weak?
// TODO(perl): __c11_atomic_compare_exchange_strong does not | ||
// seem to produce correct code. It produces a deref operation | ||
// on the `src` argument to atomic_cxchg_seqcst_seqcst. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it doesn't produce correct code then why are we handling it at all?
No description provided.