|
LLVM 24.0.0git
|
#include "llvm/Transforms/Utils/LoopSplitUtils.h"#include "llvm/ADT/DenseMap.h"#include "llvm/Analysis/LoopInfo.h"#include "llvm/Analysis/ScalarEvolution.h"#include "llvm/Analysis/ScalarEvolutionExpressions.h"#include "llvm/Analysis/ScalarEvolutionPatternMatch.h"#include "llvm/IR/BasicBlock.h"#include "llvm/IR/CFG.h"#include "llvm/IR/Constants.h"#include "llvm/IR/Dominators.h"#include "llvm/IR/Function.h"#include "llvm/IR/IRBuilder.h"#include "llvm/IR/Instructions.h"#include "llvm/IR/ProfDataUtils.h"#include "llvm/Support/Debug.h"#include "llvm/Transforms/Utils/BasicBlockUtils.h"#include "llvm/Transforms/Utils/Cloning.h"#include "llvm/Transforms/Utils/LoopUtils.h"#include "llvm/Transforms/Utils/SSAUpdater.h"#include "llvm/Transforms/Utils/ScalarEvolutionExpander.h"#include "llvm/Transforms/Utils/ValueMapper.h"#include <optional>Go to the source code of this file.
Classes | |
| struct | llvm::LoopSplitUtils::SplitState |
| Per-split() scratch shared by the phase helpers; lives for one split() call. More... | |
| struct | llvm::LoopSplitUtils::SplitState::EscapingValue |
| A value that must be reconstructed after cloning because it is loop-carried (feeds a later partition), live-out (used after the loop), or both. More... | |
Macros | |
| #define | DEBUG_TYPE "loop-split-utils" |
Functions | |
| static const SCEVAddRecExpr * | analyzeInduction (Loop *L, ScalarEvolution *SE, Value *&LatchIndOperand) |
| static std::optional< bool > | computeSignedness (Loop *L, const SCEVAddRecExpr *IndAR) |
| static ICmpInst::Predicate | continuePredicate (bool Signed, bool Descending, bool Inclusive) |
| static ICmpInst::Predicate | guardPredicate (bool Signed, bool Descending) |
| static void | buildEntryGuard (BasicBlock *&Preheader, BasicBlock *&EntryGuard, DominatorTree *DT, LoopInfo *LI) |
| static void | rewriteLatch (Loop *PL, Value *IndOp, Value *SelEnd, BasicBlock *Exit, bool Signed, bool Descending, bool LatchComparesPHI) |
| #define DEBUG_TYPE "loop-split-utils" |
Definition at line 76 of file LoopSplitUtils.cpp.
|
static |
Definition at line 155 of file LoopSplitUtils.cpp.
References llvm::cast(), llvm::dyn_cast(), llvm::PHINode::getIncomingValueForBlock(), llvm::User::getOperand(), llvm::ScalarEvolution::getSCEV(), llvm::APInt::isAllOnes(), llvm::APInt::isOne(), llvm::SCEVPatternMatch::m_SCEV(), llvm::SCEVPatternMatch::m_scev_AffineAddRec(), llvm::SCEVPatternMatch::m_scev_APInt(), and llvm::PatternMatch::match().
Referenced by llvm::LoopSplitUtils::isLegal().
|
static |
Definition at line 390 of file LoopSplitUtils.cpp.
References llvm::BasicBlock::getTerminator(), llvm::Value::setName(), llvm::SplitBlock(), and llvm::Value::takeName().
Referenced by llvm::LoopSplitUtils::split().
|
static |
Definition at line 193 of file LoopSplitUtils.cpp.
References llvm::dbgs(), DEBUG_TYPE, llvm::SCEVNAryExpr::hasNoSignedWrap(), llvm::SCEVNAryExpr::hasNoUnsignedWrap(), llvm::ICmpInst::isRelational(), llvm::CmpInst::isSigned(), LLVM_DEBUG, and P.
Referenced by llvm::LoopSplitUtils::isLegal().
Definition at line 260 of file LoopSplitUtils.cpp.
References llvm::CmpInst::ICMP_SGE, llvm::CmpInst::ICMP_SGT, llvm::CmpInst::ICMP_SLE, llvm::CmpInst::ICMP_SLT, llvm::CmpInst::ICMP_UGE, llvm::CmpInst::ICMP_UGT, llvm::CmpInst::ICMP_ULE, llvm::CmpInst::ICMP_ULT, and Signed.
Referenced by rewriteLatch().
Definition at line 271 of file LoopSplitUtils.cpp.
References llvm::CmpInst::ICMP_SGE, llvm::CmpInst::ICMP_SLE, llvm::CmpInst::ICMP_UGE, llvm::CmpInst::ICMP_ULE, and Signed.
|
static |
Definition at line 496 of file LoopSplitUtils.cpp.
References B(), llvm::cast(), continuePredicate(), llvm::extractBranchWeights(), llvm::Value::getType(), llvm::setFittedBranchWeights(), and Signed.