[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)
commit143f6b837790dd695c140c0cc6c5164ec54e0c0e
treef3514d0c3a6f1d36d5a327f2aa1fee966ed368c3
parentd5f92e345cb6780d01debdcbfe56fe5720d8d50b
[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

llvm-svn: 374126
clang/lib/CodeGen/CGCall.cpp
clang/test/CodeGen/aarch64-byval-temp.c [new file with mode: 0644]