summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGCall.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2011-08-25 23:04:34 +0000
committerJohn McCall <rjmccall@apple.com>2011-08-25 23:04:34 +0000
commita5efa7386ad9920e969ba4f155de3b40f8118cae (patch)
treecfa90d732233b92aab897950fdd571c28cf9dbaa /clang/lib/CodeGen/CGCall.cpp
parent5cc730cdef97d98df0b33a21a6b9568b9cddccb1 (diff)
downloadbcm5719-llvm-a5efa7386ad9920e969ba4f155de3b40f8118cae.tar.gz
bcm5719-llvm-a5efa7386ad9920e969ba4f155de3b40f8118cae.zip
Track whether an AggValueSlot is potentially aliased, and do not
emit call results into potentially aliased slots. This allows us to properly mark indirect return slots as noalias, at the cost of requiring an extra memcpy when assigning an aggregate call result into a l-value. It also brings us into compliance with the x86-64 ABI. llvm-svn: 138599
Diffstat (limited to 'clang/lib/CodeGen/CGCall.cpp')
-rw-r--r--clang/lib/CodeGen/CGCall.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp
index dc3e702d6a3..846e1aa3934 100644
--- a/clang/lib/CodeGen/CGCall.cpp
+++ b/clang/lib/CodeGen/CGCall.cpp
@@ -907,6 +907,7 @@ void CodeGenFunction::EmitFunctionProlog(const CGFunctionInfo &FI,
// Name the struct return argument.
if (CGM.ReturnTypeUsesSRet(FI)) {
AI->setName("agg.result");
+ AI->addAttr(llvm::Attribute::NoAlias);
++AI;
}
OpenPOWER on IntegriCloud