aboutsummaryrefslogtreecommitdiff
path: root/llvm/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
commit3f6d52834b8cc185285e95028210fc2adeb7240c (patch)
tree6d9a1a9f06168f348cb8f08029da8f1bd1ce5f36 /llvm/lib/Target/TargetMachine.cpp
parent38ee6519b75a5bfd6f4b973f90c90deee02aef2c (diff)
downloadllvm-3f6d52834b8cc185285e95028210fc2adeb7240c.zip
llvm-3f6d52834b8cc185285e95028210fc2adeb7240c.tar.gz
llvm-3f6d52834b8cc185285e95028210fc2adeb7240c.tar.bz2
* 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. llvm-svn: 33299
Diffstat (limited to 'llvm/lib/Target/TargetMachine.cpp')
-rw-r--r--llvm/lib/Target/TargetMachine.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/Target/TargetMachine.cpp b/llvm/lib/Target/TargetMachine.cpp
index 7547614..f6b3fd0 100644
--- a/llvm/lib/Target/TargetMachine.cpp
+++ b/llvm/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(