Details
Details
- Reviewers
dblaikie
Diff Detail
Diff Detail
Event Timeline
Comment Actions
Generally looks good. A couple of optional comments (feel free to commit with or without those changes, without further review)
| lib/Analysis/InlineCost.cpp | ||
|---|---|---|
| 1580 | Use "= default" perhaps? (no big reason, if you particularly prefer "{}", that's OK) | |
| 1585–1595 | This function does an extra map lookup (2, could use 1 - assuming that the code to build the BFI doesn't cause other BFIs to be constructed (invalidating access to the entry in the map)) & I'd consider rewriting it as something like: auto &BFI = BFM[F]
if (!BFI) {
DominatorTree DT;
DT.recalculate(*F);
LoopInfo LI(DT);
BranchProbabilityInfo BPI(*F, LI);
BFI = llvm::make_unique<BlockFrequencyInfo>(*F, BPI, LI);
}
return BFI.get(); | |
Use "= default" perhaps? (no big reason, if you particularly prefer "{}", that's OK)