[PATCH] D50986: [ShrinkWrap] Don't put pseudo-instrs which use $sp before prologue setup

Vladimir Stefanovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 20 11:49:15 PDT 2018


vstefanovic created this revision.
vstefanovic added reviewers: atanasyan, qcolombet.
Herald added subscribers: jrtc27, arichardson, sdardis.

There are some pseudo-instructions* which don't have stack pointer among
operands, but are expanded into real instructions that do use stack (with
a certain combination of options).
ShrinkWrapping pass is not aware of it, so it may move prologue setup past
them.

With this patch:

- FrameSetup flag is added to pseudo-instructions which are going to be replaced with instructions using stack;
- ShrinkWrapping does not try to move prologue setup below a pseudo-instruction with FrameSetup flag.

Fixes MultiSource/Benchmarks/MallocBench/cfrac for
'--target=mips-img-linux-gnu -mcpu=mips32r6 -mfpxx -mnan=2008'
and
'--target=mips-img-linux-gnu -mcpu=mips32r6 -mfp64 -mnan=2008 -mno-odd-spreg'.

- mips' BuildPairF64, BuildPairF64_64, ExtractElementF64, ExtractElementF64_64


Repository:
  rL LLVM

https://reviews.llvm.org/D50986

Files:
  lib/CodeGen/ShrinkWrap.cpp
  lib/Target/Mips/MipsSEFrameLowering.cpp
  lib/Target/Mips/MipsSEISelDAGToDAG.cpp
  test/CodeGen/Mips/shrink-wrap-buildpairf64-extractelementf64.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D50986.161524.patch
Type: text/x-patch
Size: 11599 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180820/27d1685c/attachment.bin>


More information about the llvm-commits mailing list