[PATCH] D37121: [DivRemHoist] add a pass to move div/rem pairs into the same block (PR31028)

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 8 12:59:47 PDT 2017


spatel updated this revision to Diff 114420.
spatel added a comment.

Patch updated:

1. For a target that doesn't have div+rem, handle the case where the div and rem are in the same block by decomposing the rem.
2. Add tests for those cases (first 2 tests in the test file).
3. Update comments to better explain the same block scenario and remove low quality comment.


https://reviews.llvm.org/D37121

Files:
  include/llvm/Analysis/TargetTransformInfo.h
  include/llvm/Analysis/TargetTransformInfoImpl.h
  include/llvm/InitializePasses.h
  include/llvm/Transforms/Scalar.h
  include/llvm/Transforms/Scalar/DivRemPairs.h
  lib/Analysis/TargetTransformInfo.cpp
  lib/Passes/PassBuilder.cpp
  lib/Passes/PassRegistry.def
  lib/Target/X86/X86TargetTransformInfo.cpp
  lib/Target/X86/X86TargetTransformInfo.h
  lib/Transforms/IPO/PassManagerBuilder.cpp
  lib/Transforms/Scalar/CMakeLists.txt
  lib/Transforms/Scalar/DivRemPairs.cpp
  lib/Transforms/Scalar/Scalar.cpp
  test/Other/new-pm-defaults.ll
  test/Other/new-pm-thinlto-defaults.ll
  test/Transforms/DivRemPairs/div-rem-pairs.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D37121.114420.patch
Type: text/x-patch
Size: 29905 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170908/292ea93a/attachment.bin>


More information about the llvm-commits mailing list