[PATCH] D111709: [Flang] flang-omp-report replace std::vector's with llvm::SmallVector

Valentin Clement via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 13 07:42:03 PDT 2021


clementval added inline comments.


================
Comment at: flang/examples/flang-omp-report-plugin/flang-omp-report-visitor.h:101
+  llvm::SmallVector<OmpWrapperType *> ompWrapperStack;
+  std::map<OmpWrapperType *, llvm::SmallVector<ClauseInfo>> clauseStrings;
   Parsing *parsing{nullptr};
----------------
DavidTruby wrote:
> clementval wrote:
> > DavidTruby wrote:
> > > just putting this here as a note (this should be done in a separate patch):
> > > This `std::map` should probably be changed to an `llvm::DenseMap` or similar
> > You can use `std::unordered_map` here instead. 
> Use of `std::unordered_map` is highly discouraged in llvm because it has portability issues across implementations. See https://llvm.org/docs/ProgrammersManual.html#other-map-like-container-options for more details
Unordered_set is discourage but not unordered_map. It is used widely in the code base


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D111709



More information about the llvm-commits mailing list