]> granicus.if.org Git - clang/commit
[IRGen] Emit lifetime markers for temporary struct allocas
authorFrancis Visoiu Mistrih <francisvm@yahoo.com>
Tue, 8 Oct 2019 22:10:38 +0000 (22:10 +0000)
committerFrancis Visoiu Mistrih <francisvm@yahoo.com>
Tue, 8 Oct 2019 22:10:38 +0000 (22:10 +0000)
commitb7e1c7cd95dcb7cc3ab6777f237326c47fae5165
treef6ae105448a351e083d50946b009ad925fa66418
parent54b0fb8af38294b3571b798ce0053f79bb6e0d27
[IRGen] Emit lifetime markers for temporary struct allocas

When passing arguments using temporary allocas, we need to add the
appropriate lifetime markers so that the stack coloring passes can
re-use the stack space.

This patch keeps track of all the lifetime.start calls emited before the
codegened call, and adds the corresponding lifetime.end calls after the
call.

Differential Revision: https://reviews.llvm.org/D68611

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@374126 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGCall.cpp
test/CodeGen/aarch64-byval-temp.c [new file with mode: 0644]