1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00
llvm-mirror/test/Transforms/LICM
Nikita Popov ea8b19209c [LICM] Remove MaybePromotable set (PR50367)
The MaybePromotable set keeps track of loads/stores for which
promotion was not attempted yet. Normally, any load/stores that
are promoted in the current iteration will be removed from this
set, because they naturally MustAlias with the promoted value.
However, if the source program has UB with metadata claiming that
a store is NoAlias, while it is actually MustAlias, and multiple
different pointers are promoted in the same iteration, it can
happen that a store is removed that is still in the MaybePromotable
set, causing a use-after-free.

While this could be fixed by explicitly invalidating values in
MaybePromotable in the LoopPromoter, I'm going with the more
radical option of dropping the set entirely here and check all
load/stores on each promotion iteration. As promotion, and especially
repeated promotion, are quite rare, this doesn't seem to have any
impact on compile-time.

Fixes https://bugs.llvm.org/show_bug.cgi?id=50367.
2021-05-18 20:26:01 +02:00
..
AArch64
AMDGPU
Inputs
2003-02-26-LoopExitNotDominated.ll
2003-02-27-NestedLoopExitBlocks.ll
2003-02-27-PreheaderExitNodeUpdate.ll
2003-02-27-PreheaderProblem.ll
2003-02-27-StoreSinkPHIs.ll
2003-02-28-PromoteDifferentType.ll
2003-05-02-LoadHoist.ll
2003-12-11-SinkingToPHI.ll Re-apply "[lli] Make -jit-kind=orc the default JIT engine" 2021-03-30 12:08:26 +02:00
2004-09-14-AliasAnalysisInvalidate.ll
2004-11-17-UndefIndexCrash.ll
2006-09-12-DeadUserOfSunkInstr.ll
2007-05-22-VolatileSink.ll
2007-07-30-AliasSet.ll
2007-09-17-PromoteValue.ll
2007-09-24-PromoteNullValue.ll
2007-10-01-PromoteSafeValue.ll
2008-05-20-AliasSetVAArg.ll
2008-07-22-LoadGlobalConstant.ll
2009-12-10-LICM-Indbr-Crash.ll
2011-04-06-HoistMissedASTUpdate.ll
2011-04-06-PromoteResultOfPromotion.ll
2011-04-09-RAUW-AST.ll
2011-07-06-Alignment.ll
2014-09-10-doFinalizationAssert.ll
alias-set-tracker-loss.ll
AliasSetMemSet.ll
argmemonly-call.ll
assume.ll
atomics.ll
basictest.ll
bisect-state.ll
call-hoisting.ll
callbr-crash.ll
constexpr.ll
convergent.ll
crash.ll
debug-value.ll
dropped-tbaa.ll
explicit_guards.ll
extra-copies.ll
fence.ll
freeze.ll
funclet.ll
gc-relocate.ll [LICM] Fix a crash when sinking instructions w/token operands 2021-03-17 11:18:46 -07:00
guards.ll
hoist-alloc.ll [nofree] Restrict semantics to memory visible to caller 2021-04-16 11:38:55 -07:00
hoist-bitcast-load.ll
hoist-debuginvariant.ll
hoist-deref-load.ll Autogen some tests for ease of update 2021-03-22 11:06:29 -07:00
hoist-fast-fdiv.ll
hoist-invariant-load.ll
hoist-mustexec.ll
hoist-nounwind.ll
hoist-phi.ll
hoist-round.ll
hoisting-preheader-debugloc.ll
hoisting.ll
infinite_loops.ll
int_sideeffect.ll
invariant.start.ll
lcssa-ssa-promoter.ll
loopsink-pr38462.ll
loopsink-pr39570.ll
loopsink-pr39695.ll
loopsink.ll
no-hoist-prof.ll
no-preheader-test.ll
opt-remarks-conditional-load.ll
opt-remarks-intervening-store.ll
opt-remarks.ll
outer-loop-deleted-before-licm.ll
pr23608.ll
pr26843.ll
pr27262.ll
pr32129.ll
pr35342.ll
pr36228.ll
pr37323.ll
pr38513.ll
pr40317.ll
pr42969.ll
pr50367.ll [LICM] Remove MaybePromotable set (PR50367) 2021-05-18 20:26:01 +02:00
PR19798.ll
PR21582.ll
PR24013.ll
pragma-licm-disable.ll
preheader-safe.ll
Preserve-LCSSA.ll
promote-atomic.ll
promote-capture.ll [LICM] Make capture check more precise 2021-04-19 20:34:23 +02:00
promote-order.ll
promote-tls.ll
read-only-calls.ll
read-volatile-register.ll
scalar-promote-memmodel.ll
scalar-promote-unwind.ll
scalar-promote.ll
sink-debuginfo-preserve.ll
sink-foldable.ll
sink-promote.ll
sink-with-coroutine.ll
sink.ll
sinking.ll
speculate.ll
store-hoisting.ll
strlen.ll Reapply "[InferAttributes] Materialize all infered attributes for declaration"" and follow on patches. 2021-04-14 16:38:07 -07:00
unrolled-deeply-nested.ll
update-scev.ll
volatile-alias.ll