[PATCH] D37957: [TableGen] Some simple optimizations to TableGen execution time
Krzysztof Parzyszek via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 20 10:41:23 PDT 2017
kparzysz accepted this revision.
kparzysz added a comment.
This revision is now accepted and ready to land.
LGTM with a few nitpicks (inline comments). Also, could you commit the DenseSet/tombstone changes in a separate patch?
================
Comment at: llvm/utils/TableGen/CodeGenDAGPatterns.cpp:101
bool Changed = false;
- std::set<unsigned> Modes;
+ llvm::SmallDenseSet<unsigned, 4> Modes;
for (const auto &P : VVT) {
----------------
Same here---the llvm:: seems unnecessary.
================
Comment at: llvm/utils/TableGen/CodeGenDAGPatterns.cpp:167
+void TypeSetByHwMode::writeToStream(raw_ostream &OS) const {
+ llvm::SmallVector<unsigned, 4> Modes;
+ Modes.reserve(Map.size());
----------------
Same here.
================
Comment at: llvm/utils/TableGen/CodeGenDAGPatterns.h:21
#include "CodeGenTarget.h"
+#include "llvm/ADT/DenseSet.h"
#include "llvm/ADT/SmallVector.h"
----------------
This should go in the .cpp file (I don't see any uses of DenseSet in the header).
================
Comment at: llvm/utils/TableGen/CodeGenDAGPatterns.h:338
/// Set type used to track multiply used variables in patterns
-typedef std::set<std::string> MultipleUseVarSet;
+typedef llvm::StringSet<> MultipleUseVarSet;
----------------
Is the llvm:: needed here?
https://reviews.llvm.org/D37957
More information about the llvm-commits
mailing list