[PATCH] D89665: [LSR] ignore profitable chain optimization when instruction number is the major cost

Jonas Paulsson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 26 06:35:41 PDT 2020


jonpa added inline comments.


================
Comment at: llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:2870
+  // If register number is the major cost, we cannot benefit from this
+  // profitable chain which is based on register number.
+  // FIXME: add profitable chain optimization for other kinds major cost, for
----------------
This seems unclear to me - should it be "If register number is *not* the...",  or perhaps "*Only* if register..." ?

It would also be a bit more readable to me if the new hook was called "isNumRegsMajorCostOfLSR", since NumRegs is the name for that counter. (And the comment "number of registers").. but maybe that's just me...




Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D89665



More information about the llvm-commits mailing list