[PATCH] D90877: [FastISel] Reduce spills around mem-intrinsic calls

Paul Robinson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 5 13:13:32 PST 2020


probinson created this revision.
probinson added reviewers: rnk, MatzeB, qcolombet, echristo.
probinson added a project: debug-info.
Herald added subscribers: pengfei, ormris, jfb, hiraditya.
Herald added a project: LLVM.
probinson requested review of this revision.

FastISel generates instructions to materialize "local values" at the
top of a block, in the hope that these values could be reused within
the block.  To reduce spills and restores, FastISel treats calls as
sub-block boundaries, flushing the "local value map" at each call.

This patch treats the mem* intrinsics as if they were calls, because
at O0 generally they are calls.  Eliminating these spills/restores is
actually better for debugging (especially a "continue at this line"
command), code size, stack frame size, and maybe even performance.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D90877

Files:
  llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
  llvm/test/CodeGen/AArch64/arm64-abi_align.ll
  llvm/test/CodeGen/X86/fastisel-memset-flush.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D90877.303244.patch
Type: text/x-patch
Size: 4129 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201105/e93e1e3d/attachment.bin>


More information about the llvm-commits mailing list