[PATCH] D29631: SystemZTargetTransformInfo cost functions and some common code changes
Jonas Paulsson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 11 23:17:41 PDT 2017
jonpa added a comment.
ping!
The common code parts needs review -- the SystemZ parts are done and proven on benchmarks.
The instruction pointer has been added as a default nullptr argument to: getCastInstrCost(), getCmpSelInstrCost(), getMemoryOpCost(), and the instruction pointer is passed whenever possible by the caller.
@Hal: If I understood you correctly, you are ok with this?
BasicTTIImpl.h:
- getCastInstrCost() improved to check for legal extending loads, in which case the cost of the z/sext instruction becomes 0. Tested with: test/Analysis/CostModel/SystemZ/ext-load.ll This is good for SystemZ, and hopefully for any target?
- new overloaded method getScalarizationOverhead() contains factored-out code from getArithmeticInstrCost(), so that the SystemZ (and potentially others) implementation can use it.
@Renato: I tried your suggestion, but then went back because it became messy. Are you ok with this at least for now?
- in getOperandsScalarizationOverhead(): the assert has been changed so that the passed VF can either be 1 or match the VecTy number of elements. This is needed so that things work from different call contexts.
https://reviews.llvm.org/D29631
More information about the llvm-commits
mailing list