llvm-project/llvm/lib/IR
Fangrui Song 9d55e4ee13 Make explicit -fno-semantic-interposition (in -fpic mode) infer dso_local
-fno-semantic-interposition is currently the CC1 default. (The opposite
disables some interprocedural optimizations.) However, it does not infer
dso_local: on most targets accesses to ExternalLinkage functions/variables
defined in the current module still need PLT/GOT.

This patch makes explicit -fno-semantic-interposition infer dso_local,
so that PLT/GOT can be eliminated if targets implement local aliases
for AsmPrinter::getSymbolPreferLocal (currently only x86).

Currently we check whether the module flag "SemanticInterposition" is 0.
If yes, infer dso_local. In the future, we can infer dso_local unless
"SemanticInterposition" is 1: frontends other than clang will also
benefit from the optimization if they don't bother setting the flag.
(There will be risks if they do want ELF interposition: they need to set
"SemanticInterposition" to 1.)
2020-05-25 20:48:18 -07:00
..
AbstractCallSite.cpp Remove getNumUses() comparisons (NFC) 2020-05-02 11:05:19 +02:00
AsmWriter.cpp [IR][BFloat] Add BFloat IR type 2020-05-15 14:43:43 +01:00
AttributeImpl.h [IR] AttributeList::getContext has a single user, remove it. 2020-05-01 14:18:29 +02:00
Attributes.cpp Reland [X86] Codegen for preallocated 2020-05-20 11:25:44 -07:00
AutoUpgrade.cpp [IR] Convert null-pointer-is-valid into an enum attribute 2020-05-15 19:41:07 +02:00
BasicBlock.cpp [IR] Simplify BasicBlock::removePredecessor. NFCI. 2020-05-20 09:58:21 +01:00
CMakeLists.txt [NFC] Split Knowledge retention and place it more appropriatly 2020-04-02 15:01:41 +02:00
Comdat.cpp
ConstantFold.cpp Make Value::getPointerAlignment() return an Align, not a MaybeAlign. 2020-05-20 16:37:20 -07:00
ConstantFold.h Remove "mask" operand from shufflevector. 2020-03-31 13:08:59 -07:00
ConstantRange.cpp [ConstantRange] Use APInt::or/APInt::and for single elements. 2020-04-01 09:50:24 +01:00
Constants.cpp [IR][BFloat] Add BFloat IR type 2020-05-15 14:43:43 +01:00
ConstantsContext.h [SVE] Remove calls to isScalable from IR 2020-04-23 11:51:22 -07:00
Core.cpp AllocaInst should store Align instead of MaybeAlign. 2020-05-16 14:53:16 -07:00
DIBuilder.cpp [DebugInfo] Fortran module DebugInfo support in LLVM 2020-05-13 12:52:30 +05:30
DataLayout.cpp [IR][BFloat] Add BFloat IR type 2020-05-15 14:43:43 +01:00
DebugInfo.cpp [DebugInfo] Update loop metadata in stripNonLineTableDebugInfo 2020-05-01 11:36:05 -07:00
DebugInfoMetadata.cpp [DebugInfo] support for DW_AT_data_location in llvm 2020-05-15 11:33:17 +05:30
DebugLoc.cpp
DiagnosticHandler.cpp
DiagnosticInfo.cpp [NFC] Remove trailing space 2020-02-18 10:49:13 +08:00
DiagnosticPrinter.cpp
Dominators.cpp Change callbr to only define its output SSA variable on the normal 2020-04-23 19:36:44 -04:00
FPEnv.cpp [FPEnv] Use single enum to represent rounding mode 2020-04-09 13:26:47 +07:00
Function.cpp [SVE] Remove IITDescriptor::ScalableVecArgument 2020-05-21 08:15:10 +01:00
GVMaterializer.cpp
Globals.cpp Make explicit -fno-semantic-interposition (in -fpic mode) infer dso_local 2020-05-25 20:48:18 -07:00
IRBuilder.cpp Clean up usages of asserting vector getters in Type 2020-04-10 14:18:47 -07:00
IRPrintingPasses.cpp [PassInstrumentation] Remove excess newline for the new pass manager 2019-11-28 17:20:17 -08:00
InlineAsm.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
Instruction.cpp [Instruction] Set metadata uses to undef on deletion 2020-05-21 15:58:12 -07:00
Instructions.cpp Give helpers internal linkage. NFC. 2020-05-19 22:16:37 +02:00
IntrinsicInst.cpp [NFC] clang-format IntrinsicInst.h|cpp 2020-04-15 12:05:23 +02:00
LLVMBuild.txt
LLVMContext.cpp [NFC][DwarfDebug] Add test for variables with a single location which 2020-05-11 11:49:11 +02:00
LLVMContextImpl.cpp [IR][BFloat] Add BFloat IR type 2020-05-15 14:43:43 +01:00
LLVMContextImpl.h [IR][BFloat] Add BFloat IR type 2020-05-15 14:43:43 +01:00
LLVMRemarkStreamer.cpp Avoid including FileSystem.h from MemoryBuffer.h 2020-02-29 12:30:23 -08:00
LegacyPassManager.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
MDBuilder.cpp [MDBuilder] Don't use stable sort for sorting integers. 2020-03-28 21:19:46 +01:00
Mangler.cpp [NFC] Rename *ByValOrInalloca* to *PassPointeeByValue* 2020-04-30 09:42:13 -07:00
Metadata.cpp [APFloat] Make use of new overloaded comparison operators. NFC. 2020-03-06 16:42:53 +00:00
MetadataImpl.h
Module.cpp Make explicit -fno-semantic-interposition (in -fpic mode) infer dso_local 2020-05-25 20:48:18 -07:00
ModuleSummaryIndex.cpp [ADT][NFC] SCCIterator: Change hasLoop() to hasCycle() 2020-03-01 19:17:21 +02:00
Operator.cpp [Attributor] Use AAValueConstantRange to infer dereferencability. 2020-05-13 16:44:15 -05:00
OptBisect.cpp
Pass.cpp [Pass] Ensure we don't include PassSupport.h or PassAnalysisSupport.h directly 2020-04-26 12:58:20 +01:00
PassInstrumentation.cpp
PassManager.cpp Add PassManagerImpl.h to hide implementation details 2020-02-03 11:15:55 -08:00
PassRegistry.cpp [Pass] Ensure we don't include PassSupport.h or PassAnalysisSupport.h directly 2020-04-26 12:58:20 +01:00
PassTimingInfo.cpp [TimePasses] Small fix in "-time-passes" flag that makes it more stable 2020-04-08 15:59:45 +00:00
ProfileSummary.cpp [ProfileSummary] Add the PartialProfileRatio field in ProfileSummary metadata. 2020-05-21 09:12:23 -07:00
SafepointIRVerifier.cpp [Support] Split MallocAllocator out of Allocator.h 2020-01-24 17:29:32 -08:00
Statepoint.cpp
SymbolTableListTraitsImpl.h [IR] Lazily number instructions for local dominance queries 2020-02-18 14:44:24 -08:00
Type.cpp [IR][BFloat] Add BFloat IR type 2020-05-15 14:43:43 +01:00
TypeFinder.cpp [NFC] Fixes -Wrange-loop-analysis warnings 2020-01-01 20:01:37 +01:00
Use.cpp [NFC] Remove waymarking because it improves performances 2020-04-17 11:27:10 +02:00
User.cpp [NFC] Remove waymarking because it improves performances 2020-04-17 11:27:10 +02:00
Value.cpp Make Value::getPointerAlignment() return an Align, not a MaybeAlign. 2020-05-20 16:37:20 -07:00
ValueSymbolTable.cpp NFC: Clean up the implementation of StringPool a bit, and remove dependence on some "implicitly MallocAllocator" based methods on StringMapEntry. This allows reducing the #includes in StringMapEntry.h. 2020-04-12 16:37:17 -07:00
Verifier.cpp Add verifier check that musttail and preallocated are not used together 2020-05-18 11:24:59 -07:00