[PATCH] D67841: [SLP] avoid reduction transform on patterns that the backend can load-combine

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 27 08:28:51 PDT 2019


spatel marked an inline comment as done.
spatel added inline comments.


================
Comment at: llvm/lib/Analysis/TargetTransformInfo.cpp:633
+  // Check if we can match this instruction as part of a larger pattern.
+  Optional<int> LoadCombineCost = getLoadCombineCost(Opcode, Ty, Args);
+  if (LoadCombineCost)
----------------
ABataev wrote:
> Ooops, sorry, my fault, pointed to the wrong function. Better to modify a function in `include/llvm/CodeGen/BasicTTIImpl.h`, `BasicTTIImplBase::getArithmeticInstrCost`, if this is common limitation.
AFAICT, if we change the concept/model base classes, that will only be called after any target-specific override, so we would need to change all of the override implementations to access the new code. Adding code to the concrete class allows us to add the target-independent customization for a load-combine before the target does its usual logic.

Can you point to an example of what you'd like to see and/or show it exactly?


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

https://reviews.llvm.org/D67841





More information about the llvm-commits mailing list