1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-26 14:33:02 +02:00
llvm-mirror/lib/MC
Peter Collingbourne b5914c76cc ARM/ELF: Better codegen for global variable addresses.
In PIC mode we were previously computing global variable addresses (or GOT
entry addresses) by adding the PC, the PC-relative GOT displacement and
the GOT-relative symbol/GOT entry displacement. Because the latter two
displacements are fixed, we ended up performing one more addition than
necessary.

This change causes us to compute addresses using a single PC-relative
displacement, resulting in a shorter code sequence. This reduces code size
by about 4% in a recent build of Chromium for Android.

As a result of this change we no longer need to compute the GOT base address
in the ARM backend, which allows us to remove the Global Base Reg pass and
SDAG lowering for the GOT.

We also now no longer use the GOT when addressing a symbol which is known
to be defined in the same linkage unit. Specifically, the symbol must have
either hidden visibility or a strong definition in the current module in
order to not use the the GOT.

This is a change from the previous behaviour where we would use the GOT to
address externally visible symbols defined in the same module. I think the
only cases where this could matter are cases involving symbol interposition,
but we don't really support that well anyway.

Differential Revision: http://reviews.llvm.org/D13650

llvm-svn: 251322
2015-10-26 18:23:16 +00:00
..
MCDisassembler Revert r247692: Replace Triple with a new TargetTuple in MCTargetDesc/* and related. NFC. 2015-09-15 16:17:27 +00:00
MCParser [MC] Add support for GNU as-compatible binary operator precedence 2015-10-26 03:15:34 +00:00
CMakeLists.txt
ConstantPools.cpp
ELFObjectWriter.cpp Add a RAW mode to StringTableBuilder. 2015-10-23 21:48:05 +00:00
LLVMBuild.txt
MachObjectWriter.cpp Add a RAW mode to StringTableBuilder. 2015-10-23 21:48:05 +00:00
Makefile
MCAsmBackend.cpp
MCAsmInfo.cpp MCAsmInfo: Allow targets to specify when the .section directive should be omitted 2015-09-25 21:41:14 +00:00
MCAsmInfoCOFF.cpp
MCAsmInfoDarwin.cpp
MCAsmInfoELF.cpp
MCAsmStreamer.cpp [X86] Emit .cfi_escape GNU_ARGS_SIZE when adjusting the stack before calls 2015-10-07 07:01:31 +00:00
MCAssembler.cpp MC: Remove implicit ilist iterator conversions, NFC 2015-10-10 00:13:11 +00:00
MCCodeEmitter.cpp
MCCodeGenInfo.cpp
MCContext.cpp Clear SectionSymbols in MCContext::Reset 2015-10-09 17:24:54 +00:00
MCDwarf.cpp [X86] Emit .cfi_escape GNU_ARGS_SIZE when adjusting the stack before calls 2015-10-07 07:01:31 +00:00
MCELFObjectTargetWriter.cpp
MCELFStreamer.cpp Fix pr24486. 2015-10-05 12:07:05 +00:00
MCExpr.cpp ARM/ELF: Better codegen for global variable addresses. 2015-10-26 18:23:16 +00:00
MCInst.cpp
MCInstPrinter.cpp
MCInstrAnalysis.cpp
MCInstrDesc.cpp
MCLabel.cpp
MCLinkerOptimizationHint.cpp
MCMachObjectTargetWriter.cpp
MCMachOStreamer.cpp Use range-based for loops. NFC 2015-10-14 04:36:00 +00:00
MCNullStreamer.cpp
MCObjectFileInfo.cpp [MachO] Stop generating *coal* sections. 2015-10-15 05:28:38 +00:00
MCObjectStreamer.cpp MC: Remove implicit ilist iterator conversions, NFC 2015-10-10 00:13:11 +00:00
MCObjectWriter.cpp Fix pr24486. 2015-10-05 12:07:05 +00:00
MCRegisterInfo.cpp
MCSchedule.cpp
MCSection.cpp MC: Remove implicit ilist iterator conversions, NFC 2015-10-10 00:13:11 +00:00
MCSectionCOFF.cpp Sink COFF.h MC include into .cpp files 2015-09-03 16:41:50 +00:00
MCSectionELF.cpp MCAsmInfo: Allow targets to specify when the .section directive should be omitted 2015-09-25 21:41:14 +00:00
MCSectionMachO.cpp [ADT] Switch a bunch of places in LLVM that were doing single-character 2015-09-10 06:12:31 +00:00
MCStreamer.cpp [X86] Emit .cfi_escape GNU_ARGS_SIZE when adjusting the stack before calls 2015-10-07 07:01:31 +00:00
MCSubtargetInfo.cpp Use std::begin/end and std::is_sorted to simplify some code. NFC 2015-10-17 16:37:11 +00:00
MCSymbol.cpp Fix pr24486. 2015-10-05 12:07:05 +00:00
MCSymbolELF.cpp
MCSymbolizer.cpp
MCTargetOptions.cpp [llvm-mc] Add --no-warn flag with -W alias to disable outputting warnings while assembling. 2015-07-27 22:39:14 +00:00
MCValue.cpp
MCWin64EH.cpp
MCWinEH.cpp
StringTableBuilder.cpp Add a RAW mode to StringTableBuilder. 2015-10-23 21:48:05 +00:00
SubtargetFeature.cpp [ADT] Switch a bunch of places in LLVM that were doing single-character 2015-09-10 06:12:31 +00:00
WinCOFFObjectWriter.cpp Add a RAW mode to StringTableBuilder. 2015-10-23 21:48:05 +00:00
WinCOFFStreamer.cpp Fix pr24486. 2015-10-05 12:07:05 +00:00
YAML.cpp