]> granicus.if.org Git - llvm/commit
[ARM] MVE VPT Block Pass
authorSjoerd Meijer <sjoerd.meijer@arm.com>
Fri, 14 Jun 2019 11:46:05 +0000 (11:46 +0000)
committerSjoerd Meijer <sjoerd.meijer@arm.com>
Fri, 14 Jun 2019 11:46:05 +0000 (11:46 +0000)
commit99d381459a8d74180e4faf99514bc49a3986f17f
treeeda7fc57b8e3b7ab9652245a60863231e8d54258
parentabc1500538a9ddeef9ec664630b8509f48910637
[ARM] MVE VPT Block Pass

Initial commit of a new pass to create vector predication blocks, called VPT
blocks, that are supported by the Armv8.1-M MVE architecture.

This is a first naive implementation. I.e., for 2 consecutive predicated
instructions I1 and I2, for example, it will generate 2 VPT blocks:

VPST
I1
VPST
I2

A more optimal implementation would obviously put instructions in the same VPT
block when they are predicated on the same condition and when it is allowed to
do this:

VPTT
I1
I2

We will address this optimisation with follow up patches when the groundwork is
in. Creating VPT Blocks is very similar to IT Blocks, which is the reason I
added this to Thumb2ITBlocks.cpp. This allows reuse of the def use analysis
that we need for the more optimal implementation.

VPT blocks cannot be nested in IT blocks, and vice versa, and so these 2 passes
cannot interact with each other. Instructions allowed in VPT blocks must
be MVE instructions that are marked as VPT compatible.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363370 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/ARM.h
lib/Target/ARM/ARMTargetMachine.cpp
lib/Target/ARM/Thumb2ITBlockPass.cpp
lib/Target/ARM/Thumb2InstrInfo.cpp
lib/Target/ARM/Thumb2InstrInfo.h
test/CodeGen/ARM/O3-pipeline.ll
test/CodeGen/ARM/mve-vpt-block.mir [new file with mode: 0644]