[PATCH] D36160: Liveness issues in tail merging, and the ARM::LR saved-but-not-restored

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 4 10:49:19 PDT 2017


efriedma added a comment.

> What happens if we keep the setRestored() hack, but move the ARM-specific code to call setRestored() on LR into assignCalleeSavedSpillSlots?

Oh, nevermind, that'll blow up because BX_RET doesn't actually use LR.

----

Ultimately, yes, we should stop modeling LR as callee-save, but it's probably a pretty big patch to deal with all the implications (all the various return and tail-call instructions would need to be changed, and we probably need some special handling to make sure LR lands in the right place in the stack frame for stack walking code).  I guess this patch isn't too evil in the meantime.


Repository:
  rL LLVM

https://reviews.llvm.org/D36160





More information about the llvm-commits mailing list