summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/TargetInfo.cpp
diff options
context:
space:
mode:
authorAkira Hatanaka <ahatanaka@apple.com>2019-03-21 19:59:49 +0000
committerAkira Hatanaka <ahatanaka@apple.com>2019-03-21 19:59:49 +0000
commit65bb3f92bd5f6d1d32dee43904c56f4f73276e62 (patch)
tree5c039ce629b8e7ee218f1a0682b797be53ed10c5 /clang/lib/CodeGen/TargetInfo.cpp
parent86559dcb8d519863c16f7b210ca583a34194acef (diff)
downloadbcm5719-llvm-65bb3f92bd5f6d1d32dee43904c56f4f73276e62.tar.gz
bcm5719-llvm-65bb3f92bd5f6d1d32dee43904c56f4f73276e62.zip
[CodeGen][ObjC] Annotate calls to objc_retainAutoreleasedReturnValue
with notail on x86-64. On x86-64, the epilogue code inserted before the tail jump blocks the autoreleased return optimization. rdar://problem/38675807 Differential Revision: https://reviews.llvm.org/D59656 llvm-svn: 356705
Diffstat (limited to 'clang/lib/CodeGen/TargetInfo.cpp')
-rw-r--r--clang/lib/CodeGen/TargetInfo.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/TargetInfo.cpp b/clang/lib/CodeGen/TargetInfo.cpp
index 63e991c9370..f48f19966e5 100644
--- a/clang/lib/CodeGen/TargetInfo.cpp
+++ b/clang/lib/CodeGen/TargetInfo.cpp
@@ -2268,6 +2268,12 @@ public:
return static_cast<const X86_64ABIInfo&>(TargetCodeGenInfo::getABIInfo());
}
+ /// Disable tail call on x86-64. The epilogue code before the tail jump blocks
+ /// the autoreleaseRV/retainRV optimization.
+ bool shouldSuppressTailCallsOfRetainAutoreleasedReturnValue() const override {
+ return true;
+ }
+
int getDwarfEHStackPointer(CodeGen::CodeGenModule &CGM) const override {
return 7;
}
OpenPOWER on IntegriCloud