[PATCH] D59439: [ARM] Make sure to save/restore LR when we use tBfar.

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 15 16:05:15 PDT 2019


efriedma created this revision.
efriedma added reviewers: samparker, t.p.northover, mstorsjo, SjoerdMeijer.
Herald added subscribers: jdoerfert, kristof.beyls, javed.absar.
Herald added a project: LLVM.

This change does two things. One, it ensures compilation will abort instead of miscompiling if ARMFrameLowering::determineCalleeSaves chooses not to save LR in a case where it's necessary.  Two, it changes the way we estimate the size of a function to be more conservative in the presence of constant pool entries and jump tables.

EstimateFunctionSizeInBytes probably still isn't really conservative enough, but I'm not sure how we can come up with a reliable estimate before constant islands runs.

The testcase is a little on the large side... suggestions welcome on how to shrink it.


Repository:
  rL LLVM

https://reviews.llvm.org/D59439

Files:
  lib/Target/ARM/ARMConstantIslandPass.cpp
  lib/Target/ARM/ARMFrameLowering.cpp
  lib/Target/ARM/ARMMachineFunctionInfo.h
  test/CodeGen/Thumb/large-fn-switch.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59439.190919.patch
Type: text/x-patch
Size: 21238 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190315/ab0c0785/attachment.bin>


More information about the llvm-commits mailing list