[llvm-commits] [llvm] r147742 - /llvm/trunk/include/llvm/GlobalValue.h
Benjamin Kramer
benny.kra at googlemail.com
Sat Jan 7 13:17:16 PST 2012
Author: d0k
Date: Sat Jan 7 15:17:16 2012
New Revision: 147742
URL: http://llvm.org/viewvc/llvm-project?rev=147742&view=rev
Log:
Make clever use of alignment and padding to shrink GlobalValue.
-8 bytes on x86_64, no change on x86.
Modified:
llvm/trunk/include/llvm/GlobalValue.h
Modified: llvm/trunk/include/llvm/GlobalValue.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/GlobalValue.h?rev=147742&r1=147741&r2=147742&view=diff
==============================================================================
--- llvm/trunk/include/llvm/GlobalValue.h (original)
+++ llvm/trunk/include/llvm/GlobalValue.h Sat Jan 7 15:17:16 2012
@@ -59,19 +59,18 @@
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() {
More information about the llvm-commits
mailing list