[PATCH] D29631: SystemZTargetTransformInfo cost functions and some common code changes

Jonas Paulsson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 23 06:59:58 PST 2017


jonpa added a comment.

Great!

The rest of the review shouldn't be to much to go through:

- getCmpSelInstrCost() has gotten a new default nullptr parameter for the Instruction. This is so that when the instruction is available, it can be passed. This is needed for SystemZ to estimate how many  instructions are needed in addition to the vector compare and vector select instructions (it depends on element widths). LoopVectorizer and CostModel passes the instruction, and elswhere it is just ignored. Target implementation has also gotten the (unused) argument in declaration and definition of the method.

- BasicTTIImpl has gotten a new method getScalarizationOverhead(), that contains factored-out code from getArithmeticInstrCost(), so that the SystemZ (and potentially others) implementation can use it.

- LoopVectorizer: Don't consider the compare in the loop latch (used by the conditional back-branch), to be vectorized. This doesn't make sense, it will always be scalar, right? Renato?


https://reviews.llvm.org/D29631





More information about the llvm-commits mailing list