forked from OSchip/llvm-project
978ba61536
The current llvm.mem.parallel_loop_access metadata has a problem in that it uses LoopIDs. LoopID unfortunately is not loop identifier. It is neither unique (there's even a regression test assigning the some LoopID to multiple loops; can otherwise happen if passes such as LoopVersioning make copies of entire loops) nor persistent (every time a property is removed/added from a LoopID's MDNode, it will also receive a new LoopID; this happens e.g. when calling Loop::setLoopAlreadyUnrolled()). Since most loop transformation passes change the loop attributes (even if it just to mark that a loop should not be processed again as llvm.loop.isvectorized does, for the versioned and unversioned loop), the parallel access information is lost for any subsequent pass. This patch unlinks LoopIDs and parallel accesses. llvm.mem.parallel_loop_access metadata on instruction is replaced by llvm.access.group metadata. llvm.access.group points to a distinct MDNode with no operands (avoiding the problem to ever need to add/remove operands), called "access group". Alternatively, it can point to a list of access groups. The LoopID then has an attribute llvm.loop.parallel_accesses with all the access groups that are parallel (no dependencies carries by this loop). This intentionally avoid any kind of "ID". Loops that are clones/have their attributes modifies retain the llvm.loop.parallel_accesses attribute. Access instructions that a cloned point to the same access group. It is not necessary for each access to have it's own "ID" MDNode, but those memory access instructions with the same behavior can be grouped together. The behavior of llvm.mem.parallel_loop_access is not changed by this patch, but should be considered deprecated. Differential Revision: https://reviews.llvm.org/D52116 llvm-svn: 349725 |
||
---|---|---|
.. | ||
AArch64 | ||
AMDGPU | ||
ARM | ||
Hexagon | ||
Mips | ||
PowerPC | ||
RISCV | ||
SPARC | ||
X86 | ||
2002-05-21-PHIElimination.ll | ||
2002-09-24-PHIAssertion.ll | ||
2003-03-07-DominateProblem.ll | ||
2003-08-05-InvokeCrash.ll | ||
2003-08-17-BranchFold.ll | ||
2003-08-17-BranchFoldOrdering.ll | ||
2003-08-17-FoldSwitch-dbg.ll | ||
2003-08-17-FoldSwitch.ll | ||
2004-12-10-SimplifyCFGCrash.ll | ||
2005-06-16-PHICrash.ll | ||
2005-08-01-PHIUpdateFail.ll | ||
2005-10-02-InvokeSimplify.ll | ||
2005-12-03-IncorrectPHIFold.ll | ||
2006-02-17-InfiniteUnroll.ll | ||
2006-06-12-InfLoop.ll | ||
2006-08-03-Crash.ll | ||
2006-10-19-UncondDiv.ll | ||
2006-12-08-Ptr-ICmp-Branch.ll | ||
2007-11-22-InvokeNoUnwind.ll | ||
2007-12-21-Crash.ll | ||
2008-01-02-hoist-fp-add.ll | ||
2008-05-16-PHIBlockMerge.ll | ||
2008-07-13-InfLoopMiscompile.ll | ||
2008-09-08-MultiplePred.ll | ||
2008-09-17-SpeculativeHoist.ll | ||
2008-10-03-SpeculativelyExecuteBeforePHI.ll | ||
2008-12-06-SingleEntryPhi.ll | ||
2008-12-16-DCECond.ll | ||
2009-01-18-PHIPropCrash.ll | ||
2009-05-12-externweak.ll | ||
2010-03-30-InvokeCrash.ll | ||
2011-03-08-UnreachableUse.ll | ||
2011-09-05-TrivialLPad.ll | ||
BrUnwind.ll | ||
ConditionalTrappingConstantExpr.ll | ||
CoveredLookupTable.ll | ||
DeadSetCC.ll | ||
EmptyBlockMerge.ll | ||
EqualPHIEdgeBlockMerge.ll | ||
ForwardSwitchConditionToPHI.ll | ||
HoistCode.ll | ||
InfLoop.ll | ||
MagicPointer.ll | ||
PHINode.ll | ||
PR9946.ll | ||
PR16069.ll | ||
PR17073.ll | ||
PR25267.ll | ||
PR27615-simplify-cond-br.ll | ||
PR29163.ll | ||
PR30210.ll | ||
PhiBlockMerge.ll | ||
PhiBlockMerge2.ll | ||
PhiEliminate.ll | ||
PhiEliminate2.ll | ||
PhiEliminate3.ll | ||
PhiNoEliminate.ll | ||
SpeculativeExec.ll | ||
UncondBranchToHeader.ll | ||
UncondBranchToReturn.ll | ||
UnreachableEliminate.ll | ||
assume.ll | ||
attr-convergent.ll | ||
attr-noduplicate.ll | ||
basictest.ll | ||
branch-cond-merge.ll | ||
branch-cond-prop.ll | ||
branch-fold-dbg.ll | ||
branch-fold-test.ll | ||
branch-fold-three.ll | ||
branch-fold-threshold.ll | ||
branch-fold.ll | ||
branch-phi-thread.ll | ||
bug-25299.ll | ||
clamp.ll | ||
combine-parallel-mem-md.ll | ||
common-dest-folding.ll | ||
critedge-assume.ll | ||
dbginfo.ll | ||
dce-cond-after-folding-terminator.ll | ||
div-rem-pairs.ll | ||
duplicate-landingpad.ll | ||
duplicate-phis.ll | ||
empty-catchpad.ll | ||
empty-cleanuppad.ll | ||
extract-cost.ll | ||
fold-branch-debuginvariant.ll | ||
fold-debug-info.ll | ||
gepcost.ll | ||
guards.ll | ||
hoist-common-code.ll | ||
hoist-dbgvalue-inlined.ll | ||
hoist-dbgvalue.ll | ||
hoist-with-range.ll | ||
implied-and-or.ll | ||
implied-cond-matching-false-dest.ll | ||
implied-cond-matching-imm.ll | ||
implied-cond-matching.ll | ||
implied-cond.ll | ||
indirectbr.ll | ||
inline-asm-sink.ll | ||
invoke.ll | ||
invoke_unwind.ll | ||
iterative-simplify.ll | ||
lifetime.ll | ||
merge-cleanuppads.ll | ||
merge-cond-stores-2.ll | ||
merge-cond-stores.ll | ||
multiple-phis.ll | ||
no-md-sink.ll | ||
no_speculative_loads_with_asan.ll | ||
no_speculative_loads_with_tsan.ll | ||
noreturn-call.ll | ||
opt-for-fuzzing.ll | ||
phi-undef-loadstore.ll | ||
pr33605.ll | ||
pr34131.ll | ||
pr35774.ll | ||
pr39807.ll | ||
preserve-branchweights-partial.ll | ||
preserve-branchweights-switch-create.ll | ||
preserve-branchweights.ll | ||
preserve-llvm-loop-metadata.ll | ||
preserve-load-metadata-2.ll | ||
preserve-load-metadata-3.ll | ||
preserve-load-metadata.ll | ||
preserve-make-implicit-on-switch-to-br.ll | ||
preserve-store-alignment.ll | ||
rangereduce.ll | ||
remove-debug-2.ll | ||
remove-debug.ll | ||
return-merge.ll | ||
seh-nounwind.ll | ||
select-gep.ll | ||
sink-common-code.ll | ||
speculate-call.ll | ||
speculate-dbgvalue.ll | ||
speculate-math.ll | ||
speculate-store.ll | ||
speculate-vector-ops.ll | ||
speculate-with-offset.ll | ||
statepoint-invoke-unwind.ll | ||
suppress-zero-branch-weights.ll | ||
switch-dead-default.ll | ||
switch-masked-bits.ll | ||
switch-on-const-select.ll | ||
switch-range-to-icmp.ll | ||
switch-simplify-crash.ll | ||
switch-to-br.ll | ||
switch-to-icmp.ll | ||
switch-to-select-multiple-edge-per-block-phi.ll | ||
switch-to-select-two-case.ll | ||
switch_create-custom-dl.ll | ||
switch_create.ll | ||
switch_switch_fold.ll | ||
switch_thread.ll | ||
switch_undef.ll | ||
trap-debugloc.ll | ||
trap-no-null-opt-debugloc.ll | ||
trapping-load-unreachable.ll | ||
two-entry-phi-return.ll | ||
unreachable-blocks.ll | ||
unreachable-cleanuppad.ll | ||
volatile-phioper.ll | ||
wineh-unreachable.ll |