[PATCH] D76173: [OpenMP][NFC] Minimize memory usage and copying of `OMPTraitInfo`s

Reid Kleckner via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Mar 14 09:06:23 PDT 2020


rnk accepted this revision.
rnk added a comment.
This revision is now accepted and ready to land.

lgtm, thanks!

I also noticed that Parser.h includes OpenMPClause.h just for this class. OpenMPClause.h is pretty big. It's for this family of related methods:

  /// Parse a property kind into \p TIProperty for the selector set \p Set and
  /// selector \p Selector.
  void parseOMPTraitPropertyKind(OMPTraitInfo::OMPTraitProperty &TIProperty,
                                 llvm::omp::TraitSet Set,
                                 llvm::omp::TraitSelector Selector,
                                 llvm::StringMap<SourceLocation> &Seen);

The use of an inner class here makes it impossible to forward declare OMPTraitProperty. Would you be opposed to moving it out of line?

The other popular includer of OpenMPClause.h is Attr.h, which is where I started my investigation. I think after your change, we can forward declare it. I'll look into it.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D76173





More information about the cfe-commits mailing list