[PATCH] D138496: [WIP][OMPIRBuilder] Add OpenMPDefaultSimdAlignment field to TargetMachine class

Jan Sjödin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 22 07:45:26 PST 2022


jsjodin added a comment.

Looking at the existing code before the patch:
  /// Return default simd alignment for the given target. Generally, this
  /// value is type-specific, but this alignment can be used for most of the
  /// types for the given target.
  unsigned getSimdDefaultAlign() const { return SimdDefaultAlign; }
It is very imprecise. Which types? The smallest alignment for all vector and element types?.

If we are moving this to LLVM, can we use the data layout to infer what the default alignment is? Hopefully we can figure out what the criteria are and make the function work for any target, or maybe error out if it doesn't apply.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D138496/new/

https://reviews.llvm.org/D138496



More information about the llvm-commits mailing list