We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1213d4e commit cdf5f47Copy full SHA for cdf5f47
llvm/lib/Analysis/IR2Vec.cpp
@@ -601,17 +601,7 @@ PreservedAnalyses IR2VecPrinterPass::run(Module &M,
601
assert(Vocabulary.isValid() && "IR2Vec Vocabulary is invalid");
602
603
for (Function &F : M) {
604
- std::unique_ptr<Embedder> Emb;
605
- switch (IR2VecEmbeddingKind) {
606
- case IR2VecKind::Symbolic:
607
- Emb = std::make_unique<SymbolicEmbedder>(F, Vocabulary);
608
- break;
609
- case IR2VecKind::FlowAware:
610
- Emb = std::make_unique<FlowAwareEmbedder>(F, Vocabulary);
611
612
- default:
613
- llvm_unreachable("Unknown IR2Vec embedding kind");
614
- }
+ auto Emb = Embedder::create(IR2VecEmbeddingKind, F, Vocabulary);
615
if (!Emb) {
616
OS << "Error creating IR2Vec embeddings \n";
617
continue;
0 commit comments