diff options
author | Paul Kirth <paulkirth@google.com> | 2024-06-10 23:06:06 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-11 08:06:06 +0200 |
commit | 607afa0b6375e4837fef298a798f5534e783d777 (patch) | |
tree | bc96cda2dc26b207d70030af09cba3f37d402aad /llvm/lib/Transforms/Utils/LoopPeel.cpp | |
parent | 41c650e8208f7804eb5ecd8749d6b31b6e518bb7 (diff) | |
download | llvm-607afa0b6375e4837fef298a798f5534e783d777.zip llvm-607afa0b6375e4837fef298a798f5534e783d777.tar.gz llvm-607afa0b6375e4837fef298a798f5534e783d777.tar.bz2 |
Revert "[llvm][IR] Extend BranchWeightMetadata to track provenance of weights" (#95060)
Reverts llvm/llvm-project#86609
This change causes compile-time regressions for stage2 builds
(https://llvm-compile-time-tracker.com/compare.php?from=3254f31a66263ea9647c9547f1531c3123444fcd&to=c5978f1eb5eeca8610b9dfce1fcbf1f473911cd8&stat=instructions:u).
It also introduced unintended changes to `.text` which should be
addressed before relanding.
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopPeel.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/LoopPeel.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Utils/LoopPeel.cpp b/llvm/lib/Transforms/Utils/LoopPeel.cpp index d517ec3..e251693 100644 --- a/llvm/lib/Transforms/Utils/LoopPeel.cpp +++ b/llvm/lib/Transforms/Utils/LoopPeel.cpp @@ -680,7 +680,7 @@ struct WeightInfo { /// To avoid dealing with division rounding we can just multiple both part /// of weights to E and use weight as (F - I * E, E). static void updateBranchWeights(Instruction *Term, WeightInfo &Info) { - setBranchWeights(*Term, Info.Weights, /*IsExpected=*/false); + setBranchWeights(*Term, Info.Weights); for (auto [Idx, SubWeight] : enumerate(Info.SubWeights)) if (SubWeight != 0) // Don't set the probability of taking the edge from latch to loop header @@ -1073,7 +1073,7 @@ bool llvm::peelLoop(Loop *L, unsigned PeelCount, LoopInfo *LI, } for (const auto &[Term, Info] : Weights) { - setBranchWeights(*Term, Info.Weights, /*IsExpected=*/false); + setBranchWeights(*Term, Info.Weights); } // Update Metadata for count of peeled off iterations. |