[PATCH] D69737: [PGO][PGSO] TargetInstrInfo part.

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 1 16:26:01 PDT 2019


arsenm added inline comments.


================
Comment at: llvm/include/llvm/CodeGen/TargetInstrInfo.h:136-138
+  virtual MachineInstr *commuteInstructionImpl(MachineInstr &MI,
+                                               ProfileSummaryInfo *PSI,
+                                               const MachineBlockFrequencyInfo *MBFI,
----------------
yamauchi wrote:
> arsenm wrote:
> > Why is this needed for commuting?
> There isn't anything particular about commuting, but wherever we make a size-vs-speed code gen choice (one in X86InstrInfo.cpp), and if we want to do it in a profile guided manner, we'd need to propagate profile (PSI/MBFI) down.
I don’t think it’s appropriate to pass this in to commuteInstruction. It should just perform the commute and not concern itself with profitability. It would be the caller’s responsibility to determine if commuting is a good idea 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D69737





More information about the llvm-commits mailing list