@@ -20,7 +20,8 @@ enum IR2VecMode { FlowAware, Symbolic };
2020
2121class Embeddings {
2222 int generateEncodings (llvm::Module &M, IR2VecMode mode, char level = ' \0 ' ,
23- std::string funcName = " " , llvm::Function* FuncPtr = nullptr , unsigned dim = 300 ,
23+ std::string funcName = " " ,
24+ llvm::Function *FuncPtr = nullptr , unsigned dim = 300 ,
2425 std::ostream *o = nullptr , int cls = -1 , float WO = 1 ,
2526 float WA = 0.2 , float WT = 0.5 );
2627
@@ -33,32 +34,30 @@ class Embeddings {
3334public:
3435 Embeddings () = default ;
3536
36- // Constructor with function pointer
37- Embeddings (llvm::Module &M, IR2VecMode mode, llvm::Function *FuncPtr= nullptr , unsigned dim = 300 ,
38- float WO = 1 , float WA = 0.2 ,
39- float WT = 0.5 ) {
37+ // Constructor with function pointer
38+ Embeddings (llvm::Module &M, IR2VecMode mode,
39+ llvm::Function *FuncPtr = nullptr , unsigned dim = 300 ,
40+ float WO = 1 , float WA = 0.2 , float WT = 0.5 ) {
4041 vocabulary = VocabularyFactory::createVocabulary (dim)->getVocabulary ();
4142 generateEncodings (M, mode, ' \0 ' , " " , FuncPtr, dim, nullptr , -1 , WO , WA , WT );
4243 }
4344
44-
45- Embeddings (llvm::Module &M, IR2VecMode mode, std::string funcName=" " , unsigned dim = 300 ,
46- float WO = 1 , float WA = 0.2 ,
47- float WT = 0.5 ) {
45+ Embeddings (llvm::Module &M, IR2VecMode mode, std::string funcName = " " ,
46+ unsigned dim = 300 , float WO = 1 , float WA = 0.2 , float WT = 0.5 ) {
4847 vocabulary = VocabularyFactory::createVocabulary (dim)->getVocabulary ();
49- generateEncodings (M, mode, ' \0 ' , funcName, nullptr , dim, nullptr , -1 , WO , WA , WT );
48+ generateEncodings (M, mode, ' \0 ' , funcName, nullptr , dim, nullptr , -1 , WO ,
49+ WA , WT );
5050 }
5151
52-
53-
5452 // Use this constructor if the representations ought to be written to a
5553 // file. Analogous to the command line options that are being used in IR2Vec
5654 // binary.
5755 Embeddings (llvm::Module &M, IR2VecMode mode, char level, std::ostream *o,
58- std::string funcName= " " , unsigned dim = 300 , float WO = 1 ,
56+ std::string funcName = " " , unsigned dim = 300 , float WO = 1 ,
5957 float WA = 0.2 , float WT = 0.5 ) {
6058 vocabulary = VocabularyFactory::createVocabulary (dim)->getVocabulary ();
61- generateEncodings (M, mode, level, funcName, nullptr , dim, o, -1 , WO , WA , WT );
59+ generateEncodings (M, mode, level, funcName, nullptr , dim, o, -1 , WO , WA ,
60+ WT );
6261 }
6362
6463 // Returns a map containing instructions and the corresponding vector
0 commit comments