[PATCH] D158527: [InstCombine] Remove calls to getOrEnforceKnownAlignment in LoadInst and StoreInst

Dhruv Chawla via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 22 10:27:19 PDT 2023


0xdc03 created this revision.
0xdc03 added a reviewer: nikic.
Herald added subscribers: StephenFan, kerbowa, zzheng, hiraditya, jvesely, nemanjai.
Herald added a project: All.
0xdc03 requested review of this revision.
Herald added subscribers: llvm-commits, wangpc.
Herald added a project: LLVM.

This is in preparation for the InferAlignment pass which handles
inferring alignment for instructions separately. It is better to handle
this as a separate pass as inferring alignment is quite costly, and
InstCombine running multiple times in the pass pipeline makes it even
more so.

This gives a 0.8% speedup:
https://llvm-compile-time-tracker.com/compare.php?from=fdaf2f9c96fa1d1ea46cdf09ec372056b32cf2e0&to=5f0ea97082759fb24e5e338a6a918481d5f0075f&stat=instructions:u


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D158527

Files:
  llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
  llvm/test/Analysis/BasicAA/featuretest.ll
  llvm/test/Analysis/ValueTracking/assume.ll
  llvm/test/CodeGen/AMDGPU/implicit-arg-v5-opt.ll
  llvm/test/CodeGen/AMDGPU/reqd-work-group-size.ll
  llvm/test/Transforms/InstCombine/2009-01-08-AlignAlloca.ll
  llvm/test/Transforms/InstCombine/2009-02-20-InstCombine-SROA.ll
  llvm/test/Transforms/InstCombine/addrspacecast.ll
  llvm/test/Transforms/InstCombine/align-2d-gep.ll
  llvm/test/Transforms/InstCombine/align-addr.ll
  llvm/test/Transforms/InstCombine/align-attr.ll
  llvm/test/Transforms/InstCombine/alloca-cast-debuginfo.ll
  llvm/test/Transforms/InstCombine/alloca.ll
  llvm/test/Transforms/InstCombine/apint-shift.ll
  llvm/test/Transforms/InstCombine/assume-align.ll
  llvm/test/Transforms/InstCombine/assume-loop-align.ll
  llvm/test/Transforms/InstCombine/assume.ll
  llvm/test/Transforms/InstCombine/assume_inevitable.ll
  llvm/test/Transforms/InstCombine/atomic.ll
  llvm/test/Transforms/InstCombine/constant-fold-address-space-pointer.ll
  llvm/test/Transforms/InstCombine/constant-fold-gep.ll
  llvm/test/Transforms/InstCombine/dbg-scalable-store-fixed-frag.ll
  llvm/test/Transforms/InstCombine/fcmp-denormals-are-zero.ll
  llvm/test/Transforms/InstCombine/fp-ret-bitcast.ll
  llvm/test/Transforms/InstCombine/gep-custom-dl.ll
  llvm/test/Transforms/InstCombine/getelementptr.ll
  llvm/test/Transforms/InstCombine/load-cmp.ll
  llvm/test/Transforms/InstCombine/load-combine-metadata-dominance.ll
  llvm/test/Transforms/InstCombine/load.ll
  llvm/test/Transforms/InstCombine/loadstore-alignment.ll
  llvm/test/Transforms/InstCombine/memcpy-from-global.ll
  llvm/test/Transforms/InstCombine/merging-multiple-stores-into-successor.ll
  llvm/test/Transforms/InstCombine/phi.ll
  llvm/test/Transforms/InstCombine/pr33689_same_bitwidth.ll
  llvm/test/Transforms/InstCombine/pr44552.ll
  llvm/test/Transforms/InstCombine/pr59613.ll
  llvm/test/Transforms/InstCombine/scalable-cast-of-alloc.ll
  llvm/test/Transforms/InstCombine/select.ll
  llvm/test/Transforms/InstCombine/store.ll
  llvm/test/Transforms/InstCombine/trivial-dse-calls.ll
  llvm/test/Transforms/InstCombine/vscale_gep.ll
  llvm/test/Transforms/LoopUnroll/PowerPC/p10-respect-unroll-pragma.ll
  llvm/test/Transforms/LoopVectorize/X86/pr42674.ll
  llvm/test/Transforms/LoopVectorize/X86/small-size.ll
  llvm/test/Transforms/LoopVectorize/multiple-address-spaces.ll
  llvm/test/Transforms/LoopVectorize/non-const-n.ll
  llvm/test/Transforms/PhaseOrdering/X86/excessive-unrolling.ll
  llvm/test/Transforms/PhaseOrdering/inlining-alignment-assumptions.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D158527.552423.patch
Type: text/x-patch
Size: 136949 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230822/0a31560a/attachment-0001.bin>


More information about the llvm-commits mailing list