mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-16 11:30:51 +00:00
1d6c2d717d
This adds a ScalarEvolution-powered transformation that updates load, store and memory intrinsic pointer alignments based on invariant((a+q) & b == 0) expressions. Many of the simple cases we can get with ValueTracking, but we still need something like this for the more complicated cases (such as those with an offset) that require some algebra. Note that gcc's __builtin_assume_aligned's optional third argument provides exactly for this kind of 'misalignment' offset for which this kind of logic is necessary. The primary motivation is to fixup alignments for vector loads/stores after vectorization (and unrolling). This pass is added to the optimization pipeline just after the SLP vectorizer runs (which, admittedly, does not preserve SE, although I imagine it could). Regardless, I actually don't think that the preservation matters too much in this case: SE computes lazily, and this pass won't issue any SE queries unless there are any assume intrinsics, so there should be no real additional cost in the common case (SLP does preserve DT and LoopInfo). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217344 91177308-0d34-0410-b5e6-96231b3b80d8
44 lines
874 B
CMake
44 lines
874 B
CMake
add_llvm_library(LLVMScalarOpts
|
|
ADCE.cpp
|
|
AlignmentFromAssumptions.cpp
|
|
ConstantHoisting.cpp
|
|
ConstantProp.cpp
|
|
CorrelatedValuePropagation.cpp
|
|
DCE.cpp
|
|
DeadStoreElimination.cpp
|
|
EarlyCSE.cpp
|
|
FlattenCFGPass.cpp
|
|
GVN.cpp
|
|
IndVarSimplify.cpp
|
|
JumpThreading.cpp
|
|
LICM.cpp
|
|
LoadCombine.cpp
|
|
LoopDeletion.cpp
|
|
LoopIdiomRecognize.cpp
|
|
LoopInstSimplify.cpp
|
|
LoopRerollPass.cpp
|
|
LoopRotation.cpp
|
|
LoopStrengthReduce.cpp
|
|
LoopUnrollPass.cpp
|
|
LoopUnswitch.cpp
|
|
LowerAtomic.cpp
|
|
MemCpyOptimizer.cpp
|
|
MergedLoadStoreMotion.cpp
|
|
PartiallyInlineLibCalls.cpp
|
|
Reassociate.cpp
|
|
Reg2Mem.cpp
|
|
SCCP.cpp
|
|
SROA.cpp
|
|
SampleProfile.cpp
|
|
Scalar.cpp
|
|
ScalarReplAggregates.cpp
|
|
Scalarizer.cpp
|
|
SeparateConstOffsetFromGEP.cpp
|
|
SimplifyCFGPass.cpp
|
|
Sink.cpp
|
|
StructurizeCFG.cpp
|
|
TailRecursionElimination.cpp
|
|
)
|
|
|
|
add_dependencies(LLVMScalarOpts intrinsics_gen)
|