[PATCH] D48617: [Builtins][Attributes][X86] Tag all X86 builtins with their required vector width. Add a min_vector_width function attribute and tag all x86 instrinsics with it.

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 3 15:48:51 PDT 2018

aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.

Aside from a new round of minor doc nits, I think this is looking good.

One remaining question I have is whether the attribute should diagnose an argument for a width that's not supported by the target and drop the attribute explicitly. e.g., if a user picks a min width that's 10240000 and the target cannot handle it, I think it's better to diagnose than to silently truncate to a value the user wasn't expecting. However, this can be handled in a follow-up patch if you want to land this and not have to deal with constant rebasing headaches.

Comment at: include/clang/Basic/AttrDocs.td:1512
+vectors to be limited to using 256-bit vectors to avoid frequency penalties.
+This is currently enabled with the -prefer-vector-width=256 command line option.
+The min_vector_width attribute can be used to prevent the backend from trying
Backticks around the command line option; same below (and for the attribute name as well). Basically, put the code things into the code font.


More information about the cfe-commits mailing list