On Fri, Aug 21, 2015 at 12:14 PM, Michael Zolotukhin via cfe-commits < cfe-commits@lists.llvm.org> wrote:
> mzolotukhin added a comment. > > Oh, I see. So, you meant something like this? > > void foo(std::vector<float * __attribute__((nontemporal))> av, float * > b, int N) { > for (auto a: av) // << `a` doesn't have nontemporal attribute here > for (int i = 0; i < N; i++) > a[i] = b[i]+1; > } > > One can easily work around it by using an explicit type here (`float * > __attribute__((nontemporal))` instead of `auto`), but I agree that > disappeared attribute might be a surprise for the user. Do you think it > would be a frequent case? > > BTW, there are other type attributes, which also suffer from the same > issue, e.g. `vector_size`. What was the rationale of making them type > attributes? vector_size produces a completely different type, with a different size, alignment, different semantics and constraints for primitive operations, and so on.
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits