[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:52:15 PDT 2020


lebedev.ri added inline comments.


================
Comment at: llvm/lib/Transforms/Utils/SimplifyCFG.cpp:2011
+    if (OrigV != ThenV)
+      BudgetRemaining -=
+          TTI.getCmpSelInstrCost(Instruction::Select, PN.getType(), nullptr,
----------------
samparker wrote:
> 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?
Well, the function takes `BudgetRemaining` by value,
so this doesn't actually change the `BudgetRemaining` in the caller function.


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