llvm-project/llvm/lib/IR
Fangrui Song 54fb3ca96e [ThinLTO] Add Visibility bits to GlobalValueSummary::GVFlags
Imported functions and variable get the visibility from the module supplying the
definition.  However, non-imported definitions do not get the visibility from
(ELF) the most constraining visibility among all modules (Mach-O) the visibility
of the prevailing definition.

This patch

* adds visibility bits to GlobalValueSummary::GVFlags
* computes the result visibility and propagates it to all definitions

Protected/hidden can imply dso_local which can enable some optimizations (this
is stronger than GVFlags::DSOLocal because the implied dso_local can be
leveraged for ELF -shared while default visibility dso_local has to be cleared
for ELF -shared).

Note: we don't have summaries for declarations, so for ELF if a declaration has
the most constraining visibility, the result visibility may not be that one.

Differential Revision: https://reviews.llvm.org/D92900
2021-01-27 10:43:51 -08:00
..
AbstractCallSite.cpp Remove getNumUses() comparisons (NFC) 2020-05-02 11:05:19 +02:00
AsmWriter.cpp [ThinLTO] Add Visibility bits to GlobalValueSummary::GVFlags 2021-01-27 10:43:51 -08:00
Assumptions.cpp [Clang][Attr] Introduce the `assume` function attribute 2020-12-15 16:51:34 -06:00
AttributeImpl.h Reapply "OpaquePtr: Add type to sret attribute" 2020-10-16 11:05:02 -04:00
Attributes.cpp Support for instrumenting only selected files or functions 2021-01-26 17:13:34 -08:00
AutoUpgrade.cpp Revert "[ObjC][ARC] Annotate calls with attributes instead of emitting retainRV" 2021-01-25 13:53:38 -08:00
BasicBlock.cpp [OpenMPIRBuilder] Implement tileLoops. 2021-01-23 19:39:29 -06:00
CMakeLists.txt [HIP] Support __managed__ attribute 2021-01-22 11:43:58 -05:00
Comdat.cpp
ConstantFold.cpp [Constant] Add containsPoisonElement 2021-01-06 12:10:33 +09:00
ConstantFold.h Remove "mask" operand from shufflevector. 2020-03-31 13:08:59 -07:00
ConstantRange.cpp [ConstantRange] Introduce getMinSignedBits() method 2020-09-22 21:37:30 +03:00
Constants.cpp [llvm] Use llvm::all_of (NFC) 2021-01-06 18:27:36 -08:00
ConstantsContext.h [IR] Add classof methods to ConstantExpr subclasses. 2020-07-01 11:56:12 -07:00
Core.cpp [llvm] Don't include StringSwitch.h where unnecessary (NFC) 2021-01-21 19:59:48 -08:00
DIBuilder.cpp [DebugInfo] Support Fortran 'use <external module>' statement. 2020-12-18 13:10:57 -05:00
DataLayout.cpp [IR] Allow scalable vectors in structs to support intrinsics returning multiple values. 2021-01-17 23:29:51 -08:00
DebugInfo.cpp Migrate deprecated DebugLoc::get to DILocation::get 2020-12-11 12:45:22 -08:00
DebugInfoMetadata.cpp [Debuginfo][DW_OP_implicit_pointer] (1/7) Support for DW_OP_LLVM_implicit_pointer 2021-01-15 14:45:04 +05:30
DebugLoc.cpp [IR] Delete unused ReplaceLast in DebugLoc::appendInlineAt 2021-01-08 23:28:22 -08:00
DiagnosticHandler.cpp
DiagnosticInfo.cpp [Support] Introduce a new InstructionCost class 2020-12-11 08:12:54 +00:00
DiagnosticPrinter.cpp
Dominators.cpp [DomTree] Make assert more precise 2020-10-22 22:40:06 +02:00
FPEnv.cpp Fix some clang-tidy namespace closing comments warnings. NFC. 2020-06-26 09:58:21 +01:00
Function.cpp Allow nonnull/align attribute to accept poison 2021-01-20 11:31:23 +09:00
GVMaterializer.cpp
Globals.cpp Add a default address space for globals to DataLayout 2020-11-20 15:46:52 +00:00
IRBuilder.cpp [IRBuilder] "Zero"-initialize SmallVector (NFC) 2021-01-17 10:39:47 -08:00
IRPrintingPasses.cpp [NewPM] Support --print-before/after in NPM 2020-12-03 16:52:14 -08:00
InlineAsm.cpp
Instruction.cpp Revert "[ObjC][ARC] Annotate calls with attributes instead of emitting retainRV" 2021-01-25 13:53:38 -08:00
Instructions.cpp [IR] CallBase::getBundleOpInfoForOperand - ensure Current iterator is defined. NFCI. 2021-01-04 15:30:15 +00:00
IntrinsicInst.cpp [VP] Build VP SDNodes 2020-12-09 11:36:51 +01:00
LLVMContext.cpp [Remarks][2/2] Expand remarks hotness threshold option support in more tools 2020-11-30 21:55:50 -08:00
LLVMContextImpl.cpp [llvm] Construct SmallVector with iterator ranges (NFC) 2021-01-16 09:40:53 -08:00
LLVMContextImpl.h [X86] Add x86_amx type for intel AMX. 2020-12-30 13:52:13 +08:00
LLVMRemarkStreamer.cpp [Remarks][2/2] Expand remarks hotness threshold option support in more tools 2020-11-30 21:55:50 -08:00
LegacyPassManager.cpp [LegacyPM] Update InversedLastUser on the fly. NFC. 2021-01-22 09:48:54 +00:00
MDBuilder.cpp [CSSPGO] Pseudo probe encoding and emission. 2020-12-10 17:29:28 -08:00
Mangler.cpp [llvm] Use isAlpha/isAlnum (NFC) 2021-01-22 23:25:03 -08:00
Metadata.cpp [Analysis, IR, CodeGen] Use llvm::erase_if (NFC) 2020-12-20 09:19:35 -08:00
MetadataImpl.h
Module.cpp Refactor how -fno-semantic-interposition sets dso_local on default visibility external linkage definitions 2020-12-31 13:59:45 -08:00
ModuleSummaryIndex.cpp [ThinLTO] Add Visibility bits to GlobalValueSummary::GVFlags 2021-01-27 10:43:51 -08:00
Operator.cpp Fix some clang-tidy namespace closing comments warnings. NFC. 2020-06-26 09:58:21 +01:00
OptBisect.cpp Make NPM OptBisectInstrumentation use global singleton OptBisect 2020-12-20 13:47:56 -08:00
Pass.cpp [PM] Avoid duplicates in the Used/Preserved/Required sets 2021-01-20 13:55:18 +01:00
PassInstrumentation.cpp [NewPM] Don't error when there's an unrecognized pass name 2021-01-07 22:33:32 -08:00
PassManager.cpp [NewPM] Make pass adaptors less templatey 2020-12-04 08:30:50 -08:00
PassRegistry.cpp [Analysis, IR] Use *Map::lookup (NFC) 2020-12-29 19:23:24 -08:00
PassTimingInfo.cpp [Time-report] Add a flag -ftime-report={per-pass,per-pass-run} to control the pass timing aggregation 2020-12-08 10:13:19 -08:00
PrintPasses.cpp [IR] Use llvm::is_contained (NFC) 2020-12-08 19:06:37 -08:00
ProfileSummary.cpp ProfileSummary.cpp - use auto const& iterator in for-range loop to avoid copies. NFCI. 2020-09-21 16:54:26 +01:00
PseudoProbe.cpp [CSSPGO] Consume pseudo-probe-based AutoFDO profile 2020-12-16 15:57:18 -08:00
ReplaceConstant.cpp [HIP] Support __managed__ attribute 2021-01-22 11:43:58 -05:00
SafepointIRVerifier.cpp [Analysis, IR] Use *Map::lookup (NFC) 2020-12-29 19:23:24 -08:00
Statepoint.cpp [Statepoint] Start the process of removing old interfaces 2020-06-03 20:00:52 -07:00
StructuralHash.cpp (Expensive) Check for Loop, SCC and Region pass return status 2020-08-28 07:56:35 +02:00
SymbolTableListTraitsImpl.h
Type.cpp [IR] Allow scalable vectors in structs to support intrinsics returning multiple values. 2021-01-17 23:29:51 -08:00
TypeFinder.cpp
Use.cpp [IR] Simplify Use::swap. NFCI. 2020-07-21 12:15:12 +01:00
User.cpp [NFC] Edit the comment in User::replaceUsesOfWith 2020-07-29 10:02:04 +08:00
Value.cpp [NFC][LICM] Minor improvements to debug output 2021-01-11 18:02:49 -08: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 Support for instrumenting only selected files or functions 2021-01-26 17:13:34 -08:00