llvm-project/llvm/lib/Transforms/IPO
Amanieu d'Antras caa2a829cd [MergeFunctions] Preserve symbols used llvm.used/llvm.compiler.used
llvm.used and llvm.compiler.used are often used with inline assembly
that refers to a specific symbol so that the symbol is kept through to
the linker even though there are no references to it from LLVM IR.

This fixes the MergeFunctions pass to preserve references to these
symbols in llvm.used/llvm.compiler.used so they are not deleted from the
IR. This doesn't prevent these functions from being merged, but
guarantees that an alias or thunk with the expected symbol name is kept
in the IR.

Differential Revision: https://reviews.llvm.org/D127751
2022-06-16 21:36:39 +01:00
..
AlwaysInliner.cpp Cleanup includes: Transforms/IPO 2022-03-22 10:06:28 +01:00
Annotation2Metadata.cpp
ArgumentPromotion.cpp [ArgPromotion] Make a non-byval promotion attempt first 2022-05-12 16:44:52 +02:00
Attributor.cpp Revert "[Attributor] Ensure to use the proper liveness AA" 2022-06-10 14:05:09 -07:00
AttributorAttributes.cpp [NFC][Alignment] Use getAlign in Attributor classes 2022-06-13 15:13:05 +00:00
BarrierNoopPass.cpp
BlockExtractor.cpp [Support] Make report_fatal_error respect its GenCrashDiag argument so it doesn't generate a backtrace 2022-05-30 19:19:23 +01:00
CMakeLists.txt [llvm][Inline] Add a module level inliner 2021-11-09 11:03:29 +08:00
CalledValuePropagation.cpp [NFC] Remove unnecessary "#include"s from header files 2022-02-23 01:20:48 -08:00
ConstantMerge.cpp [IPO] Use make_early_inc_range (NFC) 2021-09-14 08:59:36 -07:00
CrossDSOCFI.cpp Cleanup includes: Transforms/IPO 2022-03-22 10:06:28 +01:00
DeadArgumentElimination.cpp [llvm] Add DW_CC_nocall to function debug metadata when either return values or arguments are removed 2022-06-15 03:30:15 +05:30
ElimAvailExtern.cpp
ExtractGV.cpp Cleanup includes: Transforms/IPO 2022-03-22 10:06:28 +01:00
ForceFunctionAttrs.cpp Cleanup includes: final pass 2022-03-29 09:00:21 +02:00
FunctionAttrs.cpp Cleanup includes: Transforms/IPO 2022-03-22 10:06:28 +01:00
FunctionImport.cpp Cleanup includes: Transforms/IPO 2022-03-22 10:06:28 +01:00
FunctionSpecialization.cpp [FuncSpec]Fix assertion failure when value is not added to solver 2022-06-10 18:45:53 +08:00
GlobalDCE.cpp [llvm] Remove unneeded cl::ZeroOrMore for cl::opt options. NFC 2022-06-03 21:59:05 -07:00
GlobalOpt.cpp [NFC] Remove commented cerr debugging loggings 2022-06-08 15:58:06 +08:00
GlobalSplit.cpp [Transforms] Use make_early_inc_range (NFC) 2021-11-02 18:13:23 -07:00
HotColdSplitting.cpp Add !nosanitize to FixedMetadataKinds 2022-05-27 09:46:13 +08:00
IPO.cpp
IROutliner.cpp [llvm] Use contains (NFC) 2022-06-11 11:46:16 -07:00
InferFunctionAttrs.cpp Reapply "[BuildLibCalls] Introduce getOrInsertLibFunc() for use when building 2022-05-02 19:37:00 +02:00
InlineSimple.cpp Cleanup includes: Transforms/IPO 2022-03-22 10:06:28 +01:00
Inliner.cpp [mlgo] Fix accounting for SCC splits 2022-06-15 10:53:23 -07:00
Internalize.cpp Cleanup includes: Transforms/IPO 2022-03-22 10:06:28 +01:00
LoopExtractor.cpp Cleanup includes: Transforms/IPO 2022-03-22 10:06:28 +01:00
LowerTypeTests.cpp Use llvm::less_second (NFC) 2022-06-04 22:48:32 -07:00
MergeFunctions.cpp [MergeFunctions] Preserve symbols used llvm.used/llvm.compiler.used 2022-06-16 21:36:39 +01:00
ModuleInliner.cpp [llvm][ModuleInliner] Refactor InlineSizePriority and PriorityInlineOrder 2022-06-02 23:40:26 +08:00
OpenMPOpt.cpp Revert "[Attributor] Replace AAValueSimplify with AAPotentialValues" 2022-06-09 17:04:01 +02:00
PartialInlining.cpp Remove unneeded cl::ZeroOrMore for cl::opt options 2022-06-04 00:10:42 -07:00
PassManagerBuilder.cpp Remove unneeded cl::ZeroOrMore for cl::opt/cl::list options 2022-06-05 00:31:44 -07:00
PruneEH.cpp Cleanup includes: Transforms/IPO 2022-03-22 10:06:28 +01:00
SCCP.cpp Cleanup includes: Transform/Scalar 2022-03-03 07:56:34 +01:00
SampleContextTracker.cpp Cleanup includes: final pass 2022-03-29 09:00:21 +02:00
SampleProfile.cpp Remove unneeded cl::ZeroOrMore for cl::opt/cl::list options 2022-06-05 00:31:44 -07:00
SampleProfileProbe.cpp Cleanup includes: Transforms/IPO 2022-03-22 10:06:28 +01:00
StripDeadPrototypes.cpp [IPO] Use make_early_inc_range (NFC) 2021-09-14 08:59:36 -07:00
StripSymbols.cpp [Transforms] Use {DenseSet,SetVector,SmallPtrSet}::contains (NFC) 2021-10-31 07:57:32 -07:00
SyntheticCountsPropagation.cpp Remove unneeded cl::ZeroOrMore for cl::opt/cl::list options 2022-06-05 00:31:44 -07:00
ThinLTOBitcodeWriter.cpp Cleanup includes: Transforms/IPO 2022-03-22 10:06:28 +01:00
WholeProgramDevirt.cpp Remove unneeded cl::ZeroOrMore for cl::opt/cl::list options 2022-06-05 00:31:44 -07:00