[all-commits] [llvm/llvm-project] bf2183: [Target][ARM] Replace re-uses of old VPR values wi...

Pierre van Houtryve via All-commits all-commits at lists.llvm.org
Tue May 12 04:38:01 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: bf2183374a6740a033db1f824b0c6a6e0d2e7ee4
      https://github.com/llvm/llvm-project/commit/bf2183374a6740a033db1f824b0c6a6e0d2e7ee4
  Author: Pierre-vh <pierre.vanhoutryve at arm.com>
  Date:   2020-05-12 (Tue, 12 May 2020)

  Changed paths:
    M llvm/lib/Target/ARM/MVEVPTOptimisationsPass.cpp
    M llvm/test/CodeGen/Thumb2/mve-pred-not.ll
    M llvm/test/CodeGen/Thumb2/mve-vpt-blocks.ll
    M llvm/test/CodeGen/Thumb2/mve-vpt-optimisations.mir

  Log Message:
  -----------
  [Target][ARM] Replace re-uses of old VPR values with VPNOTs

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


  Commit: 24bf8063d677f261f26d8771180cc08d51007a2e
      https://github.com/llvm/llvm-project/commit/24bf8063d677f261f26d8771180cc08d51007a2e
  Author: Pierre-vh <pierre.vanhoutryve at arm.com>
  Date:   2020-05-12 (Tue, 12 May 2020)

  Changed paths:
    M llvm/lib/Target/ARM/ARMBaseInstrInfo.h
    M llvm/lib/Target/ARM/ARMLowOverheadLoops.cpp
    M llvm/lib/Target/ARM/MVEVPTBlockPass.cpp
    M llvm/lib/Target/ARM/Thumb2InstrInfo.cpp
    M llvm/lib/Target/ARM/Thumb2InstrInfo.h
    M llvm/lib/Target/ARM/Utils/ARMBaseInfo.cpp
    M llvm/lib/Target/ARM/Utils/ARMBaseInfo.h

  Log Message:
  -----------
  [Target][ARM] Replace outdated getARMVPTBlockMask function

getARMVPTBlockMask was an outdated function that only handled basic
block masks: T, TT, TTT and TTTT. This worked fine before the MVE
VPT Block Insertion Pass improvements as it was the only kind of
masks that it could generate, but now it can generate more complex
masks that uses E predicates, so it's dangerous to use that function
to calculate VPT/VPST block masks.

I replaced it with 2 different functions:
  - expandPredBlockMask, in ARMBaseInfo. This adds an "E" or "T" at
    the end of an existing PredBlockMask.
  - recomputeVPTBlockMask, in Thumb2InstrInfo. This takes an iterator
    to a VPT/VPST instruction and recomputes its block mask by looking
    at the predicated instructions that follows it. This should be
    used to recompute a block mask after removing/adding a predicated
    instruction to the block.

The expandPredBlockMask function is pretty much imported from the MVE
VPT Blocks pass.

I had to change the ARMLowOverheadLoops and MVEVPTBlocks passes as well
so they could use these new functions.

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


Compare: https://github.com/llvm/llvm-project/compare/9e32bf550d13...24bf8063d677


More information about the All-commits mailing list