summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorJan Sjödin <jan_sjodin@yahoo.com>2011-03-11 19:37:02 +0000
committerJan Sjödin <jan_sjodin@yahoo.com>2011-03-11 19:37:02 +0000
commitf3f78583f97e3a638f556f2dd929bfd678a1cc22 (patch)
tree1cd7caaa08ac3e6609c2025dbd180500a22622d7 /llvm/lib/CodeGen
parent94ccb27b43552fbc5459e0572dc73a505eca88bf (diff)
downloadbcm5719-llvm-f3f78583f97e3a638f556f2dd929bfd678a1cc22.tar.gz
bcm5719-llvm-f3f78583f97e3a638f556f2dd929bfd678a1cc22.zip
Remove optimization emitting a reference insted of label difference, since it can create more relocations. Removed isBaseAddressKnownZero method, because it is no longer used.
llvm-svn: 127478
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp7
1 files changed, 0 insertions, 7 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp
index 98a1bf2f1ce..68e80e3983a 100644
--- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp
@@ -191,13 +191,6 @@ void AsmPrinter::EmitSectionOffset(const MCSymbol *Label,
assert((!Label->isInSection() || &Label->getSection() == &Section) &&
"Section offset using wrong section base for label");
- // If the section in question will end up with an address of 0 anyway, we can
- // just emit an absolute reference to save a relocation.
- if (Section.isBaseAddressKnownZero()) {
- OutStreamer.EmitSymbolValue(Label, 4, 0/*AddrSpace*/);
- return;
- }
-
// Otherwise, emit it as a label difference from the start of the section.
EmitLabelDifference(Label, SectionLabel, 4);
}
OpenPOWER on IntegriCloud