[PATCH] D67159: [clang] New __attribute__((__clang_builtin)).

2019-09-11 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham updated this revision to Diff 219691. simon_tatham added a comment. New version which renames the attribute to be MVE-specific, and locks it down as requested. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67159/new/

[PATCH] D67159: [clang] New __attribute__((__clang_builtin)).

2019-09-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D67159#1659103 , @simon_tatham wrote: > Come to think of it, it would also not be too hard to constrain it to > //only// be usable for a particular subset of builtins, and perhaps even only > with a particular set of

[PATCH] D67159: [clang] New __attribute__((__clang_builtin)).

2019-09-05 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham added a comment. Come to think of it, it would also not be too hard to constrain it to //only// be usable for a particular subset of builtins, and perhaps even only with a particular set of alias names for them. (I could easily derive all that information from the same Tablegen

[PATCH] D67159: [clang] New __attribute__((__clang_builtin)).

2019-09-05 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In D67159#1659084 , @simon_tatham wrote: > On the general discomfort with this attribute existing: I'd be happy to lock > it down, or mark it as "not recommended" in some way, if that's any help. I > don't personally intend

[PATCH] D67159: [clang] New __attribute__((__clang_builtin)).

2019-09-05 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham marked 2 inline comments as done. simon_tatham added a comment. On the general discomfort with this attribute existing: I'd be happy to lock it down, or mark it as "not recommended" in some way, if that's any help. I don't personally intend any use of it outside a single system

[PATCH] D67159: [clang] New __attribute__((__clang_builtin)).

2019-09-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. I share in the discomfort expressed for this attribute, but I don't have a better solution in mind just yet, so I'm giving some other review feedback in the meantime. Comment at: clang/include/clang/Basic/Attr.td:596 } +def

[PATCH] D67159: [clang] New __attribute__((__clang_builtin)).

2019-09-04 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham added a comment. Sorry about that – I didn't want to put the discussion of rationale in too many different places. The commit message for the followup patch D67161 discusses it a bit. The usual thing in previous intrinsics systems like NEON is

[PATCH] D67159: [clang] New __attribute__((__clang_builtin)).

2019-09-04 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. It somehow doesn't seem entirely good to provide a way to mark arbitrary function in sources as a builtin.. Why can't those MVE builtins be implemented similarly like all the existing builtins? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D67159: [clang] New __attribute__((__clang_builtin)).

2019-09-04 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham created this revision. simon_tatham added reviewers: dmgreen, miyuki, ostannard. Herald added a project: clang. Herald added a subscriber: cfe-commits. This allows you to declare a function with a name of your choice (say `foo`), but have clang treat it as if it were a builtin