Skip to content

Commit 37ce859

Browse files
committed
Update fixmes
Extending beyond the limitations of `getExpectedExitLoopLatchBranch` is a possible improvement for the future not an urgent fixme. No one has pointed out code that computes estimated trip counts without using `llvm::getLoopEstimatedTripCount`.
1 parent 67fa67d commit 37ce859

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

llvm/lib/Transforms/Utils/LoopPeel.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1219,7 +1219,7 @@ bool llvm::peelLoop(Loop *L, unsigned PeelCount, bool PeelLast, LoopInfo *LI,
12191219
// while examining it in isolation without considering the probability of
12201220
// actually reaching it, we store the new trip count as separate metadata.
12211221
//
1222-
// FIXME: getLoopEstimatedTripCount and setLoopEstimatedTripCount skip loops
1222+
// TODO: getLoopEstimatedTripCount and setLoopEstimatedTripCount skip loops
12231223
// that don't match the restrictions of getExpectedExitLoopLatchBranch in
12241224
// LoopUtils.cpp. For example,
12251225
// llvm/tests/Transforms/LoopUnroll/peel-branch-weights.ll (introduced by

llvm/lib/Transforms/Utils/LoopUtils.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -866,10 +866,6 @@ llvm::getLoopEstimatedTripCount(Loop *L,
866866
getEstimatedTripCount(LatchBranch, L, ExitWeight)) {
867867
if (EstimatedLoopInvocationWeight)
868868
*EstimatedLoopInvocationWeight = ExitWeight;
869-
// FIXME: Where else are branch weights directly used for estimating loop
870-
// trip counts? They should also be updated to use
871-
// LLVMLoopEstimatedTripCount when present... or to just call this
872-
// function.
873869
if (auto EstimatedTripCount =
874870
getOptionalIntLoopAttribute(L, LLVMLoopEstimatedTripCount))
875871
return EstimatedTripCount;

0 commit comments

Comments
 (0)