[PATCH] D48935: [llvm-exegesis] Provide a way to handle memory instructions.
Clement Courbet via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Jul 28 01:10:42 PDT 2018
courbet added a comment.
Thanks.
================
Comment at: tools/llvm-exegesis/lib/BenchmarkRunner.h:77
+ : UnalignedPtr(new char[kSize + kAlignment]),
+ AlignedPtr(UnalignedPtr + kAlignment -
+ (reinterpret_cast<intptr_t>(UnalignedPtr) % kAlignment)) {}
----------------
gchatelet wrote:
> courbet wrote:
> > gchatelet wrote:
> > > Why not [aligned_alloc](https://en.cppreference.com/w/c/memory/aligned_alloc) ?
> > >
> > the alignment of aligned_alloc has to be an alignment for a valid object. Some X86 instructions require 512 byte alignment, wich is not the alignment of any valid object.
> I don't understand why you can't use `aligned_alloc(1024, 1<<20);`?
aligned_alloc is c++17...
Repository:
rL LLVM
https://reviews.llvm.org/D48935
More information about the llvm-commits
mailing list