003 File Manager
Current Path:
/usr/src/contrib/llvm-project/llvm/include/llvm/Transforms/Scalar
usr
/
src
/
contrib
/
llvm-project
/
llvm
/
include
/
llvm
/
Transforms
/
Scalar
/
📁
..
📄
ADCE.h
(1.38 KB)
📄
AlignmentFromAssumptions.h
(1.6 KB)
📄
BDCE.h
(1.04 KB)
📄
CallSiteSplitting.h
(810 B)
📄
ConstantHoisting.h
(8.02 KB)
📄
CorrelatedValuePropagation.h
(810 B)
📄
DCE.h
(892 B)
📄
DeadStoreElimination.h
(1.2 KB)
📄
DivRemPairs.h
(1.01 KB)
📄
EarlyCSE.h
(1.41 KB)
📄
Float2Int.h
(1.74 KB)
📄
GVN.h
(12.57 KB)
📄
GVNExpression.h
(20.21 KB)
📄
GuardWidening.h
(1.18 KB)
📄
IVUsersPrinter.h
(960 B)
📄
IndVarSimplify.h
(1.03 KB)
📄
InductiveRangeCheckElimination.h
(950 B)
📄
InstSimplifyPass.h
(1.64 KB)
📄
JumpThreading.h
(6.55 KB)
📄
LICM.h
(2.78 KB)
📄
LoopAccessAnalysisPrinter.h
(999 B)
📄
LoopDataPrefetch.h
(1.06 KB)
📄
LoopDeletion.h
(1.13 KB)
📄
LoopDistribute.h
(1.08 KB)
📄
LoopFuse.h
(876 B)
📄
LoopIdiomRecognize.h
(1.18 KB)
📄
LoopInstSimplify.h
(1.07 KB)
📄
LoopLoadElimination.h
(1.1 KB)
📄
LoopPassManager.h
(15.85 KB)
📄
LoopPredication.h
(1.12 KB)
📄
LoopRotation.h
(1.13 KB)
📄
LoopSimplifyCFG.h
(1.31 KB)
📄
LoopSink.h
(1.54 KB)
📄
LoopStrengthReduce.h
(1.52 KB)
📄
LoopUnrollAndJamPass.h
(921 B)
📄
LoopUnrollPass.h
(4.97 KB)
📄
LowerAtomic.h
(974 B)
📄
LowerConstantIntrinsics.h
(1.4 KB)
📄
LowerExpectIntrinsic.h
(1.25 KB)
📄
LowerGuardIntrinsic.h
(992 B)
📄
LowerMatrixIntrinsics.h
(868 B)
📄
LowerWidenableCondition.h
(937 B)
📄
MakeGuardsExplicit.h
(1.85 KB)
📄
MemCpyOptimizer.h
(2.71 KB)
📄
MergeICmps.h
(714 B)
📄
MergedLoadStoreMotion.h
(2.02 KB)
📄
NaryReassociate.h
(6.98 KB)
📄
NewGVN.h
(935 B)
📄
PartiallyInlineLibCalls.h
(1.04 KB)
📄
Reassociate.h
(4.6 KB)
📄
RewriteStatepointsForGC.h
(1.27 KB)
📄
SCCP.h
(1.81 KB)
📄
SROA.h
(5.29 KB)
📄
Scalarizer.h
(1.18 KB)
📄
SimpleLoopUnswitch.h
(3.35 KB)
📄
SimplifyCFG.h
(2.01 KB)
📄
Sink.h
(998 B)
📄
SpeculateAroundPHIs.h
(3.69 KB)
📄
SpeculativeExecution.h
(3.04 KB)
📄
TailRecursionElimination.h
(3.3 KB)
📄
WarnMissedTransforms.h
(1.19 KB)
Editing: LICM.h
//===- LICM.h - Loop Invariant Code Motion Pass -------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // // This pass performs loop invariant code motion, attempting to remove as much // code from the body of a loop as possible. It does this by either hoisting // code into the preheader block, or by sinking code to the exit blocks if it is // safe. This pass also promotes must-aliased memory locations in the loop to // live in registers, thus hoisting and sinking "invariant" loads and stores. // // This pass uses alias analysis for two purposes: // // 1. Moving loop invariant loads and calls out of loops. If we can determine // that a load or call inside of a loop never aliases anything stored to, // we can hoist it or sink it like any other instruction. // 2. Scalar Promotion of Memory - If there is a store instruction inside of // the loop, we try to move the store to happen AFTER the loop instead of // inside of the loop. This can only happen if a few conditions are true: // A. The pointer stored through is loop invariant // B. There are no stores or loads in the loop which _may_ alias the // pointer. There are no calls in the loop which mod/ref the pointer. // If these conditions are true, we can promote the loads and stores in the // loop of the pointer to use a temporary alloca'd variable. We then use // the SSAUpdater to construct the appropriate SSA form for the value. // //===----------------------------------------------------------------------===// #ifndef LLVM_TRANSFORMS_SCALAR_LICM_H #define LLVM_TRANSFORMS_SCALAR_LICM_H #include "llvm/Analysis/LoopInfo.h" #include "llvm/IR/PassManager.h" #include "llvm/Support/CommandLine.h" #include "llvm/Transforms/Scalar/LoopPassManager.h" namespace llvm { extern cl::opt<unsigned> SetLicmMssaOptCap; extern cl::opt<unsigned> SetLicmMssaNoAccForPromotionCap; /// Performs Loop Invariant Code Motion Pass. class LICMPass : public PassInfoMixin<LICMPass> { unsigned LicmMssaOptCap; unsigned LicmMssaNoAccForPromotionCap; public: LICMPass() : LicmMssaOptCap(SetLicmMssaOptCap), LicmMssaNoAccForPromotionCap(SetLicmMssaNoAccForPromotionCap) {} LICMPass(unsigned LicmMssaOptCap, unsigned LicmMssaNoAccForPromotionCap) : LicmMssaOptCap(LicmMssaOptCap), LicmMssaNoAccForPromotionCap(LicmMssaNoAccForPromotionCap) {} PreservedAnalyses run(Loop &L, LoopAnalysisManager &AM, LoopStandardAnalysisResults &AR, LPMUpdater &U); }; } // end namespace llvm #endif // LLVM_TRANSFORMS_SCALAR_LICM_H
Upload File
Create Folder