llvm-project/llvm/lib/Transforms/Scalar
Florian Hahn 99166fd4fb [SCEVExpander] Add option to preserve LCSSA directly.
This patch teaches SCEVExpander to directly preserve LCSSA.

As it is currently, SCEV does not look through PHI nodes in loops,
as it might break LCSSA form. Once SCEVExpander can preserve
LCSSA form, it should be safe for SCEV to look through PHIs.

To preserve LCSSA form, this patch uses formLCSSAForInstructions
on operands of newly created instructions, if the definition is inside
a different loop than the new instruction.

The final value we return from expandCodeFor may also need LCSSA
phis, depending on the insert point. As no user for it exists there yet,
create a temporary instruction at the insert point, which can be passed
to formLCSSAForInstructions. This temporary instruction is removed
after LCSSA construction.

Reviewed By: mkazantsev

Differential Revision: https://reviews.llvm.org/D71538
2020-07-29 15:07:37 +01:00
..
ADCE.cpp [ADCE] Fix incorrect reporting of CFG changes 2020-04-14 20:26:13 +07:00
AlignmentFromAssumptions.cpp Temporarily Revert "[AssumeBundles] Use operand bundles to encode alignment assumptions" 2020-07-16 11:54:04 -07:00
BDCE.cpp [BDCE] SExt -> ZExt when no sign bits is used and instruction has multiple uses 2020-07-10 08:34:53 +01:00
CMakeLists.txt [Matrix] Add first set of matrix intrinsics and initial lowering pass. 2019-12-12 15:42:18 +00:00
CallSiteSplitting.cpp [CallSite removal][CallSiteSplitting] Use CallBase instead of CallSite. NFC 2020-04-15 15:38:02 -07:00
ConstantHoisting.cpp Revert rG5dd566b7c7b78bd- "PassManager.h - remove unnecessary Function.h/Module.h includes. NFCI." 2020-07-24 13:02:33 +01:00
ConstantProp.cpp
CorrelatedValuePropagation.cpp [NFC][CVP] processSDiv(): pacify gcc compilers 2020-07-18 19:41:43 +03:00
DCE.cpp [AssumeBundles] preserve knowledge in DCE 2020-04-14 12:48:15 +02:00
DeadStoreElimination.cpp IR: Rename Argument::hasPassPointeeByValueAttr to prepare for byref 2020-07-16 13:50:49 -04:00
DivRemPairs.cpp Correctly report modified status for DivRemPairs 2020-06-05 16:06:31 +02:00
EarlyCSE.cpp DomTree: remove explicit use of DomTreeNodeBase::iterator 2020-07-08 18:18:49 +02:00
FlattenCFGPass.cpp
Float2Int.cpp [Float2Int] Stop passing around a reference to the class member Roots. NFC 2020-04-16 15:24:13 +02:00
GVN.cpp [GVN] Rewrite IsValueFullyAvailableInBlock(): no recursion, less false-negatives 2020-07-28 10:19:28 +03:00
GVNHoist.cpp AllocaInst should store Align instead of MaybeAlign. 2020-05-16 14:53:16 -07:00
GVNSink.cpp Use llvm::is_contained where appropriate (NFC) 2020-07-27 10:20:44 -07:00
GuardWidening.cpp
IVUsersPrinter.cpp
IndVarSimplify.cpp [SCEV][IndVarSimplify] insert point should not be block front. 2020-07-17 22:25:10 -04:00
InductiveRangeCheckElimination.cpp LoopAnalysisManager.h - reduce includes to forward declarations. NFC. 2020-06-06 14:06:46 +01:00
InferAddressSpaces.cpp [InferAddressSpaces] Handle the pair of `ptrtoint`/`inttoptr`. 2020-06-25 20:46:56 -04:00
InstSimplifyPass.cpp [Utils] Use WeakTrackingVH in vector used as scratch storage. 2020-01-23 16:04:57 -08:00
JumpThreading.cpp [JumpThreading] Add a basic support for freeze instruction 2020-07-29 03:12:14 +09:00
LICM.cpp [Alignment][NFC] Transition and simplify calls to DL::getABITypeAlignment 2020-07-02 11:28:02 +00:00
LLVMBuild.txt
LoopAccessAnalysisPrinter.cpp
LoopDataPrefetch.cpp [SCEV] Move ScalarEvolutionExpander.cpp to Transforms/Utils (NFC). 2020-05-20 10:53:40 +01:00
LoopDeletion.cpp [LoopDeletion] Emit a remark when a dead loop is deleted 2020-07-03 15:20:23 -07:00
LoopDistribute.cpp Fix return status of LoopDistribute 2020-06-18 20:13:18 +02:00
LoopFuse.cpp [Loop Fusion] Integrate Loop Peeling into Loop Fusion (re-land after fixing ASAN build failures) 2020-07-23 21:02:04 +00:00
LoopIdiomRecognize.cpp LoopIdiomRecognize: use ExpandedValuesCleaner in another place 2020-07-21 09:32:23 -06:00
LoopInstSimplify.cpp [Utils] Use WeakTrackingVH in vector used as scratch storage. 2020-01-23 16:04:57 -08:00
LoopInterchange.cpp SmallPtrSet::find -> SmallPtrSet::count 2020-06-07 22:38:08 +02:00
LoopLoadElimination.cpp [LLE] std::inserter doesn't work with SmallSet, so don't use it. 2020-07-20 15:47:42 +02:00
LoopPassManager.cpp [NewPM] Move debugging log printing after PassInstrumentation before-pass-callbacks 2020-06-25 10:03:25 -07:00
LoopPredication.cpp [Transforms] Fix typos. NFC 2020-05-25 22:34:08 +02:00
LoopRerollPass.cpp [Analysis/Transforms/Sanitizers] As part of using inclusive language 2020-06-20 00:42:26 -07:00
LoopRotation.cpp [LoopRotate] Get and update MSSA only if available in legacy pass manager. 2020-02-14 10:47:26 -08:00
LoopSimplifyCFG.cpp [LoopSimplifyCFG] Delete landing pads in dead exit blocks 2020-07-29 18:36:51 +07:00
LoopSink.cpp
LoopStrengthReduce.cpp [SCEVExpander] Add option to preserve LCSSA directly. 2020-07-29 15:07:37 +01:00
LoopUnrollAndJamPass.cpp [NFC] Separate Peeling Properties into its own struct (re-land after minor fix) 2020-07-10 18:39:30 +00:00
LoopUnrollPass.cpp [NFC] Separate Peeling Properties into its own struct (re-land after minor fix) 2020-07-10 18:39:30 +00:00
LoopUnswitch.cpp [llvm][NFC][CallSite] Remove CallSite from a few trivial locations 2020-04-22 08:39:21 -07:00
LoopVersioningLICM.cpp [CallSite removal] Remove unneeded includes of CallSite.h. NFC 2020-04-23 21:01:48 -07:00
LowerAtomic.cpp [Transforms] Simplify with make_early_inc_range 2020-02-02 00:54:32 -08:00
LowerConstantIntrinsics.cpp Preserve GlobalsAA analysis result in LowerConstantIntrinsics 2020-07-02 15:40:41 +01:00
LowerExpectIntrinsic.cpp Make helpers static. NFC. 2020-07-09 13:48:56 +02:00
LowerGuardIntrinsic.cpp
LowerMatrixIntrinsics.cpp [Matrix] Add asserts for mismatched element types. 2020-07-23 16:02:48 +01:00
LowerWidenableCondition.cpp
MakeGuardsExplicit.cpp
MemCpyOptimizer.cpp Temporarily revert "[MemCpyOptimizer] Simplify API of processStore and processMem* functions" 2020-06-12 14:01:27 -07:00
MergeICmps.cpp
MergedLoadStoreMotion.cpp [Transforms] Simplify with make_early_inc_range 2020-02-02 00:54:32 -08:00
NaryReassociate.cpp [Analysis/Transforms/Sanitizers] As part of using inclusive language 2020-06-20 00:42:26 -07:00
NewGVN.cpp [PredicateInfo] Add a method to interpret predicate as cmp constraint 2020-07-19 15:34:32 +02:00
PartiallyInlineLibCalls.cpp
PlaceSafepoints.cpp [Statepoint] Replace uses of isX functions with idiomatic isa<X> 2020-05-27 18:32:28 -07:00
Reassociate.cpp [DebugInfo] Reduce SalvageDebugInfo() functions 2020-06-08 19:28:18 +01:00
Reg2Mem.cpp
RewriteStatepointsForGC.cpp [Analysis] TTI: Add CastContextHint for getCastInstrCost 2020-07-29 13:32:53 +01:00
SCCP.cpp [SCCP] Restore the change reporting as well 2020-07-25 15:11:30 +02:00
SROA.cpp [SROA][Mem2Reg] Use efficient droppable use API (after D83976) 2020-07-28 17:41:01 -05:00
Scalar.cpp [Matrix] Add minimal lowering pass that only requires TTI. 2020-07-20 11:16:11 +01:00
Scalarizer.cpp [SVE] Remove calls to VectorType::getNumElements from Scalar 2020-07-08 11:08:20 -07:00
SeparateConstOffsetFromGEP.cpp Remove getNumUses() comparisons (NFC) 2020-05-02 11:05:19 +02:00
SimpleLoopUnswitch.cpp [SimpleLoopUnswitch] Drop uses of instructions before block deletion 2020-05-27 18:25:18 +07:00
SimplifyCFGPass.cpp [NFCI][SimplifyCFG] Guard common code hoisting with a (default-on) flag 2020-07-20 10:29:57 +03:00
Sink.cpp DomTree: remove explicit use of DomTreeNodeBase::iterator 2020-07-08 18:18:49 +02:00
SpeculateAroundPHIs.cpp [NFC][CostModel] Add TargetCostKind to relevant APIs 2020-05-05 10:35:54 +01:00
SpeculativeExecution.cpp SpeculativeExecution: Fix for logic change introduced in D81730. 2020-07-09 15:45:23 +03:00
StraightLineStrengthReduce.cpp
StructurizeCFG.cpp Revert rG5dd566b7c7b78bd- "PassManager.h - remove unnecessary Function.h/Module.h includes. NFCI." 2020-07-24 13:02:33 +01:00
TailRecursionElimination.cpp Revert "[TRE] allow TRE for non-capturing calls." 2020-07-13 00:39:48 +03:00
WarnMissedTransforms.cpp [TTI] Clean up includes (NFC). 2020-04-19 20:11:59 +01:00