[llvm] [IR2Vec] Restructuring Vocabulary (PR #145119)

Mircea Trofin via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 1 12:15:40 PDT 2025


================
@@ -34,13 +34,13 @@ class FunctionPropertiesInfo {
   void reIncludeBB(const BasicBlock &BB);
 
   ir2vec::Embedding FunctionEmbedding = ir2vec::Embedding(0.0);
-  std::optional<ir2vec::Vocab> IR2VecVocab;
+  const ir2vec::Vocabulary *IR2VecVocab = nullptr;
----------------
mtrofin wrote:

you can `const ir2vec::Vocabulary * const;` - the value is const, potentially `nullptr`, and also the field is set-once, right?

https://github.com/llvm/llvm-project/pull/145119


More information about the llvm-commits mailing list