[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 05:52:27 PST 2017


jonpa updated this revision to Diff 90684.
jonpa marked an inline comment as done.
jonpa added a comment.

@Renato:

> I think you could simplify that by implementing the "empty args" logic inside getOperandsScalarizationOverhead()

I tried this by added a third argument to getOperandsScalarizationOverhead(). LoopVectorizer calls this when it knows it has the arguments, so it doesn't need to pass it, so therefore it is default nullptr.

Is this looking better than before?

> I'm not sure it has to be always scalar. If you have masked vector instructions, the latch could be a vector comparison. Or maybe I didn't get what the problem is. Can you give an example?

Removed


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.90684.patch
Type: text/x-patch
Size: 384648 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170306/3c02b2c5/attachment-0001.bin>


More information about the llvm-commits mailing list