module LLVM.General.Transforms where
import LLVM.General.Prelude
data Pass
= AggressiveDeadCodeElimination
| BreakCriticalEdges
| CodeGenPrepare
| ConstantPropagation
| CorrelatedValuePropagation
| DeadCodeElimination
| DeadInstructionElimination
| DeadStoreElimination
| DemoteRegisterToMemory
| EarlyCommonSubexpressionElimination
| GlobalValueNumbering { noLoads :: Bool }
| InductionVariableSimplify
| InstructionCombining
| JumpThreading
| LoopClosedSingleStaticAssignment
| LoopInvariantCodeMotion
| LoopDeletion
| LoopIdiom
| LoopInstructionSimplify
| LoopRotate
| LoopStrengthReduce
| LoopUnroll { loopUnrollThreshold :: Maybe Word, count :: Maybe Word, allowPartial :: Maybe Bool }
| LoopUnswitch { optimizeForSize :: Bool }
| LowerAtomic
| LowerInvoke { useExpensiveExceptionHandlingSupport :: Bool }
| LowerSwitch
| LowerExpectIntrinsic
| MemcpyOptimization
| PromoteMemoryToRegister
| Reassociate
| ScalarReplacementOfAggregates { requiresDominatorTree :: Bool }
| OldScalarReplacementOfAggregates {
oldScalarReplacementOfAggregatesThreshold :: Maybe Word,
useDominatorTree :: Bool,
structMemberThreshold :: Maybe Word,
arrayElementThreshold :: Maybe Word,
scalarLoadThreshold :: Maybe Word
}
| SparseConditionalConstantPropagation
| SimplifyLibCalls
| SimplifyControlFlowGraph
| Sinking
| TailCallElimination
| AlwaysInline { insertLifetime :: Bool }
| ArgumentPromotion
| ConstantMerge
| FunctionAttributes
| FunctionInlining {
functionInliningThreshold :: Word
}
| GlobalDeadCodeElimination
| InternalizeFunctions { exportList :: [String] }
| InterproceduralConstantPropagation
| InterproceduralSparseConditionalConstantPropagation
| MergeFunctions
| PartialInlining
| PruneExceptionHandling
| StripDeadDebugInfo
| StripDebugDeclare
| StripNonDebugSymbols
| StripSymbols { onlyDebugInfo :: Bool }
| BasicBlockVectorize {
vectorBits :: Word,
vectorizeBools :: Bool,
vectorizeInts :: Bool,
vectorizeFloats :: Bool,
vectorizePointers :: Bool,
vectorizeCasts :: Bool,
vectorizeMath :: Bool,
vectorizeFusedMultiplyAdd :: Bool,
vectorizeSelect :: Bool,
vectorizeCmp :: Bool,
vectorizeGetElementPtr :: Bool,
vectorizeMemoryOperations :: Bool,
alignedOnly :: Bool,
requiredChainDepth :: Word,
searchLimit :: Word,
maxCandidatePairsForCycleCheck :: Word,
splatBreaksChain :: Bool,
maxInstructions :: Word,
maxIterations :: Word,
powerOfTwoLengthsOnly :: Bool,
noMemoryOperationBoost :: Bool,
fastDependencyAnalysis :: Bool
}
| LoopVectorize {
noUnrolling :: Bool
}
| SuperwordLevelParallelismVectorize
| GCOVProfiler {
emitNotes :: Bool,
emitData :: Bool,
version :: GCOVVersion,
useCfgChecksum :: Bool,
noRedZone :: Bool,
functionNamesInData :: Bool
}
| AddressSanitizer {
checkInitOrder :: Bool,
checkUseAfterReturn :: Bool,
checkLifetime :: Bool,
blackListFile :: Maybe FilePath,
zeroBaseShadow :: Bool
}
| AddressSanitizerModule {
checkInitOrder :: Bool,
blackListFile :: Maybe FilePath,
zeroBaseShadow :: Bool
}
| MemorySanitizer {
trackOrigins :: Bool,
blackListFile :: Maybe FilePath
}
| ThreadSanitizer {
blackListFile :: Maybe FilePath
}
| BoundsChecking
| DebugGeneratedIR {
hideDebugIntrinsics :: Bool,
hideDebugMetadata :: Bool,
fileName :: Maybe FilePath,
directory :: Maybe FilePath
}
| DebugExistingIR
deriving (Eq, Ord, Read, Show, Typeable, Data)
defaultLoopVectorize = LoopVectorize {
noUnrolling = False
}
defaultVectorizeBasicBlocks = BasicBlockVectorize {
vectorBits = 128,
vectorizeBools = True,
vectorizeInts = True,
vectorizeFloats = True,
vectorizePointers = True,
vectorizeCasts = True,
vectorizeMath = True,
vectorizeFusedMultiplyAdd = True,
vectorizeSelect = True,
vectorizeCmp = True,
vectorizeGetElementPtr = True,
vectorizeMemoryOperations = True,
alignedOnly = True,
requiredChainDepth = 6,
searchLimit = 400,
maxCandidatePairsForCycleCheck = 200,
splatBreaksChain = False,
maxInstructions = 500,
maxIterations = 0,
powerOfTwoLengthsOnly = False,
noMemoryOperationBoost = False,
fastDependencyAnalysis = False
}
newtype GCOVVersion = GCOVVersion String
deriving (Eq, Ord, Read, Show, Typeable, Data)
defaultGCOVProfiler = GCOVProfiler {
emitNotes = True,
emitData = True,
version = GCOVVersion "402*",
useCfgChecksum = False,
noRedZone = False,
functionNamesInData = True
}
defaultAddressSanitizer = AddressSanitizer {
checkInitOrder = True,
checkUseAfterReturn = False,
checkLifetime = False,
blackListFile = Nothing,
zeroBaseShadow = False
}
defaultAddressSanitizerModule = AddressSanitizerModule {
checkInitOrder = True,
blackListFile = Nothing,
zeroBaseShadow = False
}
defaultMemorySanitizer = MemorySanitizer {
trackOrigins = False,
blackListFile = Nothing
}
defaultThreadSanitizer = ThreadSanitizer {
blackListFile = Nothing
}
defaultDebugGeneratedIR = DebugGeneratedIR {
hideDebugIntrinsics = False,
hideDebugMetadata = False,
fileName = Nothing,
directory = Nothing
}