[PATCH] D86347: [SimplifyCFG] Two entry phi select costs
Sam Parker via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 21 06:48:01 PDT 2020
samparker added inline comments.
================
Comment at: llvm/lib/Transforms/Utils/SimplifyCFG.cpp:98-102
static cl::opt<unsigned> TwoEntryPHINodeFoldingThreshold(
"two-entry-phi-node-folding-threshold", cl::Hidden, cl::init(4),
cl::desc("Control the maximal total instruction cost that we are willing "
"to speculatively execute to fold a 2-entry PHI node into a "
"select (default = 4)"));
----------------
lebedev.ri wrote:
> You need to bump it by that new cmp+sel cost, so `+2`.
Where is the cmp coming from?
================
Comment at: llvm/lib/Transforms/Utils/SimplifyCFG.cpp:2011
+ if (OrigV != ThenV)
+ BudgetRemaining -=
+ TTI.getCmpSelInstrCost(Instruction::Select, PN.getType(), nullptr,
----------------
lebedev.ri wrote:
> I'm not sure this does what you think it does..
Do you think this is wrong? What do you think it should be doing?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D86347/new/
https://reviews.llvm.org/D86347
More information about the llvm-commits
mailing list