[llvm] [IR2Vec] Add support for flow-aware embeddings (PR #152613)
S. VenkataKeerthy via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 11 10:36:24 PDT 2025
================
@@ -257,9 +262,8 @@ class Embedder {
LLVM_ABI Embedder(const Function &F, const Vocabulary &Vocab);
/// Helper function to compute embeddings. It generates embeddings for all
- /// the instructions and basic blocks in the function F. Logic of computing
- /// the embeddings is specific to the kind of embeddings being computed.
- virtual void computeEmbeddings() const = 0;
+ /// the instructions and basic blocks in the function F.
+ void computeEmbeddings() const;
----------------
svkeerthy wrote:
Coz we don't expect the derived classes to have specialized computeEmbeddings() anymore. Base class provides a generic implementation which invokes computeEmbeddings(BasicBlock &). So, virtual seems to be unnecessary here.
https://github.com/llvm/llvm-project/pull/152613
More information about the llvm-commits
mailing list