[PATCH] D12221: [RFC] Introduce `__attribute__((nontemporal))`.

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 21 11:06:30 PDT 2015


aaron.ballman added a comment.

In http://reviews.llvm.org/D12221#230187, @mzolotukhin wrote:

> **Aaron**,
>  As far as I understand, type attributes doesn't result in such complications (as opposed to type qualifiers, e.g. `__restrict__`). That is, it doesn't change the canonical type, it only adds some 'sugar' to it. I.e. ` float *__attribute__((nontemporal))` and `float *` would behave as the same type in templates and names mangling. Please correct me if I'm wrong here.


You are correct in that type attributes do not change the canonical type, but I perhaps didn't explain the complications properly. For instance, if I wanted to store a std::vector of these nontemporal type objects, I could not do so because the type attribute information would be lost. By using a builtin, I could instead push the temporality decision to the operation on the vector objects.

~Aaron


http://reviews.llvm.org/D12221





More information about the cfe-commits mailing list