[PATCH] D78201: [Target][ARM] Replace outdated getARMVPTBlockMask function

Pierre van Houtryve via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 15 06:32:37 PDT 2020


Pierre-vh created this revision.
Pierre-vh added reviewers: dmgreen, SjoerdMeijer, samparker.
Herald added subscribers: llvm-commits, danielkiss, hiraditya, kristof.beyls.
Herald added a project: LLVM.
Pierre-vh added a parent revision: D77202: [Target][ARM] Fold or(A, B) more aggressively for I1 Vectors.
Pierre-vh edited the summary of this revision.

`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 also had to change the ARMLowOverheadLoops and MVEVPTBlocks passes as well so they could use these new functions.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D78201

Files:
  llvm/lib/Target/ARM/ARMBaseInstrInfo.h
  llvm/lib/Target/ARM/ARMLowOverheadLoops.cpp
  llvm/lib/Target/ARM/MVEVPTBlockPass.cpp
  llvm/lib/Target/ARM/Thumb2InstrInfo.cpp
  llvm/lib/Target/ARM/Thumb2InstrInfo.h
  llvm/lib/Target/ARM/Utils/ARMBaseInfo.cpp
  llvm/lib/Target/ARM/Utils/ARMBaseInfo.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78201.257698.patch
Type: text/x-patch
Size: 11271 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200415/f84bbda3/attachment.bin>


More information about the llvm-commits mailing list