Skip to content

Commit ef0f4f1

Browse files
committed
fixup! Use SmallPtrSet.
1 parent f3cf5ca commit ef0f4f1

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

llvm/utils/TableGen/Common/CodeGenSchedule.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2175,7 +2175,7 @@ bool CodeGenProcModel::isUnsupported(const CodeGenInstruction &Inst) const {
21752175
}
21762176

21772177
bool CodeGenProcModel::hasReadOfWrite(const Record *WriteDef) const {
2178-
return ReadOfWriteSet.count(WriteDef) != 0;
2178+
return ReadOfWriteSet.count(WriteDef);
21792179
}
21802180

21812181
#ifndef NDEBUG

llvm/utils/TableGen/Common/CodeGenSchedule.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#include "llvm/ADT/DenseMap.h"
2020
#include "llvm/ADT/DenseSet.h"
2121
#include "llvm/ADT/STLExtras.h"
22+
#include "llvm/ADT/SmallPtrSet.h"
2223
#include "llvm/ADT/StringRef.h"
2324
#include "llvm/TableGen/Record.h"
2425
#include "llvm/TableGen/SetTheory.h"
@@ -251,7 +252,7 @@ struct CodeGenProcModel {
251252
DenseMap<const Record *, const Record *> ReadAdvanceMap;
252253

253254
// Set of WriteRes that are referenced by a ReadAdvance.
254-
DenseSet<const Record *> ReadOfWriteSet;
255+
SmallPtrSet<const Record *, 8> ReadOfWriteSet;
255256

256257
// Per-operand machine model resources associated with this processor.
257258
ConstRecVec ProcResourceDefs;

0 commit comments

Comments
 (0)