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
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user