[all-commits] [llvm/llvm-project] 3978f3: [InferAlignment] Create tests for InferAlignment pass

Dhruv Chawla via All-commits all-commits at lists.llvm.org
Tue Sep 19 23:42:43 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3978f37c0f1e368849ff594d9d603ec600010f7e
      https://github.com/llvm/llvm-project/commit/3978f37c0f1e368849ff594d9d603ec600010f7e
  Author: Dhruv Chawla <44582521+dc03 at users.noreply.github.com>
  Date:   2023-09-20 (Wed, 20 Sep 2023)

  Changed paths:
    A llvm/test/Transforms/InferAlignment/alloca.ll
    A llvm/test/Transforms/InferAlignment/atomic.ll
    A llvm/test/Transforms/InferAlignment/attributes.ll
    A llvm/test/Transforms/InferAlignment/gep-2d.ll
    A llvm/test/Transforms/InferAlignment/gep-array.ll
    A llvm/test/Transforms/InferAlignment/irregular-size.ll
    A llvm/test/Transforms/InferAlignment/propagate-assume.ll
    A llvm/test/Transforms/InferAlignment/ptrmask.ll
    A llvm/test/Transforms/InferAlignment/undef-and-null.ll
    A llvm/test/Transforms/InferAlignment/vector.ll
    A llvm/test/Transforms/InferAlignment/volatile.ll
    A llvm/test/Transforms/InferAlignment/vscale.ll

  Log Message:
  -----------
  [InferAlignment] Create tests for InferAlignment pass

These tests are in preparation for the InferAlignment pass. They consist
mainly of tests that break when alignment inference is disabled in
LoadInst and StoreInst within InstCombine.

Differential Revision: https://reviews.llvm.org/D158530


  Commit: 0f152a55d3e4e71f7c795bf555e40c8895b97077
      https://github.com/llvm/llvm-project/commit/0f152a55d3e4e71f7c795bf555e40c8895b97077
  Author: Dhruv Chawla <44582521+dc03 at users.noreply.github.com>
  Date:   2023-09-20 (Wed, 20 Sep 2023)

  Changed paths:
    A llvm/include/llvm/Transforms/Scalar/InferAlignment.h
    M llvm/include/llvm/Transforms/Utils/Local.h
    M llvm/lib/Passes/PassBuilder.cpp
    M llvm/lib/Passes/PassBuilderPipelines.cpp
    M llvm/lib/Passes/PassRegistry.def
    M llvm/lib/Transforms/Scalar/CMakeLists.txt
    A llvm/lib/Transforms/Scalar/InferAlignment.cpp
    M llvm/lib/Transforms/Utils/Local.cpp
    M llvm/test/Transforms/InferAlignment/alloca.ll
    M llvm/test/Transforms/InferAlignment/atomic.ll
    M llvm/test/Transforms/InferAlignment/attributes.ll
    M llvm/test/Transforms/InferAlignment/gep-2d.ll
    M llvm/test/Transforms/InferAlignment/gep-array.ll
    M llvm/test/Transforms/InferAlignment/irregular-size.ll
    M llvm/test/Transforms/InferAlignment/propagate-assume.ll
    M llvm/test/Transforms/InferAlignment/ptrmask.ll
    M llvm/test/Transforms/InferAlignment/undef-and-null.ll
    M llvm/test/Transforms/InferAlignment/vector.ll
    M llvm/test/Transforms/InferAlignment/volatile.ll
    M llvm/test/Transforms/InferAlignment/vscale.ll

  Log Message:
  -----------
  [InferAlignment] Implement InferAlignmentPass

This pass aims to infer alignment for instructions as a separate pass,
to reduce redundant work done by InstCombine running multiple times. It
runs late in the pipeline, just before the back-end passes where this
information is most useful.

Differential Revision: https://reviews.llvm.org/D158529


  Commit: 0104f37f1626057a856b57f8acdd2b7407a8b01f
      https://github.com/llvm/llvm-project/commit/0104f37f1626057a856b57f8acdd2b7407a8b01f
  Author: Dhruv Chawla <44582521+dc03 at users.noreply.github.com>
  Date:   2023-09-20 (Wed, 20 Sep 2023)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp

  Log Message:
  -----------
  [InstCombine] Use a cl::opt to control calls to getOrEnforceKnownAlignment in LoadInst and StoreInst

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.

Differential Revision: https://reviews.llvm.org/D158527


  Commit: 3e992d81afc3925a8685eb15f794dd4a6ba3e97e
      https://github.com/llvm/llvm-project/commit/3e992d81afc3925a8685eb15f794dd4a6ba3e97e
  Author: Dhruv Chawla <44582521+dc03 at users.noreply.github.com>
  Date:   2023-09-20 (Wed, 20 Sep 2023)

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

  Log Message:
  -----------
  [InferAlignment] Enable InferAlignment pass by default

This gives an improvement of 0.6%:
https://llvm-compile-time-tracker.com/compare.php?from=7d35fe6d08e2b9b786e1c8454cd2391463832167&to=0456c8e8a42be06b62ad4c3e3cf34b21f2633d1e&stat=instructions:u

Differential Revision: https://reviews.llvm.org/D158600


Compare: https://github.com/llvm/llvm-project/compare/cb97761e85dd...3e992d81afc3


More information about the All-commits mailing list