summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2012-01-07 21:17:16 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2012-01-07 21:17:16 +0000
commitecb9fa11a4dc809e90f895d42b43f6decfb7fc6e (patch)
tree2f364bc64bcbbfb95625c73dc97ed0460e14d2cd
parent48ca8b8fe2b47597a33c62fac1e83c18432307df (diff)
downloadbcm5719-llvm-ecb9fa11a4dc809e90f895d42b43f6decfb7fc6e.tar.gz
bcm5719-llvm-ecb9fa11a4dc809e90f895d42b43f6decfb7fc6e.zip
Make clever use of alignment and padding to shrink GlobalValue.
-8 bytes on x86_64, no change on x86. llvm-svn: 147742
-rw-r--r--llvm/include/llvm/GlobalValue.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/include/llvm/GlobalValue.h b/llvm/include/llvm/GlobalValue.h
index 63dc4ab6bae..81a11a4c925 100644
--- a/llvm/include/llvm/GlobalValue.h
+++ b/llvm/include/llvm/GlobalValue.h
@@ -59,19 +59,18 @@ public:
protected:
GlobalValue(Type *ty, ValueTy vty, Use *Ops, unsigned NumOps,
LinkageTypes linkage, const Twine &Name)
- : Constant(ty, vty, Ops, NumOps), Parent(0),
- Linkage(linkage), Visibility(DefaultVisibility), Alignment(0),
- UnnamedAddr(0) {
+ : Constant(ty, vty, Ops, NumOps), Linkage(linkage),
+ Visibility(DefaultVisibility), Alignment(0), UnnamedAddr(0), Parent(0) {
setName(Name);
}
- Module *Parent;
// Note: VC++ treats enums as signed, so an extra bit is required to prevent
// Linkage and Visibility from turning into negative values.
LinkageTypes Linkage : 5; // The linkage of this global
unsigned Visibility : 2; // The visibility style of this global
unsigned Alignment : 16; // Alignment of this symbol, must be power of two
unsigned UnnamedAddr : 1; // This value's address is not significant
+ Module *Parent; // The containing module.
std::string Section; // Section to emit this into, empty mean default
public:
~GlobalValue() {
OpenPOWER on IntegriCloud