1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00
llvm-mirror/lib/Transforms/Scalar
Bjorn Pettersson c4e8fe1a8a [ConstantHoisting] Ignore unreachable bb:s when collecting candidates
Summary:
Ignore looking at blocks that are unreachable from entry when
collecting candidates for hosting.

Normally the consthoist pass is executed in the llc pipeline,
just after unreachableblockelim. So it is abnormal to have code
that is unreachable from the entry block. But when running the
pass as part of opt, for example as part of fuzzy testing, we
might trigger various kinds of asserts when collecting candidates
if we include unreachable blocks in that analysis.

It seems like a waste of time to hoist constants in unreachble
blocks, so the solution is to simply ignore such blocks when
collecting the hoisting candidates.

The two added test cases used to end up in two different asserts,
and the intention with the checks is just to verify that we no
longer fail.

Fixes: PR43903

Reviewers: spatel

Reviewed By: spatel

Subscribers: hiraditya, uabelho, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D71678
2019-12-19 15:07:55 +01:00
..
ADCE.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
AlignmentFromAssumptions.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
BDCE.cpp Clang-trunk Generates Wrong Debug values with -O1 2019-11-21 13:53:10 -08:00
CallSiteSplitting.cpp Add missing includes needed to prune LLVMContext.h include, NFC 2019-11-14 15:23:15 -08:00
CMakeLists.txt [Matrix] Add first set of matrix intrinsics and initial lowering pass. 2019-12-12 15:42:18 +00:00
ConstantHoisting.cpp [ConstantHoisting] Ignore unreachable bb:s when collecting candidates 2019-12-19 15:07:55 +01:00
ConstantProp.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
CorrelatedValuePropagation.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
DCE.cpp [BasicBlockUtils] Add utility to remove redundant dbg.value instrs 2019-12-16 11:41:21 +01:00
DeadStoreElimination.cpp Revert "[DSE] Fix for a dangling point bug in DeadStoreElimination." 2019-12-05 19:29:21 +00:00
DivRemPairs.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
EarlyCSE.cpp [DebugInfo][EarlyCSE] Use the salvageDebugInfoOrMarkUndef(); NFC 2019-12-09 13:57:35 +01:00
FlattenCFGPass.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
Float2Int.cpp Add missing includes needed to prune LLVMContext.h include, NFC 2019-11-14 15:23:15 -08:00
GuardWidening.cpp Broaden the definition of a "widenable branch" 2019-11-21 10:46:16 -08:00
GVN.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
GVNHoist.cpp [MemorySSA] Moving at the end often means before terminator. 2019-11-20 17:11:00 -08:00
GVNSink.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
InductiveRangeCheckElimination.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
IndVarSimplify.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
InferAddressSpaces.cpp Resubmit "[Alignment][NFC] Deprecate CreateMemCpy/CreateMemMove" 2019-12-17 10:07:46 +01:00
InstSimplifyPass.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
IVUsersPrinter.cpp
JumpThreading.cpp [JumpThreading] NFC: Don't cache F.hasProfileData() 2019-11-22 08:51:14 -08:00
LICM.cpp [MemorySSA] Moving at the end often means before terminator. 2019-11-20 17:11:00 -08:00
LLVMBuild.txt
LoopAccessAnalysisPrinter.cpp
LoopDataPrefetch.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
LoopDeletion.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
LoopDistribute.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
LoopFuse.cpp [LoopFusion] Use the LoopInfo::isRotatedForm method (NFC). 2019-12-18 15:04:25 -05:00
LoopIdiomRecognize.cpp Resubmit "[Alignment][NFC] Deprecate CreateMemCpy/CreateMemMove" 2019-12-17 10:07:46 +01:00
LoopInstSimplify.cpp [LoopInstSimplify] Move MemorySSA verification under flag. 2019-11-21 17:01:24 -08:00
LoopInterchange.cpp [LoopInterchange] Improve inner exit loop safety checks. 2019-12-04 17:46:01 +00:00
LoopLoadElimination.cpp [PGO][PGSO] Add an optional query type parameter to shouldOptimizeForSize. 2019-12-02 13:54:13 -08:00
LoopPassManager.cpp
LoopPredication.cpp [LoopPred] Robustly handle partially unswitched loops 2019-11-21 15:44:36 -08:00
LoopRerollPass.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
LoopRotation.cpp Add missing includes needed to prune LLVMContext.h include, NFC 2019-11-14 15:23:15 -08:00
LoopSimplifyCFG.cpp [MemorySSA] Update analysis when the terminator is a memory instruction. 2019-11-20 16:36:52 -08:00
LoopSink.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
LoopStrengthReduce.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
LoopUnrollAndJamPass.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
LoopUnrollPass.cpp [PGO][PGSO] Add an optional query type parameter to shouldOptimizeForSize. 2019-12-02 13:54:13 -08:00
LoopUnswitch.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
LoopVersioningLICM.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
LowerAtomic.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
LowerConstantIntrinsics.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
LowerExpectIntrinsic.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
LowerGuardIntrinsic.cpp Move widenable branch formation into makeGuardControlFlowExplicit helper 2019-11-20 12:54:05 -08:00
LowerMatrixIntrinsics.cpp [Matrix] Add first set of matrix intrinsics and initial lowering pass. 2019-12-12 15:42:18 +00:00
LowerWidenableCondition.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
MakeGuardsExplicit.cpp D'oh. Fix assert after a84922916e6eddf701b39fbd7fe0222cb0fee1d6. 2019-11-20 22:22:51 -05:00
MemCpyOptimizer.cpp Resubmit "[Alignment][NFC] Deprecate CreateMemCpy/CreateMemMove" 2019-12-17 10:07:46 +01:00
MergedLoadStoreMotion.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
MergeICmps.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
NaryReassociate.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
NewGVN.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
PartiallyInlineLibCalls.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
PlaceSafepoints.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
Reassociate.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
Reg2Mem.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
RewriteStatepointsForGC.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
Scalar.cpp [BasicBlockUtils] Add utility to remove redundant dbg.value instrs 2019-12-16 11:41:21 +01:00
Scalarizer.cpp Remove Support/Options.h, it is unused 2019-11-15 13:32:52 -08:00
SCCP.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
SeparateConstOffsetFromGEP.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
SimpleLoopUnswitch.cpp [LCSSA] Don't use VH callbacks to invalidate SCEV when creating LCSSA phis 2019-12-06 13:21:49 +07:00
SimplifyCFGPass.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
Sink.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
SpeculateAroundPHIs.cpp Rename TTI::getIntImmCost for instructions and intrinsics 2019-12-11 18:00:20 -08:00
SpeculativeExecution.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
SROA.cpp [Alignment][NFC] Introduce Align in IRBuilder 2019-12-11 14:41:23 +01:00
StraightLineStrengthReduce.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
StructurizeCFG.cpp Add missing includes needed to prune LLVMContext.h include, NFC 2019-11-14 15:23:15 -08:00
TailRecursionElimination.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
WarnMissedTransforms.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00