diff options
author | Arnaud A. de Grandmaison <arnaud.degrandmaison@arm.com> | 2014-10-02 12:19:51 +0000 |
---|---|---|
committer | Arnaud A. de Grandmaison <arnaud.degrandmaison@arm.com> | 2014-10-02 12:19:51 +0000 |
commit | 42d314d1ba7fd02da1784c2a2e26e7a91a6ef1b4 (patch) | |
tree | 210dca4280865c7a7848760ce67e68e2559eb43e /clang/lib/CodeGen/CodeGenFunction.cpp | |
parent | 4ae7f2e839957dbb1f7bc38f524adf6c6d4b416a (diff) | |
download | bcm5719-llvm-42d314d1ba7fd02da1784c2a2e26e7a91a6ef1b4.tar.gz bcm5719-llvm-42d314d1ba7fd02da1784c2a2e26e7a91a6ef1b4.zip |
Emit lifetime.start / lifetime.end markers for unnamed temporary objects.
This will give more information to the optimizers so that they can reuse stack slots
and reduce stack usage.
llvm-svn: 218865
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenFunction.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp index 9f359185381..93617718345 100644 --- a/clang/lib/CodeGen/CodeGenFunction.cpp +++ b/clang/lib/CodeGen/CodeGenFunction.cpp @@ -229,6 +229,11 @@ void CodeGenFunction::FinishFunction(SourceLocation EndLoc) { DI->EmitLocation(Builder, EndLoc); } + // Some top level lifetime extended variables may still need + // to have their cleanups called. + if (!LifetimeExtendedCleanupStack.empty()) + MoveDeferedCleanups(0); + // Pop any cleanups that might have been associated with the // parameters. Do this in whatever block we're currently in; it's // important to do this before we enter the return block or return |