Skip to content

Commit ef45c3e

Browse files
committed
Addressing review comments
1 parent 9f8591d commit ef45c3e

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

llvm/include/llvm/Analysis/FunctionPropertiesAnalysis.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,8 @@ class FunctionPropertiesUpdater {
208208

209209
DominatorTree &getUpdatedDominatorTree(FunctionAnalysisManager &FAM) const;
210210

211-
DenseSet<const BasicBlock *> Successors, CallUsers;
211+
DenseSet<const BasicBlock *> Successors;
212+
DenseSet<const BasicBlock *> CallUsers;
212213

213214
// Edges we might potentially need to remove from the dominator tree.
214215
SmallVector<DominatorTree::UpdateType, 2> DomTreeUpdates;

llvm/lib/Analysis/MLInlineAdvisor.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -453,10 +453,8 @@ std::unique_ptr<InlineAdvice> MLInlineAdvisor::getAdviceImpl(CallBase &CB) {
453453
// readVocabulary method in ir2vec::Embeddings.
454454
auto setEmbedding = [&](const ir2vec::Embedding &Embedding,
455455
FeatureIndex Index) {
456-
auto Embedding_float =
457-
std::vector<float>(Embedding.begin(), Embedding.end());
458-
std::memcpy(ModelRunner->getTensor<float>(Index), Embedding_float.data(),
459-
Embedding.size() * sizeof(float));
456+
llvm::transform(Embedding, ModelRunner->getTensor<float>(Index),
457+
[](double Val) { return static_cast<float>(Val); });
460458
};
461459

462460
setEmbedding(CalleeBefore.getFunctionEmbedding(),

0 commit comments

Comments
 (0)