summaryrefslogtreecommitdiff
path: root/lib/Target/TargetMachine.cpp
diff options
context:
space:
mode:
authorAnton Korobeynikov <asl@math.spbu.ru>2007-01-17 10:33:08 +0000
committerAnton Korobeynikov <asl@math.spbu.ru>2007-01-17 10:33:08 +0000
commit5032e5a61381437174e035de2a7dd728978f7bd5 (patch)
treed3490b98b33a202ee2b2a399692d9c7b169ac1c8 /lib/Target/TargetMachine.cpp
parente911615c4769d793588087b5321d303ecb9661c7 (diff)
downloadllvm-5032e5a61381437174e035de2a7dd728978f7bd5.tar.gz
llvm-5032e5a61381437174e035de2a7dd728978f7bd5.tar.bz2
llvm-5032e5a61381437174e035de2a7dd728978f7bd5.tar.xz
* Fix one more bug in PIC codegen: extra load is needed for *all*
non-statics. * Introduce new option to output zero-initialized data to .bss section. This can reduce size of binaries. Enable it by default for ELF & Cygwin/Mingw targets. Probably, Darwin should be also added. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33299 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/TargetMachine.cpp')
-rw-r--r--lib/Target/TargetMachine.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Target/TargetMachine.cpp b/lib/Target/TargetMachine.cpp
index 7547614a71..f6b3fd09f0 100644
--- a/lib/Target/TargetMachine.cpp
+++ b/lib/Target/TargetMachine.cpp
@@ -28,6 +28,7 @@ namespace llvm {
bool UnsafeFPMath;
bool FiniteOnlyFPMathOption;
bool UseSoftFloat;
+ bool NoZerosInBSS;
Reloc::Model RelocationModel;
CodeModel::Model CMModel;
}
@@ -61,6 +62,11 @@ namespace {
cl::desc("Generate software floating point library calls"),
cl::location(UseSoftFloat),
cl::init(false));
+ cl::opt<bool, true>
+ DontPlaceZerosInBSS("nozero-initialized-in-bss",
+ cl::desc("Don't place zero-initialized symbols into bss section"),
+ cl::location(NoZerosInBSS),
+ cl::init(false));
cl::opt<llvm::Reloc::Model, true>
DefRelocationModel(