llvm-project/llvm/lib
Ben Dunbobbin 4cb016cd2d [X86][ELF] Prefer lowering MC_GlobalAddress operands to .Lfoo$local for STV_DEFAULT only
This patch restricts the behaviour of referencing via .Lfoo$local
local aliases, introduced in https://reviews.llvm.org/D73230, to
STV_DEFAULT globals only.

Hidden symbols via --fvisiblity=hidden (https://gcc.gnu.org/wiki/Visibility)
is an important scenario.

Benefits:

- Improves the size of object files by using fewer STT_SECTION symbols.

- The code reads a bit better (it was not obvious to me without going
  back to the code reviews why the canBenefitFromLocalAlias function
  currently doesn't consider visibility).

- There is also a side benefit in restoring the effectiveness of the
  --wrap linker option and making the behavior of --wrap consistent
  between LTO and normal builds for references within a translation-unit.
  Note: this --wrap behavior (which is specific to LLD) should not be
  considered reliable. See comments on https://reviews.llvm.org/D73230
  for more.

Differential Revision: https://reviews.llvm.org/D85782
2020-08-14 00:09:15 +01:00
..
Analysis [BPI] Improve static heuristics for integer comparisons 2020-08-13 19:54:27 +02:00
AsmParser [LLParser,NFC] Simplify forward GV refs update 2020-08-06 19:18:51 -07:00
BinaryFormat [DebugInfo] Allow GNU macro extension to be read 2020-08-11 13:30:52 +02:00
Bitcode [SystemZ/ZOS] Add binary format goff and operating system zos to the triple 2020-08-11 05:26:26 -04:00
Bitstream [Bitcode] reserve in front of push_back loops. NFCI. 2020-05-01 15:52:53 +02:00
CodeGen DAG: Don't pass 0 alignment value to allowsMisalignedMemoryAccesses 2020-08-13 09:33:17 -04:00
DWARFLinker [Clang] Restore replace_path_prefix instead of startswith 2020-05-13 13:49:14 -04:00
DebugInfo [llvm-dwarfdump] Avoid crashing if an abbreviation offset is invalid. 2020-08-12 16:01:53 +07:00
Demangle [NFC] Use std::free instead of ::free 2020-07-20 16:19:08 -04:00
ExecutionEngine [ORC][NFC] Fix typo in comment 2020-08-13 21:14:20 +02:00
Extensions Update compiler extension integration into the build system 2020-04-24 09:40:14 +02:00
Frontend [OpenMP][NFC] Reuse OMPIRBuilder `struct ident_t` handling in Clang 2020-08-10 17:13:26 -05:00
FuzzMutate [NewPM][LSR] Rename strength-reduce -> loop-reduce 2020-07-02 11:15:29 -07:00
Fuzzer
IR [X86][ELF] Prefer lowering MC_GlobalAddress operands to .Lfoo$local for STV_DEFAULT only 2020-08-14 00:09:15 +01:00
IRReader Infer alignment of unmarked loads in IR/bitcode parsing. 2020-05-14 13:03:50 -07:00
InterfaceStub [elfabi] Move llvm-elfabi related code to InterfaceStub library 2020-08-13 11:51:44 -07:00
LTO [NewPM] Support optnone under new pass manager 2020-07-21 09:53:43 -07:00
LineEditor
Linker Revert rG5dd566b7c7b78bd- "PassManager.h - remove unnecessary Function.h/Module.h includes. NFCI." 2020-07-24 13:02:33 +01:00
MC [AIX][XCOFF] change the operand of branch instruction from symbol name to qualified symbol name for function declarations 2020-08-11 15:26:19 -04:00
MCA [MCA][InstrBuilder] Correctly mark reserved resources in initializeUsedResources. 2020-05-10 19:25:54 +01:00
Object [llvm-libtool-darwin] Refactor ArchiveWriter 2020-08-13 10:56:30 -07:00
ObjectYAML [DWARFYAML] Replace InitialLength with Format and Length. NFC. 2020-08-13 18:39:03 +08:00
Option [Clang options] Optimize optionMatches() runtime by removing mallocs 2020-08-12 23:07:07 -07:00
Passes [NewPM] Print 'Skipping pass' as pass instrumentation 2020-08-07 15:02:02 -07:00
ProfileData [llvm-cov] reset executation count to 0 after wrapped segment 2020-08-04 18:38:44 -07:00
Remarks BitstreamRemarkParser.h - remove unnecessary includes. NFCI. 2020-08-06 13:17:53 +01:00
Support [SystemZ/ZOS] Implement computeHostNumPhysicalCores 2020-08-12 08:31:33 -04:00
TableGen [TableGen][CGS] Print better errors on overlapping InstRW 2020-07-27 09:41:10 -06:00
Target Revert "[ARM] Fix IT block generation after Thumb2SizeReduce with -Oz" 2020-08-13 22:40:36 +01:00
Testing [cmake] Make gtest macro definitions a part the library interface 2020-08-11 15:22:44 +02:00
TextAPI [elfabi] Move llvm-elfabi related code to InterfaceStub library 2020-08-13 11:51:44 -07:00
ToolDrivers [llvm-lib] Support adding short import library objects with llvm-lib 2020-07-24 22:15:08 +03:00
Transforms [SLC] sprintf(dst, "%s", str) -> strcpy(dst, str) 2020-08-14 00:05:55 +02:00
WindowsManifest
XRay [xray] Add llvm-xray extract support for 32 bit ARM 2020-05-28 18:41:11 -04:00
CMakeLists.txt [elfabi] Move llvm-elfabi related code to InterfaceStub library 2020-08-13 11:51:44 -07:00
LLVMBuild.txt [elfabi] Move llvm-elfabi related code to InterfaceStub library 2020-08-13 11:51:44 -07:00