[PATCH] D71830: [OpenMP][Part 2] Use reusable OpenMP context/traits handling

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 13 23:57:43 PDT 2020


jdoerfert marked an inline comment as done.
jdoerfert added inline comments.


================
Comment at: clang/include/clang/AST/OpenMPClause.h:6682
+  /// The outermost level of selector sets.
+  llvm::SmallVector<OMPTraitSet, 4> Sets;
+
----------------
jdoerfert wrote:
> rnk wrote:
> > This is not a good data structure choice. You have three levels of small vector nesting, so sizeof OMPTraitInfo is 880 bytes, and then you are passing it by value in in some of the attribute classes. Are you sure you wanted to do that?
> I could make them all 0 elements long, reducing the size quite a bit for the common case of very few trait sets/selectors/properties. I could also try to dynamically allocate them once. WDYT?
One way of fixing this is D76173


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D71830





More information about the llvm-commits mailing list