aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms
diff options
context:
space:
mode:
authorJan Voung <jvoung@chromium.org>2013-04-29 15:52:38 -0700
committerJan Voung <jvoung@chromium.org>2013-04-29 15:52:38 -0700
commit1174111b6f8ab1b95085aeb9c3c451e155a27642 (patch)
tree7bc2b5f216e8722d216594fb3ec2ad996c17835a /lib/Transforms
parent9986176a70307f63f089d1bc79284ccb8f19d6cb (diff)
Use unique'ed types for varargs expansion instead of non-unique named types.
Saves a tiny bit of space for var-args heavy bitcode programs, since the anonymous types get unique'ed. E.g., saves 20KB out of 1.6MB in spec gcc when comparing the gzipped files, or about 100KB when not zipped. This is only a savings with the current wire format. If we change the alloca, etc. to only have sizes and not struct types then we would also not have this duplication. Just happened to notice while looking through code for what struct types remain used in the bitcode. random cleanup for: BUG= https://code.google.com/p/nativeclient/issues/detail?id=3338 R=mseaborn@chromium.org Review URL: https://codereview.chromium.org/14197004
Diffstat (limited to 'lib/Transforms')
-rw-r--r--lib/Transforms/NaCl/ExpandVarArgs.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/NaCl/ExpandVarArgs.cpp b/lib/Transforms/NaCl/ExpandVarArgs.cpp
index cbafbc2757..fc5f70960a 100644
--- a/lib/Transforms/NaCl/ExpandVarArgs.cpp
+++ b/lib/Transforms/NaCl/ExpandVarArgs.cpp
@@ -230,7 +230,7 @@ static bool ExpandVarArgCall(InstType *Call, DataLayout *DL) {
// Create struct type for packing variable arguments into. We
// create this as packed for now and assume that no alignment
// padding is desired.
- StructType *VarArgsTy = StructType::create(VarArgsTypes, "vararg_call", true);
+ StructType *VarArgsTy = StructType::get(*Context, VarArgsTypes, true);
// Allocate space for the variable argument buffer. Do this at the
// start of the function so that we don't leak space if the function