[PATCH] D86347: [SimplifyCFG] Two entry phi select costs

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 21 06:50:08 PDT 2020


lebedev.ri 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)"));
----------------
samparker wrote:
> lebedev.ri wrote:
> > You need to bump it by that new cmp+sel cost, so `+2`.
> Where is the cmp coming from?
Looking at `getCmpSelInstrCost()`, right, only the `select`, so `+1`.


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