[all-commits] [llvm/llvm-project] 08d1c2: [ARM] Introduce t2DoLoopStartTP

David Green via All-commits all-commits at lists.llvm.org
Tue Nov 10 10:08:40 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 08d1c2d4701f5e66d5e328818905a62d6f4ba27e
      https://github.com/llvm/llvm-project/commit/08d1c2d4701f5e66d5e328818905a62d6f4ba27e
  Author: David Green <david.green at arm.com>
  Date:   2020-11-10 (Tue, 10 Nov 2020)

  Changed paths:
    M llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
    M llvm/lib/Target/ARM/ARMBaseInstrInfo.h
    M llvm/lib/Target/ARM/ARMInstrThumb2.td
    M llvm/lib/Target/ARM/ARMLowOverheadLoops.cpp
    M llvm/lib/Target/ARM/MVEVPTOptimisationsPass.cpp
    M llvm/test/CodeGen/ARM/O3-pipeline.ll
    M llvm/test/CodeGen/Thumb2/LowOverheadLoops/exitcount.ll
    M llvm/test/CodeGen/Thumb2/LowOverheadLoops/mov-operand.ll
    M llvm/test/CodeGen/Thumb2/LowOverheadLoops/mve-tail-data-types.ll
    M llvm/test/CodeGen/Thumb2/LowOverheadLoops/reductions.ll
    M llvm/test/CodeGen/Thumb2/mve-fma-loops.ll
    M llvm/test/CodeGen/Thumb2/mve-gather-scatter-tailpred.ll
    M llvm/test/CodeGen/Thumb2/mve-postinc-dct.ll
    M llvm/test/CodeGen/Thumb2/mve-postinc-lsr.ll

  Log Message:
  -----------
  [ARM] Introduce t2DoLoopStartTP

This introduces a new pseudo instruction, almost identical to a
t2DoLoopStart but taking 2 parameters - the original loop iteration
count needed for a low overhead loop, plus the VCTP element count needed
for a DLSTP instruction setting up a tail predicated loop. The idea is
that the instruction holds both values and the backend
ARMLowOverheadLoops pass can pick between the two, depending on whether
it creates a tail predicated loop or falls back to a low overhead loop.

To do that there needs to be something that converts a t2DoLoopStart to
a t2DoLoopStartTP, for which this patch repurposes the
MVEVPTOptimisationsPass as a "tail predication and vpt optimisation"
pass. The extra operand for the t2DoLoopStartTP is chosen based on the
operands of VCTP's in the loop, and the instruction is moved as late in
the block as possible to attempt to increase the likelihood of making
tail predicated loops.

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




More information about the All-commits mailing list