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

Jonas Paulsson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 6 04:37:53 PST 2017


jonpa updated this revision to Diff 90678.
jonpa added a comment.

Removed experimental heuristic that checked the context of compare instruction in LoopVectorize.cpp.

Just as with getCmpSelInstrCost() and for the same reasons, I added a a new Instruction* argument to getCastInstrCost(). Instruction pointers now passed from everywhere possible, I hope. Moved the assert of the right opcode for passed instruction up in class hiearchy into TargetTransformInfo.cpp.

SystemZTargetTransformInfo.cpp:

- Handling of i1 extensions (temporary tables removed)
- factored out a new function getVectorBitMaskConversionCost() from getCmpSelInstrCost(), and reused it for the i1 vector zext/sext instructions.
- Scalar XOr cost fixed.
- Allow a noop-truncation query.
- The cost for a compare has been adjusted to reflect the improvement in the dependent vselect patch: There will no longer always be a vector compare for each vector select.
- Removed experimental heuristic that checked the context of compare instruction.
- New tests cmp-ext.ll and scalar-cmp-cmp-log-sel.ll


https://reviews.llvm.org/D29631

Files:
  include/llvm/Analysis/TargetTransformInfo.h
  include/llvm/Analysis/TargetTransformInfoImpl.h
  include/llvm/CodeGen/BasicTTIImpl.h
  lib/Analysis/CostModel.cpp
  lib/Analysis/TargetTransformInfo.cpp
  lib/Target/AArch64/AArch64TargetTransformInfo.cpp
  lib/Target/AArch64/AArch64TargetTransformInfo.h
  lib/Target/ARM/ARMTargetTransformInfo.cpp
  lib/Target/ARM/ARMTargetTransformInfo.h
  lib/Target/PowerPC/PPCTargetTransformInfo.cpp
  lib/Target/PowerPC/PPCTargetTransformInfo.h
  lib/Target/SystemZ/SystemZISelLowering.cpp
  lib/Target/SystemZ/SystemZTargetTransformInfo.cpp
  lib/Target/SystemZ/SystemZTargetTransformInfo.h
  lib/Target/X86/X86TargetTransformInfo.cpp
  lib/Target/X86/X86TargetTransformInfo.h
  lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
  lib/Transforms/Vectorize/BBVectorize.cpp
  lib/Transforms/Vectorize/LoopVectorize.cpp
  lib/Transforms/Vectorize/SLPVectorizer.cpp
  test/Analysis/CostModel/SystemZ/cmp-ext.ll
  test/Analysis/CostModel/SystemZ/cmpsel.ll
  test/Analysis/CostModel/SystemZ/fp-arith.ll
  test/Analysis/CostModel/SystemZ/fp-cast.ll
  test/Analysis/CostModel/SystemZ/int-arith.ll
  test/Analysis/CostModel/SystemZ/int-cast.ll
  test/Analysis/CostModel/SystemZ/load_store.ll
  test/Analysis/CostModel/SystemZ/logical.ll
  test/Analysis/CostModel/SystemZ/scalar-cmp-cmp-log-sel.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D29631.90678.patch
Type: text/x-patch
Size: 381982 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170306/065609e5/attachment-0001.bin>


More information about the llvm-commits mailing list