llvm-project/llvm/test/Transforms
Nikita Popov 10c531cd5b [SCCP] Simplify CFG in SCCP as well
Currently, we only remove dead blocks and non-feasible edges in
IPSCCP, but not in SCCP. I'm not aware of any strong reason for
that difference, so this patch updates SCCP to perform the CFG
cleanup as well.

Compile-time impact seems to be pretty minimal, in the 0.05%
geomean range on CTMark.

For the test case from https://reviews.llvm.org/D126962#3611579
the result after -sccp now looks like this:

    define void @test(i1 %c) {
    entry:
      br i1 %c, label %unreachable, label %next
    next:
      unreachable
    unreachable:
      call void @bar()
      unreachable
    }

-jump-threading does nothing on this, but -simplifycfg will produce
the optimal result.

Differential Revision: https://reviews.llvm.org/D128796
2022-06-30 09:25:03 +02:00
..
ADCE [ADCE] Update tests to use opaque pointers (NFC) 2022-06-22 12:26:12 +02:00
AddDiscriminators [AddDiscriminators] Migrate tests to opaque pointers (NFC) 2022-06-22 12:47:12 +02:00
AggressiveInstCombine [AggressiveInstCombine] Update tests to use opaque pointers (NFC) 2022-06-22 12:33:06 +02:00
AlignmentFromAssumptions [AlignmentFromAssumptions] Migrate tests to opaque pointers (NFC) 2022-06-22 13:57:47 +02:00
ArgumentPromotion [ArgPromotion] Unify byval promotion with non-byval 2022-06-28 15:19:58 +03:00
AtomicExpand [PowerPC] Allow llvm.ppc.cfence to accept pointer types 2022-06-24 10:55:32 +08:00
Attributor Revert "[Attributor] Ensure to use the proper liveness AA" 2022-06-22 13:40:45 -07:00
BDCE
BlockExtractor [IR] Enable opaque pointers by default 2022-06-02 09:40:56 +02:00
BranchFolding
CallSiteSplitting
CalledValuePropagation
CanonicalizeAliases
CanonicalizeFreezeInLoops
CodeExtractor [ArgPromotion] Remove legacy PM support 2022-06-27 09:42:17 +02:00
CodeGenPrepare [CGP] Also freeze ctlz/cttz operand when despeculating 2022-06-10 09:46:10 +02:00
ConstantHoisting [OpaquePtr][AArch64] Use elementtype on ldxr/stxr 2022-03-14 10:09:59 -07:00
ConstantMerge
ConstraintElimination Recommit "[ConstraintElimination] Transfer info from ULT to signed system." 2022-06-24 09:27:14 +02:00
Coroutines [Coroutines] Add REQUIRES clause to skip unsupported targets 2022-06-30 11:37:41 +08:00
CorrelatedValuePropagation [LVI] Compute range for xor 2022-05-17 10:18:38 +02:00
CrossDSOCFI
DCE [DCE] Update tests to use opaque pointers (NFC) 2022-06-10 17:31:35 +02:00
DFAJumpThreading [DFAJumpThreading] Relax analysis to handle unpredictable initial values 2022-05-26 11:29:54 -04:00
DeadArgElim [llvm] Add DW_CC_nocall to function debug metadata when either return values or arguments are removed 2022-06-15 03:30:15 +05:30
DeadStoreElimination [DSE] Don't remove nounwind invokes 2022-06-21 11:54:09 -07:00
DivRemPairs [Mips] Implement hasDivRemOp() 2022-05-16 14:45:40 +08:00
EarlyCSE [Tests] Remove unnecessary bitcasts from opaque pointer tests (NFC) 2022-06-22 14:15:46 +02:00
EliminateAvailableExternally
EntryExitInstrumenter
ExpandMemCmp [ExpandMemCmp] Properly expand `bcmp` to an equality pattern. 2022-04-15 11:26:24 +02:00
FixIrreducible LowerSwitch: Avoid inserting NewDefault block 2022-04-14 13:30:56 +08:00
Float2Int [Float2Int] Make sure dependent ranges are calculated first (PR54669) 2022-04-04 10:18:39 +02:00
ForcedFunctionAttrs
FunctionAttrs [RPOFuncAttrs] Fix norecurse detection 2022-06-18 12:20:10 -07:00
FunctionImport [IR] Enable opaque pointers by default 2022-06-02 09:40:56 +02:00
FunctionSpecialization [SCCP] Don't mark edges feasible when resolving undefs 2022-06-22 10:28:27 +02:00
GCOVProfiling [IR] Enable opaque pointers by default 2022-06-02 09:40:56 +02:00
GVN [SCCP] Simplify CFG in SCCP as well 2022-06-30 09:25:03 +02:00
GVNHoist [GVNHoist] drop debug location according to the debug info guide 2022-03-30 20:17:53 -07:00
GVNSink [GVNSink] Make GVNSink resistant against self referencing instructions (PR36954) 2022-05-10 16:06:12 +02:00
GlobalDCE [GlobalDCE] [VFE] Avoid dropping vfunc dependencies when an invalid vtable entry is present 2022-02-17 19:41:46 -08:00
GlobalMerge Fix the eh-filter.ll test. 2022-06-29 16:14:41 -05:00
GlobalOpt [GlobalOpt] Fix memset handling in global ctor evaluation (PR55859) 2022-06-27 16:50:49 +02:00
GlobalSplit
GuardWidening [GuardWidening] Add tests showing incorrect behavior of GW. 2022-06-29 13:41:59 +07:00
HardwareLoops
HelloNew
HotColdSplit [IR] Enable opaque pointers by default 2022-06-02 09:40:56 +02:00
IRCE
IROutliner [IR] Enable opaque pointers by default 2022-06-02 09:40:56 +02:00
IndVarSimplify [IndVars] Add test for PR56242 (NFC) 2022-06-27 14:54:20 +02:00
IndirectBrExpand
InferAddressSpaces [InferAddressSpaces] Check if AS are the same in isNoopPtrIntCastPair 2022-04-28 11:10:55 +08:00
InferFunctionAttrs BuildLibCalls: infer allockind attributes on relevant functions 2022-05-31 10:01:17 -04:00
Inline [ArgPromotion] Remove legacy PM support 2022-06-27 09:42:17 +02:00
InstCombine [InstCombine] Use known bits to determine exact int->fp cast 2022-06-30 09:45:11 +08:00
InstMerge
InstNamer
InstSimplify [IR] Remove support for extractvalue constant expression 2022-06-28 10:40:17 +02:00
InterleavedAccess [IR] Move vector.insert/vector.extract out of experimental namespace 2022-06-27 10:48:45 +00:00
Internalize
JumpThreading [NFC][JumpThreading] Remove InsertFreezeWhenUnfoldingSelect pass parameter 2022-05-26 16:13:34 -07:00
LCSSA
LICM [Test] Add XFAIL test for PR56243 2022-06-29 19:46:17 +07:00
LoadStoreVectorizer [AMDGPU][FIX] Proper load-store-vectorizer result with opaque pointers 2022-04-15 13:42:46 -05:00
LoopBoundSplit
LoopDataPrefetch
LoopDeletion [InstSimplify] Handle unknown function context in pointer icmp fold (PR54615) 2022-05-10 11:48:43 +02:00
LoopDistribute Autogen a couple of predicated SCEV tests 2022-02-11 13:56:35 -08:00
LoopFlatten [LoopFlatten] Fix crash if the inner loop trip count comes from a sext instruction. 2022-06-07 08:21:21 -07:00
LoopFusion [NFCI] Fixed missing colon in CHECK directives 2022-04-03 11:52:38 +02:00
LoopIdiom [LoopIdiom] Fix bailout for aliasing in memcpy transform. 2022-05-31 17:24:23 -07:00
LoopInstSimplify [LoopInstSimplify] Ignore users in unreachable blocks. PR55072 2022-04-25 17:35:28 +07:00
LoopInterchange [LoopInterchange] New cost model for loop interchange 2022-06-28 00:08:37 -04:00
LoopLoadElim [NFC][LAA] Match-up type sizes for possible extensions, based on actual bit-size rather than rounded-up byte size. 2022-04-22 23:16:20 -07:00
LoopPredication
LoopReroll
LoopRotate Pipe potentially invalid InstructionCost through CodeMetrics 2022-06-09 15:17:24 -07:00
LoopSimplify [BasicBlockUtils] Do not move loop metadata if outer loop header. 2022-05-23 16:39:54 -07:00
LoopSimplifyCFG [LoopSimplifyCFG] use poison when replacing dead instructions instead of undef [NFC] 2022-06-26 14:15:55 +01:00
LoopStrengthReduce [LSR] Move transform test from test/Analysis to test/Transforms. 2022-06-23 16:04:45 +02:00
LoopTransformWarning
LoopUnroll [LoopUnrollRuntime] Invalidate SCEV for exit phi in ConnectProlog. 2022-06-29 20:28:43 +01:00
LoopUnrollAndJam
LoopVectorize [LV] Add test case showing dead recipe blocking region merging. 2022-06-29 16:34:12 +01:00
LoopVersioning
LoopVersioningLICM
LowerAtomic
LowerConstantIntrinsics [builtin_object_size] Basic support for posix_memalign 2022-04-08 09:31:11 +02:00
LowerExpectIntrinsic
LowerGlobalDestructors Reland "Lower `@llvm.global_dtors` using `__cxa_atexit` on MachO" 2022-03-23 18:36:55 -07:00
LowerGuardIntrinsic
LowerInvoke
LowerMatrixIntrinsics [Matrix] Check if iterator is at beginning of BB in optimizeTranspose. 2022-06-14 21:37:02 +01:00
LowerSwitch LowerSwitch: Avoid inserting NewDefault block 2022-04-14 13:30:56 +08:00
LowerTypeTests [IR] Enable opaque pointers by default 2022-06-02 09:40:56 +02:00
LowerWidenableCondition
MakeGuardsExplicit
Mem2Reg [Mem2Reg] Check that load type matches alloca type 2022-02-08 17:16:15 +01:00
MemCpyOpt [MemCpyOpt] Work around PR54682 2022-04-04 10:19:51 +02:00
MergeFunc [MergeFunctions] Preserve symbols used llvm.used/llvm.compiler.used 2022-06-16 21:36:39 +01:00
MergeICmps Reapply [MergeICmps] Don't require GEP 2022-03-04 11:39:11 +01:00
MetaRenamer [TLI] Check that malloc argument has type size_t 2022-03-14 17:22:24 +01:00
NameAnonGlobals
NaryReassociate
NewGVN [NewGVN] add context instruction for SimplifyQuery 2022-06-22 12:25:24 +08:00
ObjCARC Reapply "[Intrinsics] Add `nocallback` to the default intrinsic attributes" 2022-03-25 09:36:50 -05:00
OpenMP [OpenMP] Only strip runtime attributes if needed 2022-06-27 13:35:41 -04:00
PGOProfile [IR] Enable opaque pointers by default 2022-06-02 09:40:56 +02:00
PartialInlining
PartiallyInlineLibCalls [PartiallyInlineLibCalls] Don't partially inline a musttail libcall. 2022-04-05 22:30:50 +03:00
PhaseOrdering [GlobalOpt] Perform store->dominated load forwarding for stored once globals 2022-06-24 09:09:26 -07:00
PlaceSafepoints
PreISelIntrinsicLowering
PruneEH
Reassociate Split fast-basictest.ll according to passes responsible for optimizations 2022-02-04 12:20:10 +03:00
Reg2Mem
RelLookupTableConverter/X86 [RelLookupTableConverter] Ensure that GV, GEP and load types match 2022-02-17 12:05:05 +01:00
RewriteStatepointsForGC [RS4GC] Handle freeze case for vector 2022-06-23 11:58:41 +07:00
SCCP [SCCP] Simplify CFG in SCCP as well 2022-06-30 09:25:03 +02:00
SLPVectorizer [SLP]Fix PR56251: Do not remove the reordering from the root node, being used as an operand. 2022-06-28 13:42:05 -07:00
SROA [Tests] Remove unnecessary bitcasts from opaque pointer tests (NFC) 2022-06-22 14:15:46 +02:00
SafeStack [safestack] Support safestack in stack size diagnostics 2022-04-20 18:29:40 +00:00
SampleProfile [SampleProfile][Inline] Annotate sample profile inline remarks with link phase (prelink/postlink) information. 2022-06-22 17:00:53 -07:00
ScalarizeMaskedMemIntrin
Scalarizer [Scalarizer] No need to gather a scattered extracted element 2022-06-21 18:43:54 +02:00
SeparateConstOffsetFromGEP [test][RISCV] Precommit test for SeparateConstOffsetFromGEP (NFC) 2022-06-15 16:03:30 +03:00
SimpleLoopUnswitch [SimpleLoopUnswitch] Always skip trivial select and set condition. 2022-05-26 09:46:24 +01:00
SimplifyCFG [SimplifyCFG] Try to merge edge block when threading (PR55765) 2022-06-20 10:29:33 +02:00
Sink [Sink] Don't sink non-willreturn calls (PR51188) 2022-04-07 16:35:05 +02:00
SpeculativeExecution
StraightLineStrengthReduce [CodeGen] Remove unneeded regex escaping in FileCheck patterns. NFC. 2022-02-18 16:10:56 +00:00
StripDeadPrototypes
StripSymbols
StructurizeCFG [StructurizeCFG] Improve basic block ordering 2022-06-22 16:10:41 -05:00
SyntheticCountsPropagation
TailCallElim [IR] Define "ptrauth" operand bundle. 2022-02-14 11:27:35 -08:00
ThinLTOBitcodeWriter
TypePromotion [TypePromotion] Avoid unnecessary trunc zext pairs 2022-05-24 15:34:36 +01:00
UnifyFunctionExitNodes
UnifyLoopExits [UnifyLoopExits] Reduce number of guard blocks 2022-06-22 15:44:23 -05:00
Util [IR] Enable opaque pointers by default 2022-06-02 09:40:56 +02:00
VectorCombine [ValueTracking] Enable -branch-on-poison-as-ub by default 2022-06-01 10:46:06 +02:00
WholeProgramDevirt [WPD] Add statistics 2022-04-05 18:48:23 -07:00