[all-commits] [llvm/llvm-project] aa983f: LAA cannot vectorize lib calls like modf/modff

Paschalis Mpeis via All-commits all-commits at lists.llvm.org
Thu May 9 09:49:48 PDT 2024


  Branch: refs/heads/users/paschalis-mpeis/laa-vectorize-modf
  Home:   https://github.com/llvm/llvm-project
  Commit: aa983fdc13f81b21e69298853a140cc3211c6d31
      https://github.com/llvm/llvm-project/commit/aa983fdc13f81b21e69298853a140cc3211c6d31
  Author: Paschalis Mpeis <Paschalis.Mpeis at arm.com>
  Date:   2024-05-09 (Thu, 09 May 2024)

  Changed paths:
    A clang/test/CodeGen/aarch64-veclib-function-calls-linear-ptrs.c
    M llvm/test/Transforms/LoopVectorize/AArch64/veclib-function-calls.ll

  Log Message:
  -----------
  LAA cannot vectorize lib calls like modf/modff

Functions like modf/modff are math lib calls that set memory write-only
attribute. Given that a target has vectorized mappings, LAA should allow
vectorization.


  Commit: 88d325cedaa16a307ebc909b301bb20684e22e67
      https://github.com/llvm/llvm-project/commit/88d325cedaa16a307ebc909b301bb20684e22e67
  Author: Paschalis Mpeis <Paschalis.Mpeis at arm.com>
  Date:   2024-05-09 (Thu, 09 May 2024)

  Changed paths:
    M clang/test/CodeGen/aarch64-veclib-function-calls-linear-ptrs.c
    M llvm/lib/Analysis/LoopAccessAnalysis.cpp
    M llvm/test/Transforms/LoopVectorize/AArch64/veclib-function-calls.ll

  Log Message:
  -----------
  [LV][LAA] Vectorize math lib calls with mem write-only attribute

Teach LAA to consider safe specific math lib calls which are known to
have set the memory write-only attribute. Those attributes are set to
calls by inferNonMandatoryLibFuncAttrs, in BuildLibCalls.cpp, and the
current ones are modf/modff and frexp/frexpf.

This happens only when the calls are found through TLI to have
vectorized counterparts.


  Commit: e18c2f10591e61f75403283712193fb5ed690b27
      https://github.com/llvm/llvm-project/commit/e18c2f10591e61f75403283712193fb5ed690b27
  Author: Paschalis Mpeis <Paschalis.Mpeis at arm.com>
  Date:   2024-05-09 (Thu, 09 May 2024)

  Changed paths:
    M llvm/lib/Analysis/LoopAccessAnalysis.cpp

  Log Message:
  -----------
  Add check for the 'memory(argmem: write)' attribute.


  Commit: 192d49dafcce6fecd5c8ff3c1a4045ecacd9a004
      https://github.com/llvm/llvm-project/commit/192d49dafcce6fecd5c8ff3c1a4045ecacd9a004
  Author: Paschalis Mpeis <Paschalis.Mpeis at arm.com>
  Date:   2024-05-09 (Thu, 09 May 2024)

  Changed paths:
    M clang/test/CodeGen/aarch64-veclib-function-calls-linear-ptrs.c
    M llvm/lib/Analysis/LoopAccessAnalysis.cpp

  Log Message:
  -----------
  Addressing reviewers


  Commit: 923e2700b5c3674122bcb91c7d16872c6faf1148
      https://github.com/llvm/llvm-project/commit/923e2700b5c3674122bcb91c7d16872c6faf1148
  Author: Paschalis Mpeis <Paschalis.Mpeis at arm.com>
  Date:   2024-05-09 (Thu, 09 May 2024)

  Changed paths:
    M clang/test/CodeGen/aarch64-veclib-function-calls-linear-ptrs.c

  Log Message:
  -----------
  Rebased and updated test after PR #80296


  Commit: 4e4c77299390d7e84c7b2fa048811c20c09a1706
      https://github.com/llvm/llvm-project/commit/4e4c77299390d7e84c7b2fa048811c20c09a1706
  Author: Paschalis Mpeis <Paschalis.Mpeis at arm.com>
  Date:   2024-05-09 (Thu, 09 May 2024)

  Changed paths:
    R clang/test/CodeGen/aarch64-veclib-function-calls-linear-ptrs.c
    M llvm/lib/Analysis/LoopAccessAnalysis.cpp
    A llvm/test/Analysis/LoopAccessAnalysis/attr-mem-write-only.ll
    A llvm/test/Transforms/LoopVectorize/AArch64/veclib-function-calls-linear-ptrs.ll

  Log Message:
  -----------
  Added LAA and LV tests

Removed C test.
Code rebased on top of patch that enables mappings for modf/modff
(among others).


  Commit: f684acdf111ec66ac01869d3844d1fb1dd22f9f6
      https://github.com/llvm/llvm-project/commit/f684acdf111ec66ac01869d3844d1fb1dd22f9f6
  Author: Paschalis Mpeis <Paschalis.Mpeis at arm.com>
  Date:   2024-05-09 (Thu, 09 May 2024)

  Changed paths:
    M llvm/lib/Analysis/LoopAccessAnalysis.cpp
    M llvm/test/Analysis/LoopAccessAnalysis/attr-mem-write-only.ll
    M llvm/test/Transforms/LoopVectorize/AArch64/veclib-function-calls-linear-ptrs.ll

  Log Message:
  -----------
  Addressing reviewers (2)


  Commit: 03fd4ea15f4ef94f9dba88a432428a690a4dd8a3
      https://github.com/llvm/llvm-project/commit/03fd4ea15f4ef94f9dba88a432428a690a4dd8a3
  Author: Paschalis Mpeis <Paschalis.Mpeis at arm.com>
  Date:   2024-05-09 (Thu, 09 May 2024)

  Changed paths:
    R llvm/test/Transforms/LoopVectorize/AArch64/veclib-function-calls-linear-ptrs.ll

  Log Message:
  -----------
  Addressing reviewers (3): tests now in veclib-function-calls.ll

Rebased history to introduce tests in 'veclib-function-calls.ll' and
delete the (now unnecessary) test veclib-function-calls-linear-ptrs.ll.

The commit history were modified as follows:
- The initial commit (that showcases what was missing) was amended to
  add the tests in veclib-function-calls.ll.
- Then, subsequent commits were similarly amended to include the updates
  that allow vectorization.
- This current commit simply dropped the no longer needed tests
  (veclib-function-calls-linear-ptrs.ll)


Compare: https://github.com/llvm/llvm-project/compare/c3aa63c98627...03fd4ea15f4e

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