[all-commits] [llvm/llvm-project] e86bd0: [IR2Vec] Restructuring Vocabulary (#145119)

S. VenkataKeerthy via All-commits all-commits at lists.llvm.org
Mon Jul 14 11:07:51 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e86bd05bdc110abcf6c6d2b6b48ede4361ce42e4
      https://github.com/llvm/llvm-project/commit/e86bd05bdc110abcf6c6d2b6b48ede4361ce42e4
  Author: S. VenkataKeerthy <31350914+svkeerthy at users.noreply.github.com>
  Date:   2025-07-14 (Mon, 14 Jul 2025)

  Changed paths:
    M llvm/include/llvm/Analysis/FunctionPropertiesAnalysis.h
    M llvm/include/llvm/Analysis/IR2Vec.h
    M llvm/lib/Analysis/FunctionPropertiesAnalysis.cpp
    M llvm/lib/Analysis/IR2Vec.cpp
    M llvm/lib/Analysis/models/seedEmbeddingVocab75D.json
    M llvm/test/Analysis/IR2Vec/Inputs/dummy_2D_vocab.json
    A llvm/test/Analysis/IR2Vec/Inputs/dummy_3D_nonzero_arg_vocab.json
    A llvm/test/Analysis/IR2Vec/Inputs/dummy_3D_nonzero_opc_vocab.json
    A llvm/test/Analysis/IR2Vec/Inputs/dummy_3D_nonzero_type_vocab.json
    A llvm/test/Analysis/IR2Vec/Inputs/reference_default_vocab_print.txt
    A llvm/test/Analysis/IR2Vec/Inputs/reference_wtd1_vocab_print.txt
    A llvm/test/Analysis/IR2Vec/Inputs/reference_wtd2_vocab_print.txt
    M llvm/test/Analysis/IR2Vec/basic.ll
    M llvm/test/Analysis/IR2Vec/dbg-inst.ll
    M llvm/test/Analysis/IR2Vec/if-else.ll
    M llvm/test/Analysis/IR2Vec/unreachable.ll
    M llvm/test/Analysis/IR2Vec/vocab-test.ll
    M llvm/unittests/Analysis/FunctionPropertiesAnalysisTest.cpp
    M llvm/unittests/Analysis/IR2VecTest.cpp

  Log Message:
  -----------
  [IR2Vec] Restructuring Vocabulary (#145119)

This PR restructures the vocabulary. 

* String based look-ups are removed. Vocabulary is changed from a map to vector. (#141832)
* Grouped all the vocabulary related methods under a single class - `ir2vec::Vocabulary`. This replaces `IR2VecVocabResult`.
* `ir2vec::Vocabulary` effectively abstracts out the _layout_ and other internal details of the vector structure. Exposes necessary APIs for accessing the Vocabulary. 

These changes ensure that _all_ known opcodes and types are present in the vocabulary. We have retained the original operands. This can be extended going forward. 

(Tracking issue - #141817)



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list