1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 12:12:47 +01:00
llvm-mirror/lib/Transforms/IPO
Shilei Tian 7cc27af3c6 [AbstractAttributor] Fold function calls to __kmpc_is_spmd_exec_mode if possible
In the device runtime there are many function calls to `__kmpc_is_spmd_exec_mode`
to query the execution mode of current kernels. In many cases, user programs
only contain target region executing in one mode. As a consequence, those runtime
function calls will only return one value. If we can get rid of these function
calls during compliation, it can potentially improve performance.

In this patch, we use `AAKernelInfo` to analyze kernel execution. Basically, for
each kernel (device) function `F`, we collect all kernel entries `K` that can
reach `F`. A new AA, `AAFoldRuntimeCall`, is created for each call site. In each
iteration, it will check all reaching kernel entries, and update the folded value
accordingly.

In the future we will support more function.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D105787
2021-07-13 22:28:35 -04:00
..
AlwaysInliner.cpp
Annotation2Metadata.cpp
ArgumentPromotion.cpp [OpaquePtr] Use byval type more 2021-07-13 09:34:34 -07:00
Attributor.cpp [Attributor][NFCI] Add UsedAssumedInformation to more interfaces 2021-07-11 19:18:03 -05:00
AttributorAttributes.cpp [Attributor][NFCI] Add UsedAssumedInformation to more interfaces 2021-07-11 19:18:03 -05:00
BarrierNoopPass.cpp
BlockExtractor.cpp
CalledValuePropagation.cpp
CMakeLists.txt Move Function Specialization to its correct location. NFC. 2021-06-11 15:00:10 +01:00
ConstantMerge.cpp
CrossDSOCFI.cpp
DeadArgumentElimination.cpp
ElimAvailExtern.cpp
ExtractGV.cpp
ForceFunctionAttrs.cpp [Attributes] Determine attribute properties from TableGen data 2021-07-12 22:13:38 +02:00
FunctionAttrs.cpp
FunctionImport.cpp
FunctionSpecialization.cpp [FuncSpec] Add an option to specializing literal constant 2021-06-30 11:26:44 +08:00
GlobalDCE.cpp
GlobalOpt.cpp [NFC][OpaquePtr] Use GlobalValue::getValueType() more 2021-07-09 09:55:41 -07:00
GlobalSplit.cpp
HotColdSplitting.cpp Calculate getTerminator only when necessary 2021-06-13 20:16:07 -07:00
InferFunctionAttrs.cpp
Inliner.cpp [NFC] Do not track calls to inlined intrinsics in IFI. 2021-07-13 10:18:23 +02:00
InlineSimple.cpp
Internalize.cpp [Internalize] Preserve variables externally initialized. 2021-07-08 10:48:19 -04:00
IPO.cpp
IROutliner.cpp [IROutliner] Adding DebugInfo handling for IR Outlined Functions 2021-06-15 10:57:08 -05:00
LoopExtractor.cpp
LowerTypeTests.cpp
MergeFunctions.cpp [OpaquePtr] Use GlobalValue::getValueType() more 2021-07-13 09:34:34 -07:00
OpenMPOpt.cpp [AbstractAttributor] Fold function calls to __kmpc_is_spmd_exec_mode if possible 2021-07-13 22:28:35 -04:00
PartialInlining.cpp
PassManagerBuilder.cpp [NewPM] Consistently use 'simplifycfg' rather than 'simplify-cfg' 2021-07-09 09:47:03 +02:00
PruneEH.cpp
SampleContextTracker.cpp
SampleProfile.cpp [AFDO] Merge function attributes after inlining 2021-07-09 16:47:12 -07:00
SampleProfileProbe.cpp [CSSPGO] Undoing the concept of dangling pseudo probe 2021-06-18 15:14:11 -07:00
SCCP.cpp
StripDeadPrototypes.cpp
StripSymbols.cpp
SyntheticCountsPropagation.cpp
ThinLTOBitcodeWriter.cpp Revert "ThinLTO: Fix inline assembly references to static functions with CFI" 2021-06-23 19:24:56 -07:00
WholeProgramDevirt.cpp [WPD] Don't optimize calls more than once 2021-06-24 13:28:09 -07:00