[all-commits] [llvm/llvm-project] d9bf62: [ARM] Revert low overhead loops with calls before ...

David Green via All-commits all-commits at lists.llvm.org
Mon Dec 7 07:49:49 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: d9bf6245bfef41ad7606f0e64e0c4f12d65a2b46
      https://github.com/llvm/llvm-project/commit/d9bf6245bfef41ad7606f0e64e0c4f12d65a2b46
  Author: David Green <david.green at arm.com>
  Date:   2020-12-07 (Mon, 07 Dec 2020)

  Changed paths:
    M llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
    M llvm/lib/Target/ARM/ARMBaseInstrInfo.h
    M llvm/lib/Target/ARM/ARMLowOverheadLoops.cpp
    A llvm/lib/Target/ARM/MVETailPredUtils.h
    M llvm/lib/Target/ARM/MVEVPTOptimisationsPass.cpp
    M llvm/test/CodeGen/Thumb2/LowOverheadLoops/biquad-cascade-default.mir
    M llvm/test/CodeGen/Thumb2/LowOverheadLoops/biquad-cascade-optsize-strd-lr.mir
    M llvm/test/CodeGen/Thumb2/LowOverheadLoops/loop-dec-copy-chain.mir
    M llvm/test/CodeGen/Thumb2/LowOverheadLoops/revert-non-loop.mir
    A llvm/test/CodeGen/Thumb2/LowOverheadLoops/revertcallearly.mir
    M llvm/test/CodeGen/Thumb2/LowOverheadLoops/unsafe-cpsr-loop-use.mir

  Log Message:
  -----------
  [ARM] Revert low overhead loops with calls before registry allocation.

This adds code to revert low overhead loops with calls in them before
register allocation. Ideally we would not create low overhead loops with
calls in them to begin with, but that can be difficult to always get
correct. If we want to try and glue together t2LoopDec and t2LoopEnd
into a single instruction, we need to ensure that no instructions use LR
in the loop. (Technically the final code can be better too, as it
doesn't need to use the same registers but that has not been optimized
for here, as reverting loops with calls is expected to be very rare).

It also adds a MVETailPredUtils.h header to share the revert code
between different passes, and provides a place to expand upon, with
RevertLoopWithCall becoming a place to perform other low overhead loop
alterations like removing copies or combining LoopDec and End into a
single instruction.

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




More information about the All-commits mailing list