1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 10:42:39 +01:00
llvm-mirror/include/llvm/Transforms/Scalar
Fraser Cormack 5e5115bbd0 [MemCpyOpt] Fix a variety of scalable-type crashes
This patch fixes a variety of crashes resulting from the `MemCpyOptPass`
casting `TypeSize` to a constant integer, whether implicitly or
explicitly.

Since the `MemsetRanges` requires a constant size to work, all but one
of the fixes in this patch simply involve skipping the various
optimizations for scalable types as cleanly as possible.

The optimization of `byval` parameters, however, has been updated to
work on scalable types in theory. In practice, this optimization is only
valid when the length of the `memcpy` is known to be larger than the
scalable type size, which is currently never the case. This could
perhaps be done in the future using the `vscale_range` attribute.

Some implicit casts have been left as they were, under the knowledge
they are only called on aggregate types. These should never be
scalably-sized.

Reviewed By: nikic, tra

Differential Revision: https://reviews.llvm.org/D109329

(cherry-picked from commit 7fb66d4)
2021-09-09 16:21:27 -07:00
..
ADCE.h
AlignmentFromAssumptions.h
AnnotationRemarks.h [AnnotationRemarks] Remove unneeded Function.h include (NFC). 2021-03-15 21:09:35 +00:00
BDCE.h
CallSiteSplitting.h [llvm] Fix header guards (NFC) 2021-02-05 21:02:06 -08:00
ConstantHoisting.h [ConstantHoisting] Remove unused declaration optimizeConstants (NFC) 2020-12-05 16:22:12 -08:00
ConstraintElimination.h
CorrelatedValuePropagation.h
DCE.h
DeadStoreElimination.h
DFAJumpThreading.h Add jump-threading optimization for deterministic finite automata 2021-07-27 14:34:04 -04:00
DivRemPairs.h
EarlyCSE.h
Float2Int.h
GuardWidening.h [llvm] Fix header guards (NFC) 2021-02-05 21:02:06 -08:00
GVN.h [NFC] MemoryDependenceAnalysis cleanup. 2021-05-31 18:07:55 +03:00
GVNExpression.h Replace uses of std::iterator with explicit using 2021-04-12 10:47:14 -07:00
InductiveRangeCheckElimination.h
IndVarSimplify.h
InferAddressSpaces.h [NewPM] Port infer-address-spaces 2020-12-28 19:58:12 -08:00
InstSimplifyPass.h [llvm] Fix header guards (NFC) 2021-02-05 21:02:06 -08:00
IVUsersPrinter.h
JumpThreading.h ABI breaking changes fixes. 2021-06-15 11:08:13 +01:00
LICM.h [LICM] Create LoopNest Invariant Code Motion (LNICM) pass 2021-07-20 00:31:18 +09:00
LoopAccessAnalysisPrinter.h
LoopBoundSplit.h [SimpleLoopBoundSplit] Split Bound of Loop which has conditional branch with IV 2021-06-07 10:55:25 +01:00
LoopDataPrefetch.h
LoopDeletion.h
LoopDistribute.h
LoopFlatten.h [LoopNest][LoopFlatten] Change LoopFlattenPass to LoopNest pass 2021-05-28 15:43:12 +00:00
LoopFuse.h
LoopIdiomRecognize.h
LoopInstSimplify.h
LoopInterchange.h [NFC] Refactor LoopInterchange into a loop-nest pass 2021-02-18 00:55:38 +08:00
LoopLoadElimination.h
LoopPassManager.h [NewPM] Fix wrong perfect forwardings 2021-07-19 17:21:32 +01:00
LoopPredication.h
LoopReroll.h
LoopRotation.h [LoopRotate] Add PrepareForLTO stage, avoid rotating with inline cands. 2021-01-19 10:15:29 +00:00
LoopSimplifyCFG.h
LoopSink.h
LoopStrengthReduce.h
LoopUnrollAndJamPass.h [LoopUnrollAndJam] Change LoopUnrollAndJamPass to LoopNest pass 2021-06-08 20:30:02 +09:00
LoopUnrollPass.h [Passes] Run peeling as part of simple/full loop unrolling. 2021-01-26 13:52:30 +00:00
LoopVersioningLICM.h
LowerAtomic.h [NVPTX] Enable lowering of atomics on local memory 2021-04-26 20:12:12 -04:00
LowerConstantIntrinsics.h
LowerExpectIntrinsic.h [clang][CodeGen] Lower Likelihood attributes to @llvm.expect intrin instead of branch weights 2021-03-21 22:50:21 +03:00
LowerGuardIntrinsic.h [llvm] Fix header guards (NFC) 2021-02-05 21:02:06 -08:00
LowerMatrixIntrinsics.h [llvm] Fix header guards (NFC) 2021-02-05 21:02:06 -08:00
LowerWidenableCondition.h [llvm] Fix header guards (NFC) 2021-02-05 21:02:06 -08:00
MakeGuardsExplicit.h [llvm] Fix header guards (NFC) 2021-02-05 21:02:06 -08:00
MemCpyOptimizer.h [MemCpyOpt] Fix a variety of scalable-type crashes 2021-09-09 16:21:27 -07:00
MergedLoadStoreMotion.h
MergeICmps.h
NaryReassociate.h [NARY-REASSOCIATE] Support reassociation of min/max 2021-04-02 15:30:13 +07:00
NewGVN.h
PartiallyInlineLibCalls.h
Reassociate.h
Reg2Mem.h
RewriteStatepointsForGC.h [llvm] Fix header guards (NFC) 2021-02-05 21:02:06 -08:00
ScalarizeMaskedMemIntrin.h [llvm] Fix header guards (NFC) 2021-02-05 21:02:06 -08:00
Scalarizer.h
SCCP.h Function Specialization Pass 2021-06-11 09:11:29 +01:00
SeparateConstOffsetFromGEP.h
SimpleLoopUnswitch.h [NewPM][SimpleLoopUnswitch] Add option to not trivially unswitch 2021-07-13 16:09:42 -07:00
SimplifyCFG.h
Sink.h
SpeculativeExecution.h [llvm] Fix header guards (NFC) 2021-02-05 21:02:06 -08:00
SROA.h [SROA] Remove Dead Instructions while creating speculative instructions 2020-12-18 11:47:02 -05:00
StraightLineStrengthReduce.h
StructurizeCFG.h
TailRecursionElimination.h
WarnMissedTransforms.h