diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2011-05-02 20:24:29 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2011-05-02 20:24:29 +0000 |
commit | 30458b51e385e1cd747d7c4a6eb1ebefe0c89772 (patch) | |
tree | fa1e59c64a2edaab7b4295f5873a59c891df63f6 /clang/lib/CodeGen/CGCall.h | |
parent | 39b56b4b9f562aded08846ad53c57c378fb2078b (diff) | |
download | bcm5719-llvm-30458b51e385e1cd747d7c4a6eb1ebefe0c89772.tar.gz bcm5719-llvm-30458b51e385e1cd747d7c4a6eb1ebefe0c89772.zip |
Skip extra copy from aggregate where it isn't necessary; rdar://problem/8139919 . This shouldn't make much of a difference at -O3, but should substantially reduce the number of generated memcpy's at -O0.
llvm-svn: 130717
Diffstat (limited to 'clang/lib/CodeGen/CGCall.h')
-rw-r--r-- | clang/lib/CodeGen/CGCall.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/CGCall.h b/clang/lib/CodeGen/CGCall.h index 3f600c04e59..160a62eab36 100644 --- a/clang/lib/CodeGen/CGCall.h +++ b/clang/lib/CodeGen/CGCall.h @@ -47,8 +47,9 @@ namespace CodeGen { struct CallArg { RValue RV; QualType Ty; - CallArg(RValue rv, QualType ty) - : RV(rv), Ty(ty) + bool NeedsCopy; + CallArg(RValue rv, QualType ty, bool needscopy) + : RV(rv), Ty(ty), NeedsCopy(needscopy) { } }; @@ -57,8 +58,8 @@ namespace CodeGen { class CallArgList : public llvm::SmallVector<CallArg, 16> { public: - void add(RValue rvalue, QualType type) { - push_back(CallArg(rvalue, type)); + void add(RValue rvalue, QualType type, bool needscopy = false) { + push_back(CallArg(rvalue, type, needscopy)); } }; |