aaron.ballman added inline comments.
Comment at: clang/docs/LanguageExtensions.rst:260
+``__has_target_feature``
+
yaxunl wrote:
> aaron.ballman wrote:
> > The first question that comes to mind for me is: why is `__has_feature` not
> >
yaxunl marked an inline comment as done.
yaxunl added inline comments.
Comment at: clang/docs/LanguageExtensions.rst:275
+ // On amdgcn target
+ #if __has_target_feature("s-memtime-inst")
+x = __builtin_amdgcn_s_memtime();
yaxunl wrote:
> yaxunl wrote:
> >
tra added a comment.
Oops. forgot to hit 'submit' last week, so there's some overlap with Aaron's
question.
Comment at: clang/docs/LanguageExtensions.rst:275
+ // On amdgcn target
+ #if __has_target_feature("s-memtime-inst")
+x = __builtin_amdgcn_s_memtime();
---
yaxunl marked an inline comment as done.
yaxunl added inline comments.
Comment at: clang/docs/LanguageExtensions.rst:275
+ // On amdgcn target
+ #if __has_target_feature("s-memtime-inst")
+x = __builtin_amdgcn_s_memtime();
yaxunl wrote:
> aaron.ballman wrot
yaxunl marked 2 inline comments as done.
yaxunl added inline comments.
Comment at: clang/docs/LanguageExtensions.rst:260
+``__has_target_feature``
+
aaron.ballman wrote:
> The first question that comes to mind for me is: why is `__has_fe
aaron.ballman added a comment.
It's not clear to me why existing facilities shouldn't be extended to cover
this case rather than coming up with another feature testing macro. There's
already plenty of confusion for users to decide between `__has_feature` and
`__has_extension`, and now we're tal
yaxunl marked an inline comment as done.
yaxunl added inline comments.
Comment at: clang/docs/LanguageExtensions.rst:275
+ // On amdgcn target
+ #if __has_target_feature("s-memtime-inst")
+x = __builtin_amdgcn_s_memtime();
tra wrote:
> Do you have a better
tra added inline comments.
Comment at: clang/docs/LanguageExtensions.rst:275
+ // On amdgcn target
+ #if __has_target_feature("s-memtime-inst")
+x = __builtin_amdgcn_s_memtime();
Do you have a better example? This particular case could've been handled by
e
yaxunl updated this revision to Diff 429265.
yaxunl added a comment.
fix typo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D12/new/
https://reviews.llvm.org/D12
Files:
clang/docs/LanguageExtensions.rst
clang/docs/ReleaseNotes.rst
clang/include/clang/Lex/Preprocessor.h
c
yaxunl created this revision.
yaxunl added reviewers: rsmith, aaron.ballman, tra.
Herald added a project: All.
yaxunl requested review of this revision.
Depending on whether a target feature is enabled or not,
programs may choose different algorithm or different
builtin functions to use.
Instead
10 matches
Mail list logo