aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/ScriptInterpreter/Python/ScriptedThreadPythonInterface.h
diff options
context:
space:
mode:
authorAyke van Laethem <aykevanlaethem@gmail.com>2021-03-03 00:45:15 +0100
committerAyke van Laethem <aykevanlaethem@gmail.com>2022-01-19 14:22:13 +0100
commitf41d2d9469d66b92c033616c080e196bdb07363a (patch)
tree87e7faacaea17aaba7b81299c0743f8ac19150b0 /lldb/source/Plugins/ScriptInterpreter/Python/ScriptedThreadPythonInterface.h
parentd649faff9c0ca87fd5a00a7f1056071fd46432ea (diff)
downloadllvm-f41d2d9469d66b92c033616c080e196bdb07363a.zip
llvm-f41d2d9469d66b92c033616c080e196bdb07363a.tar.gz
llvm-f41d2d9469d66b92c033616c080e196bdb07363a.tar.bz2
[AVR] Remove redundant dynalloca SP save/restore pass
I think this pass was previously used under the assumption that most functions would not need a frame pointer and it would be more efficient to store the old stack pointer in a regular register pair. Unfortunately, right now we're forced to always reserve the Y register as a frame pointer: whether or not this is needed is only known after regsiter allocation at which point it doesn't make sense anymore to mark it as non-reserved. Therefore, it makes sense to use the Y register to store the old stack pointer in functions with dynamic allocas (with a variable size or not in the entry block). Knowing this can make the code around dynamic allocas a lot simpler: simply save/restore the frame pointer. This is especially relevant in functions that have a frame pointer anyway (for example, because they have stack spills). The stack restore in the epilogue will implicitly restore the old stack pointer, so there is no need to store the old stack pointer separately. It even reduces register pressure as a side effect. Differential Revision: https://reviews.llvm.org/D97815
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/ScriptedThreadPythonInterface.h')
0 files changed, 0 insertions, 0 deletions