Page MenuHomePhabricator

D57726.id185194.diff
No OneTemporary

File Metadata

Created
Fri, Aug 23, 7:27 PM

D57726.id185194.diff

Index: llvm/trunk/lib/Transforms/IPO/SampleProfile.cpp
===================================================================
--- llvm/trunk/lib/Transforms/IPO/SampleProfile.cpp
+++ llvm/trunk/lib/Transforms/IPO/SampleProfile.cpp
@@ -1327,9 +1327,8 @@
SortedCallTargets, Sum, IPVK_IndirectCallTarget,
SortedCallTargets.size());
} else if (!dyn_cast<IntrinsicInst>(&I)) {
- SmallVector<uint32_t, 1> Weights;
- Weights.push_back(BlockWeights[BB]);
- I.setMetadata(LLVMContext::MD_prof, MDB.createBranchWeights(Weights));
+ I.setMetadata(LLVMContext::MD_prof,
+ MDB.createBranchWeights({BlockWeights[BB]}));
}
}
}

Event Timeline