[PATCH] D20262: [DSE]Split memset when the memset is small enough to be lowered to stores

Jun Bum Lim via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 2 09:07:34 PDT 2016


junbuml updated this revision to Diff 59390.
junbuml added a comment.

- Bail out if DL.getLargestLegalIntTypeSizeInBits() returns 0, based on the assumption that we don't have proper information about backend.
- For getMaxStoresPerMemset(), pass Function as a parameter to allow targets to check whatever desirable attribute. The current default behavior is adoppted from shouldLowerMemFuncForSize() that is used when lowering memset in backend.
- Split the test case into two : one that check output of DSE and one that check stores lowered in backend.
- Add extra comments as Quentin pointed.

Please take a look.

Thanks,
Jun


http://reviews.llvm.org/D20262

Files:
  include/llvm/Analysis/TargetTransformInfo.h
  include/llvm/Analysis/TargetTransformInfoImpl.h
  include/llvm/CodeGen/BasicTTIImpl.h
  include/llvm/Target/TargetLowering.h
  lib/Analysis/TargetTransformInfo.cpp
  lib/CodeGen/SelectionDAG/SelectionDAG.cpp
  lib/CodeGen/TargetLoweringBase.cpp
  lib/Transforms/Scalar/DeadStoreElimination.cpp
  test/CodeGen/AArch64/aarch64-small-memset-lowering.ll
  test/Transforms/DeadStoreElimination/SplitMemintrinsic.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D20262.59390.patch
Type: text/x-patch
Size: 21300 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160602/ef6f3197/attachment.bin>


More information about the llvm-commits mailing list