[cfe-dev] std::vector and tbaa

Hal Finkel hfinkel at anl.gov
Mon Sep 10 19:24:07 PDT 2012


Hello,

Please correct me if I'm wrong, but I think that, so long as the
default allocator is used, then the data pointers inside distinct
instances of std::vector are guaranteed not to alias. To aid with
autovectorization (among other things), I'd like to pass this
information to LLVM (using TBAA). Can anyone think of a reason why
this is a bad idea? Is there a safe way to do this without teaching
clang about the details of different std::vector implementations?

Thanks in advance,
Hal

-- 
Hal Finkel
Postdoctoral Appointee
Leadership Computing Facility
Argonne National Laboratory



More information about the cfe-dev mailing list