]> granicus.if.org Git - clang/commit
CodeGen: Have 'this'-returning constructors and destructors to take advantage of...
authorStephen Lin <stephenwlin@gmail.com>
Tue, 18 Jun 2013 17:00:49 +0000 (17:00 +0000)
committerStephen Lin <stephenwlin@gmail.com>
Tue, 18 Jun 2013 17:00:49 +0000 (17:00 +0000)
commitd4c0cd07641681de6ed12164aa7a4495ab4b18e5
treee2bc6e9ebbd9dd2314d84a3302a1b803c7c17faa
parent52fdc568e9412f0afe401fb36eac93814846650a
CodeGen: Have 'this'-returning constructors and destructors to take advantage of the new backend 'returned' attribute.

The backend will now use the generic 'returned' attribute to form tail calls where possible, as well as avoid save-restores of 'this' in some cases (specifically the cases that matter for the ARM C++ ABI).

This patch also reverts a prior front-end only partial implementation of these optimizations, since it's no longer required.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184205 91177308-0d34-0410-b5e6-96231b3b80d8
13 files changed:
lib/CodeGen/CGCXXABI.h
lib/CodeGen/CGCall.cpp
lib/CodeGen/CGClass.cpp
lib/CodeGen/CGVTables.cpp
lib/CodeGen/CodeGenFunction.cpp
lib/CodeGen/CodeGenFunction.h
lib/CodeGen/CodeGenModule.cpp
lib/CodeGen/ItaniumCXXABI.cpp
lib/CodeGen/MicrosoftCXXABI.cpp
test/CodeGenCXX/arm.cpp
test/CodeGenCXX/constructor-destructor-return-this.cpp
test/CodeGenCXX/copy-constructor-elim-2.cpp
test/CodeGenCXX/microsoft-abi-structors.cpp