File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -153,6 +153,7 @@ class Vocabulary {
153
153
static_cast <unsigned >(OperandKind::MaxOperandKind),
154
154
" OperandKindNames array size must match MaxOperandKind" );
155
155
156
+ public:
156
157
// / Vocabulary layout constants
157
158
#define LAST_OTHER_INST (NUM ) static constexpr unsigned MaxOpcodes = NUM;
158
159
#include " llvm/IR/Instruction.def"
@@ -162,7 +163,6 @@ class Vocabulary {
162
163
static constexpr unsigned MaxOperandKinds =
163
164
static_cast <unsigned >(OperandKind::MaxOperandKind);
164
165
165
- public:
166
166
Vocabulary () = default ;
167
167
Vocabulary (VocabVector &&Vocab);
168
168
Original file line number Diff line number Diff line change @@ -364,9 +364,9 @@ TEST_F(IR2VecTestFixture, GetFunctionVector) {
364
364
EXPECT_TRUE (FuncVec.approximatelyEquals (Embedding (2 , 44.4 )));
365
365
}
366
366
367
- static constexpr unsigned MaxOpcodes = 67 ;
368
- static constexpr unsigned MaxTypeIDs = 21 ;
369
- static constexpr unsigned MaxOperands = 4 ;
367
+ static constexpr unsigned MaxOpcodes = Vocabulary::MaxOpcodes ;
368
+ static constexpr unsigned MaxTypeIDs = Vocabulary::MaxTypeIDs ;
369
+ static constexpr unsigned MaxOperands = Vocabulary::MaxOperandKinds ;
370
370
371
371
TEST (IR2VecVocabularyTest, DummyVocabTest) {
372
372
for (unsigned Dim = 1 ; Dim <= 10 ; ++Dim) {
You can’t perform that action at this time.
0 commit comments