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 {
153153 static_cast <unsigned >(OperandKind::MaxOperandKind),
154154 " OperandKindNames array size must match MaxOperandKind" );
155155
156+ public:
156157 // / Vocabulary layout constants
157158#define LAST_OTHER_INST (NUM ) static constexpr unsigned MaxOpcodes = NUM;
158159#include " llvm/IR/Instruction.def"
@@ -162,7 +163,6 @@ class Vocabulary {
162163 static constexpr unsigned MaxOperandKinds =
163164 static_cast <unsigned >(OperandKind::MaxOperandKind);
164165
165- public:
166166 Vocabulary () = default ;
167167 Vocabulary (VocabVector &&Vocab);
168168
Original file line number Diff line number Diff line change @@ -364,9 +364,9 @@ TEST_F(IR2VecTestFixture, GetFunctionVector) {
364364 EXPECT_TRUE (FuncVec.approximatelyEquals (Embedding (2 , 44.4 )));
365365}
366366
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 ;
370370
371371TEST (IR2VecVocabularyTest, DummyVocabTest) {
372372 for (unsigned Dim = 1 ; Dim <= 10 ; ++Dim) {
You can’t perform that action at this time.
0 commit comments