[PATCH] D86346: [SimplifyCFG] Accumulate cost against budget
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 21 06:23:21 PDT 2020
lebedev.ri added inline comments.
================
Comment at: llvm/lib/Transforms/Utils/SimplifyCFG.cpp:2051
int BudgetRemaining =
PHINodeFoldingThreshold * TargetTransformInfo::TCC_Basic;
for (PHINode &PN : EndBB->phis()) {
----------------
Please add a new `cl::opt` for that.
I believe, the threshold should be the branch misprediction cost,
i.e. if it takes less cost (latency) to execute the branch
then to wrongly predict that it won't be executed,
but then rewind and execute it anyways, we should just execute it.
So i'd go with `20`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D86346/new/
https://reviews.llvm.org/D86346
More information about the llvm-commits
mailing list