1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00
llvm-mirror/test/Transforms
Gor Nishanov 680815e118 [coroutines] Store an address of destroy OR cleanup part in the coroutine frame.
Summary:
If heap allocation of a coroutine is elided, we need to make sure that we will update an address stored in the coroutine frame from f.destroy to f.cleanup.
Before this change, CoroSplit synthesized these stores after coro.begin:

```
    store void (%f.Frame*)* @f.resume, void (%f.Frame*)** %resume.addr
    store void (%f.Frame*)* @f.destroy, void (%f.Frame*)** %destroy.addr

```

In those cases where we did heap elision, but were not able to devirtualize all indirect calls, destroy call will attempt to "free" the coroutine frame stored on the stack. Oops.

Now we use select to put an appropriate coroutine subfunction in the destroy slot. As bellow:

```
    store void (%f.Frame*)* @f.resume, void (%f.Frame*)** %resume.addr
    %0 = select i1 %need.alloc, void (%f.Frame*)* @f.destroy, void (%f.Frame*)* @f.cleanup
    store void (%f.Frame*)* %0, void (%f.Frame*)** %destroy.addr
```

Reviewers: majnemer

Subscribers: mehdi_amini, llvm-commits

Differential Revision: https://reviews.llvm.org/D25377

llvm-svn: 283625
2016-10-08 00:22:50 +00:00
..
ADCE
AddDiscriminators Do not assign new discriminator for all intrinsics. 2016-08-05 17:56:49 +00:00
AlignmentFromAssumptions
ArgumentPromotion
AtomicExpand
BBVectorize Revert -r278267 [ValueTracking] An improvement to IR ValueTracking on Non-negative Integers 2016-08-22 13:14:07 +00:00
BDCE
BranchFolding
CodeExtractor CodeExtractor : Add ability to preserve profile data. 2016-08-02 02:15:45 +00:00
CodeGenPrepare
ConstantHoisting
ConstantMerge
ConstProp Don't remove side effecting instructions due to ConstantFoldInstruction 2016-07-22 04:54:44 +00:00
Coroutines [coroutines] Store an address of destroy OR cleanup part in the coroutine frame. 2016-10-08 00:22:50 +00:00
CorrelatedValuePropagation llvm/test/Transforms/CorrelatedValuePropagation/alloca.ll REQUIRES +Asserts. 2016-09-15 09:45:31 +00:00
CountingFunctionInserter Add a counter-function insertion pass 2016-09-01 09:42:39 +00:00
CrossDSOCFI
DCE
DeadArgElim DeadArgElim: Don't mark swifterror arguments as unused 2016-09-21 15:29:08 +00:00
DeadStoreElimination [DSE] Don't remove stores made live by a call which unwinds. 2016-08-12 01:09:53 +00:00
EarlyCSE [EarlyCSE] Optionally use MemorySSA. NFC. 2016-08-31 19:24:10 +00:00
EliminateAvailableExternally
Float2Int
ForcedFunctionAttrs
FunctionAttrs [FunctionAttrs] Don't try to infer returned if it is already on an argument 2016-09-12 16:04:59 +00:00
FunctionImport [thinlto] Don't decay threshold for hot callsites 2016-09-30 03:01:17 +00:00
GCOVProfiling DebugInfo: New metadata representation for global variables. 2016-09-13 01:12:59 +00:00
GlobalDCE
GlobalMerge DebugInfo: New metadata representation for global variables. 2016-09-13 01:12:59 +00:00
GlobalOpt [GlobalOpt] Dead Eliminate declarations 2016-09-15 20:26:27 +00:00
GuardWidening
GVN [ValueTracking] Fix crash in GetPointerBaseWithConstantOffset() 2016-10-07 14:23:29 +00:00
GVNHoist Revert r282168 "GVN-hoist: fix store past load dependence analysis (PR30216)" 2016-09-22 21:20:53 +00:00
IndVarSimplify Wisely choose sext or zext when widening IV. 2016-09-28 23:39:39 +00:00
InferFunctionAttrs [InferAttributes] Don't access parameters that don't exist. 2016-09-20 23:10:31 +00:00
Inline Don't filter diagnostics written as YAML to the output file 2016-10-04 18:13:45 +00:00
InstCombine [InstCombine] Don't unpack arrays that are too large (part 2). 2016-10-07 21:53:09 +00:00
InstMerge
InstSimplify [InstSimplify] allow or-of-icmps folds with vector splat constants 2016-09-28 14:27:21 +00:00
Internalize
IPConstantProp
IRCE [IRCE] Create llvm::Loop instances for cloned out loops 2016-08-14 01:04:46 +00:00
JumpThreading Jump threading: avoid trying to split edge into landingpad block (PR27840) 2016-10-03 18:18:04 +00:00
LCSSA
LICM
LoadCombine
LoadStoreVectorizer Add handling of !invariant.load to PropagateMetadata. 2016-09-11 01:39:08 +00:00
LoopDataPrefetch [PM] Port LoopDataPrefetch AArch64 tests to new pass manager 2016-08-22 12:59:58 +00:00
LoopDeletion
LoopDistribute [BPI] Add new LazyBPI analysis 2016-07-28 23:31:12 +00:00
LoopIdiom Target independent codesize heuristics for Loop Idiom Recognition 2016-08-11 18:28:33 +00:00
LoopInterchange [LoopInterchange] Track all dependencies, not just anti dependencies. 2016-09-21 19:16:47 +00:00
LoopLoadElim
LoopReroll
LoopRotate
LoopSimplify [LoopSimplify] Rebuild LCSSA for the inner loop after separating nested loops. 2016-08-09 22:44:56 +00:00
LoopSimplifyCFG
LoopStrengthReduce [LSR] Don't try and create post-inc expressions on non-rotated loops 2016-08-15 07:53:03 +00:00
LoopUnroll Revert test change in r282894 as it's broken in some platforms. 2016-09-30 19:25:23 +00:00
LoopUnswitch
LoopVectorize [LV] Don't mark multi-use branch conditions uniform 2016-10-07 15:20:13 +00:00
LoopVersioning
LoopVersioningLICM [Loop Vectorizer] Fixed memory confilict checks. 2016-08-28 08:53:53 +00:00
LowerAtomic
LowerExpectIntrinsic [Profile] handle select instruction in 'expect' lowering 2016-09-02 22:03:40 +00:00
LowerGuardIntrinsic [PM] Port LowerGuardIntrinsic to the new PM. 2016-07-28 22:08:41 +00:00
LowerInvoke [PM] Port LowerInvoke to the new pass manager 2016-08-12 17:28:27 +00:00
LowerSwitch
LowerTypeTests Revert r277556. Add -lowertypetests-bitsets-level to control bitsets generation 2016-09-27 00:29:53 +00:00
Mem2Reg
MemCpyOpt [MemCpy] Add comments for r279769 2016-08-25 21:03:46 +00:00
MergeFunc
MetaRenamer
NameAnonGlobals [ThinLTO] Ensure anonymous globals renamed even at -O0 2016-09-17 20:40:16 +00:00
NaryReassociate [PM] Port NaryReassociate to the new PM 2016-07-21 22:28:52 +00:00
ObjCARC [ObjCARC] Traverse chain downwards to replace uses of argument passed to 2016-09-13 23:43:11 +00:00
PartiallyInlineLibCalls
PGOProfile [PGO] Create weak alias for the renamed Comdat function 2016-10-06 20:38:13 +00:00
PhaseOrdering
PlaceSafepoints
PreISelIntrinsicLowering
PruneEH [PruneEH] Be correct in the face IPO 2016-10-03 19:35:30 +00:00
Reassociate [Reassociate] Add test for PR28367. 2016-08-18 13:22:37 +00:00
Reg2Mem
RewriteStatepointsForGC [RS4GC] Strengthen coverage: add more tests 2016-10-07 20:34:00 +00:00
SafeStack [safestack] Fix assertion failure in stack coloring. 2016-09-16 22:04:10 +00:00
SampleProfile Change the basic block weight calculation algorithm to use max instead of voting. 2016-09-21 16:26:51 +00:00
Scalarizer Scalarizer: Support scalarizing intrinsics 2016-07-25 20:02:54 +00:00
SCCP [SCCP] Don't delete side-effecting instructions 2016-08-24 18:10:21 +00:00
SeparateConstOffsetFromGEP
SimplifyCFG [ARM] Don't convert switches to lookup tables of pointers with ROPI/RWPI 2016-10-07 08:48:24 +00:00
Sink
SLPVectorizer [SLPVectorizer] Fix for PR25748: reduction vectorization after loop 2016-10-07 09:39:22 +00:00
SpeculativeExecution [PM] Port SpeculativeExecution to the new PM 2016-08-01 21:48:33 +00:00
SROA Fix revision 281960 2016-09-22 07:56:23 +00:00
StraightLineStrengthReduce
StripDeadPrototypes
StripSymbols DebugInfo: New metadata representation for global variables. 2016-09-13 01:12:59 +00:00
StructurizeCFG
TailCallElim
Util Revert "Add -strip-nonlinetable-debuginfo capability" 2016-10-06 18:30:26 +00:00
WholeProgramDevirt WholeProgramDevirt: generate more detailed and accurate remarks. 2016-08-11 19:09:02 +00:00