[PATCH] D53453: [ARM] Make InstrEmitter mark CPSR defs dead for Thumb1.

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 19 14:23:03 PDT 2018


efriedma created this revision.
efriedma added reviewers: t.p.northover, dmgreen, rengolin, javed.absar.
Herald added subscribers: chrib, kristof.beyls.

The "dead" markings allow existing target-independent optimizations, like MachineSink, to trigger more frequently.  The CPSR defs would have eventually been marked dead by LiveVariables, so this only affects optimizations before regalloc.

The ARMBaseInstrInfo.cpp is fixing a bug which is only visible with this change: the transform adds a use to an otherwise dead def of CPSR.  This is covered by existing regression tests.

Saves roughly 0.1% codesize on a Thumb1 codebase I've been looking at.

Loosely depends on https://reviews.llvm.org/D53452; one regression test related to TBB formation breaks without that change.


Repository:
  rL LLVM

https://reviews.llvm.org/D53453

Files:
  lib/CodeGen/SelectionDAG/InstrEmitter.cpp
  lib/Target/ARM/ARMBaseInstrInfo.cpp
  test/CodeGen/ARM/arm-and-tst-peephole.ll
  test/CodeGen/ARM/cmn.ll
  test/CodeGen/ARM/intrinsics-overflow.ll
  test/CodeGen/ARM/select-imm.ll
  test/CodeGen/Thumb/branchless-cmp.ll
  test/CodeGen/Thumb/consthoist-few-dependents.ll
  test/CodeGen/Thumb/select.ll
  test/CodeGen/Thumb/umulo-128-legalisation-lowering.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53453.170248.patch
Type: text/x-patch
Size: 20620 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181019/9e6e4900/attachment.bin>


More information about the llvm-commits mailing list