================ @@ -186,6 +186,20 @@ MLInlineAdvisor::MLInlineAdvisor( EdgeCount += getLocalCalls(KVP.first->getFunction()); } NodeCount = AllNodes.size(); + + if (auto IR2VecVocabResult = MAM.getCachedResult<IR2VecVocabAnalysis>(M)) { + if (!IR2VecVocabResult->isValid()) { + M.getContext().emitError("IR2VecVocabAnalysis is not valid"); + return; + } + // Add the IR2Vec features to the feature map + auto IR2VecDim = IR2VecVocabResult->getDimension(); + FeatureMap.push_back( + TensorSpec::createSpec<float>("callee_embedding", {IR2VecDim})); + FeatureMap.push_back( + TensorSpec::createSpec<float>("caller_embedding", {IR2VecDim})); + UseIR2Vec = true; ---------------- svkeerthy wrote:
Okay. Done. https://github.com/llvm/llvm-project/pull/143479 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits