llvm-project/llvm/test/Transforms/JumpThreading
Bjorn Pettersson 297fb66484 Use a deterministic order when updating the DominatorTree
This solves a problem with non-deterministic output from opt due
to not performing dominator tree updates in a deterministic order.

The problem that was analysed indicated that JumpThreading was using
the DomTreeUpdater via llvm::MergeBasicBlockIntoOnlyPred. When
preparing the list of updates to send to DomTreeUpdater::applyUpdates
we iterated over a SmallPtrSet, which didn't give a well-defined
order of updates to perform.

The added domtree-updates.ll test case is an example that would
result in non-deterministic printouts of the domtree. Semantically
those domtree:s are equivalent, but it show the fact that when we
use the domtree iterator the order in which nodes are visited depend
on the order in which dominator tree updates are performed.

Since some passes (at least EarlyCSE) are iterating over nodes in the
dominator tree in a similar fashion as the domtree printer, then the
order in which transforms are applied by such passes, transitively,
also depend on the order in which dominator tree updates are
performed. And taking EarlyCSE as an example the end result could be
different depending on in which order the transforms are applied.

Reviewed By: nikic, kuhar

Differential Revision: https://reviews.llvm.org/D110292
2021-11-29 13:14:50 +01:00
..
2008-11-27-EntryMunge.ll
2010-08-26-and.ll
2011-04-02-SimplifyDeadBlock.ll
2011-04-14-InfLoop.ll
2012-07-19-NoSuccessorIndirectBr.ll
PR33357-lvi-recursion.ll
PR37745.ll
PR44611-across-header-hang.ll
aa-crash-phi-no-args.ll [BasicAA] Handle PHIs without incoming values gracefully 2021-06-07 21:39:01 +00:00
and-and-cond.ll [NFCI][SimplifyCFG] Mark all the SimplifyCFG tests that already don't invalidate DomTree as such 2020-12-17 01:03:49 +03:00
and-cond.ll [NFCI][SimplifyCFG] Mark all the SimplifyCFG tests that already don't invalidate DomTree as such 2020-12-17 01:03:49 +03:00
assume-edge-dom.ll
assume.ll [ValueTracking] Don't assume readonly function will return 2021-01-24 10:40:21 +01:00
basic.ll
bb-unreachable-from-entry.ll
branch-debug-info.ll
branch-debug-info2.ll [JumpThreading] merge debug info when merging select+br 2021-04-12 17:51:21 -07:00
branch-no-const.ll
callbr-edge-split.ll
codesize-loop.ll
combine-metadata.ll
compare.ll
conservative-lvi.ll
constant-fold-status.ll
crash.ll
ddt-crash.ll
ddt-crash2.ll OpaquePtr: Bulk update tests to use typed sret 2020-11-20 17:58:26 -05:00
ddt-crash3.ll Revert "[NFC] remove explicit default value for strboolattr attribute in tests" 2021-05-24 19:43:40 +02:00
ddt-crash4.ll
degenerate-phi.ll
divergent-target-test.ll [JumpThreading][NewPM] Skip when target has divergent CF 2021-01-04 16:08:08 -08:00
domtree-updates.ll Use a deterministic order when updating the DominatorTree 2021-11-29 13:14:50 +01:00
fold-not-thread.ll
free_instructions.ll Re-apply "[JumpThreading] Ignore free instructions" 2021-09-24 18:52:30 +02:00
freeze-lvi-edgevaluelocal.ll
freeze.ll
guards.ll [tests] Stablize tests for possible change in deref semantics 2021-07-14 13:05:43 -07:00
header-succ.ll
implied-cond.ll
indirectbr.ll
induction.ll
insert-placeholder-to-prevent-infinite-recursion.ll [LazyValueInfo] Insert an Overdefined placeholder to prevent infinite recursion 2021-05-07 16:05:50 +08:00
is_constant.ll
landing-pad.ll
loop-phi.ll
lvi-load.ll
lvi-tristate.ll [SimplifyCFG] Teach FoldValueComparisonIntoPredecessors() to preserve DomTree, part 1 2021-01-01 03:25:22 +03:00
ne-undef.ll
no-irreducible-loops.ll [SimplifyCFG] MergeBlockIntoPredecessor() already knows how to preserve DomTree 2020-12-17 01:03:49 +03:00
noalias-scope-decl.ll [JumpThreading] Clone noalias.scope.decl when threading blocks 2021-02-22 18:35:30 +01:00
nonnull-gep-out-of-bounds.ll For non-null pointer checks, do not descend through out-of-bounds GEPs 2021-04-09 14:09:23 +01:00
or-undef.ll
phi-copy-to-pred.ll
phi-eq.ll
phi-known.ll
pr9331.ll
pr15851_hang.ll
pr22086.ll
pr26096.ll [PruneEH] Pin tests to legacy PM 2020-10-29 18:17:55 -07:00
pr27840.ll
pr33605.ll
pr33917.ll
pr36133.ll
pr40992-indirectbr-folding.ll
pr43276.ll [BasicAA] Drop dependency on Loop Info. PR43276 2021-03-17 11:43:44 +07:00
pr46857-callbr.ll
pre-load.ll
range-compare.ll
redundant-dbg-info.ll
removed-use.ll
select-unfold-freeze.ll
select-unfold-msan.ll
select.ll
stale-loop-info-after-unfold-select.ll
static-profile.ll
thread-cmp.ll
thread-loads.ll [Test] Replace checks with auto-generated checks 2021-03-15 14:32:00 +07:00
thread-prob-1.ll [testing] Add missing REQUIRES: asserts 2020-10-28 06:14:54 -04:00
thread-prob-2.ll [JumpThreading] Call eraseBlock when folding a conditional branch 2020-11-15 22:29:30 -08:00
thread-prob-3.ll [BPI] Improve static heuristics for "cold" paths. 2020-12-23 22:47:36 +07:00
thread-prob-4.ll [JumpThreading] Call eraseBlock when folding a conditional branch 2020-12-03 23:50:17 -08:00
thread-prob-5.ll [JumpThreading] Call eraseBlock when folding a conditional branch 2020-12-03 23:50:17 -08:00
thread-prob-6.ll [JumpThreading] Call eraseBlock when folding a conditional branch 2020-12-03 23:50:17 -08:00
thread-two-bbs-cuda.ll
thread-two-bbs-msvc.ll
thread-two-bbs-threshold.ll
thread-two-bbs.ll [ConstantFold] allow folding icmp of null and constexpr 2021-03-08 08:53:59 -05:00
threadable-edge-cast.ll
threading_prof1.ll Revert "Use uint64_t for branch weights instead of uint32_t" 2020-10-31 00:25:32 -07:00
threading_prof2.ll Revert "Use uint64_t for branch weights instead of uint32_t" 2020-10-31 00:25:32 -07:00
unreachable-loops.ll [test] autogen a couple of additional tests 2021-10-05 18:58:08 -07:00
update-edge-weight.ll Revert "Use uint64_t for branch weights instead of uint32_t" 2020-10-31 00:25:32 -07:00