[PATCH] D70247: [JumpThreading] Thread jumps through two basic blocks
Wei Mi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 4 10:49:32 PST 2020
wmi accepted this revision.
wmi added a comment.
LGTM.
================
Comment at: llvm/lib/Transforms/Scalar/JumpThreading.cpp:2189-2193
+ if (BBCost > BBDupThreshold || PredBBCost > BBDupThreshold ||
+ BBCost + PredBBCost > BBDupThreshold) {
+ LLVM_DEBUG(dbgs() << " Not threading BB '" << BB->getName()
+ << "' - Cost is too high: " << (BBCost + PredBBCost)
+ << "\n");
----------------
You may want to dump the cost in a better way.
For example: if BBCost is (unsigned)~0 and PredBBCost is 1.
(unsigned)~0 + 1 = 0. Then the message "Cost is too high: 0" will be confusing.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70247/new/
https://reviews.llvm.org/D70247
More information about the llvm-commits
mailing list