[PATCH] D48935: [llvm-exegesis] Provide a way to handle memory instructions.
Guillaume Chatelet via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 25 05:49:37 PDT 2018
gchatelet accepted this revision.
gchatelet added inline comments.
This revision is now accepted and ready to land.
================
Comment at: tools/llvm-exegesis/lib/BenchmarkRunner.h:77
+ : UnalignedPtr(new char[kSize + kAlignment]),
+ AlignedPtr(UnalignedPtr + kAlignment -
+ (reinterpret_cast<intptr_t>(UnalignedPtr) % kAlignment)) {}
----------------
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);`?
Repository:
rL LLVM
https://reviews.llvm.org/D48935
More information about the llvm-commits
mailing list