[all-commits] [llvm/llvm-project] c05e29: [LegacyPM][DirectX] Add legacy scalarizer back for...

Farzon Lotfi via All-commits all-commits at lists.llvm.org
Thu Sep 12 12:54:11 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c05e29bff036060f0811b887a92715104abdceb5
      https://github.com/llvm/llvm-project/commit/c05e29bff036060f0811b887a92715104abdceb5
  Author: Farzon Lotfi <1802579+farzonl at users.noreply.github.com>
  Date:   2024-09-12 (Thu, 12 Sep 2024)

  Changed paths:
    M llvm/include/llvm/InitializePasses.h
    M llvm/include/llvm/LinkAllPasses.h
    M llvm/include/llvm/Transforms/Scalar/Scalarizer.h
    M llvm/lib/Target/DirectX/DirectXTargetMachine.cpp
    M llvm/lib/Transforms/Scalar/Scalar.cpp
    M llvm/lib/Transforms/Scalar/Scalarizer.cpp
    M llvm/test/CodeGen/DirectX/acos.ll
    M llvm/test/CodeGen/DirectX/asin.ll
    M llvm/test/CodeGen/DirectX/atan.ll
    M llvm/test/CodeGen/DirectX/ceil.ll
    M llvm/test/CodeGen/DirectX/cos.ll
    M llvm/test/CodeGen/DirectX/cosh.ll
    M llvm/test/CodeGen/DirectX/exp2.ll
    M llvm/test/CodeGen/DirectX/fabs.ll
    M llvm/test/CodeGen/DirectX/floor.ll
    M llvm/test/CodeGen/DirectX/isinf.ll
    A llvm/test/CodeGen/DirectX/llc-pipeline.ll
    M llvm/test/CodeGen/DirectX/reversebits.ll
    M llvm/test/CodeGen/DirectX/round.ll
    M llvm/test/CodeGen/DirectX/saturate.ll
    A llvm/test/CodeGen/DirectX/scalar-store.ll
    A llvm/test/CodeGen/DirectX/scalarize-two-calls.ll
    M llvm/test/CodeGen/DirectX/sin.ll
    M llvm/test/CodeGen/DirectX/sinh.ll
    M llvm/test/CodeGen/DirectX/sqrt.ll
    M llvm/test/CodeGen/DirectX/tan.ll
    M llvm/test/CodeGen/DirectX/tanh.ll
    M llvm/test/CodeGen/DirectX/trunc.ll
    M llvm/tools/opt/optdriver.cpp

  Log Message:
  -----------
  [LegacyPM][DirectX] Add legacy scalarizer back for use in the DirectX backend (#107427)

As discussed in this
[proposal](https://github.com/llvm/wg-hlsl/pull/62/files?short_path=ac6e592#diff-ac6e59276afe8016e307eedc5c835f534c0cb353707760b44df0fa9d905a5cf8).
We had to bring back the legacy pass manager interface for the
scalarizer pass. Two reasons for this:
1. The DirectX backend is still using the legacy pass manager
2. The new PM isn't hooked up in clang yet via `BackendUtil.cpp`'s
`AddEmitPasses` That means even if we add a `buildCodeGenPipeline` we
won't be able to benefit from the new pass manager's scalarizer pass
interface.

The remaining changes are hooking up the scalarizer pass to the DirectX
backend, updating the DirectX test cases,
and allowing the `optdriver` to not block the legacy invocation of the
scalarizer pass.

Future work still needs to be done to allow the scalarizer pass to
handle target specific intrinsics.

closes #105178



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list