[PATCH] D149167: [TTI] Add getPHICost to better cost phi operands. NFCI

Luke Lau via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 25 10:21:26 PDT 2023


luke added inline comments.


================
Comment at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1256-1269
+  /// Ret, Br, Switch.
   InstructionCost
   getCFInstrCost(unsigned Opcode,
                  TTI::TargetCostKind CostKind = TTI::TCK_SizeAndLatency,
                  const Instruction *I = nullptr) const;
 
+  /// \return The expected cost of a phi node. \p Ty is the type of the phi node
----------------
I split out PHIs from `getCFInstrCost` here because it didn't seem to make any sense for return/branch/switch to have `Type` and `OperandValueInfo` arguments


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D149167/new/

https://reviews.llvm.org/D149167



More information about the llvm-commits mailing list