This is an archive of the discontinued LLVM Phabricator instance.

[WIP] Improve deopt spilling for arguments passed on the stack
AbandonedPublic

Authored by reames on Aug 25 2016, 7:28 PM.

Details

Summary

This patch is not likely to get committed in it's current form; I got most of the way done and discovered a better approach.

The idea behind this was that we are generating new spill slots for deopt values which are arguments that were passed on the stack. This is unnecessary. This patch extends the SelectionDAGBuilder logic around statepoints to handle specifically this case.

This does help our existing lowering, but the main reason was to avoid a serious regression in an upcoming patch around live-in-deopt semantics. However, I discovered right before posting this that the peepholeopt MI pass should be catching these cases and isn't. The right fix is to implement the live in piece and then fix peepholeopt.

Worth noting is that this patch improves lowering for live-through deopt. If it turns out live-on-return is harder than it looks, this might be a good backup position. In particular, I'm trying to get both live-in and live-on-return implemented; I have a strategy for live-in that looks workable, but live-on-return is still questionable. If I can't get live-on-return, I'll probably want to revisit this patch.

Diff Detail

Event Timeline

reames updated this revision to Diff 69309.Aug 25 2016, 7:28 PM
reames retitled this revision from to [WIP] Improve deopt spilling for arguments passed on the stack.
reames updated this object.
reames added reviewers: sanjoy, igor-laevsky.
reames added a subscriber: llvm-commits.