LLVM 24.0.0git
InductiveRangeCheckElimination.cpp File Reference
#include "llvm/Transforms/Scalar/InductiveRangeCheckElimination.h"
#include "ScalarOptions.h"
#include "llvm/ADT/APInt.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/PriorityWorklist.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/Twine.h"
#include "llvm/Analysis/BlockFrequencyInfo.h"
#include "llvm/Analysis/BranchProbabilityInfo.h"
#include "llvm/Analysis/CycleAnalysis.h"
#include "llvm/Analysis/LoopAnalysisManager.h"
#include "llvm/Analysis/LoopInfo.h"
#include "llvm/Analysis/ScalarEvolution.h"
#include "llvm/Analysis/ScalarEvolutionExpressions.h"
#include "llvm/IR/BasicBlock.h"
#include "llvm/IR/CFG.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/Dominators.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/InstrTypes.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/Metadata.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/PatternMatch.h"
#include "llvm/IR/Type.h"
#include "llvm/IR/Use.h"
#include "llvm/IR/User.h"
#include "llvm/IR/Value.h"
#include "llvm/Support/BranchProbability.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Transforms/Utils/BasicBlockUtils.h"
#include "llvm/Transforms/Utils/Cloning.h"
#include "llvm/Transforms/Utils/LoopConstrainer.h"
#include "llvm/Transforms/Utils/LoopSimplify.h"
#include "llvm/Transforms/Utils/LoopUtils.h"
#include "llvm/Transforms/Utils/ScalarEvolutionExpander.h"
#include "llvm/Transforms/Utils/ValueMapper.h"
#include <algorithm>
#include <cassert>
#include <optional>
#include <utility>

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "irce"

Functions

static const SCEV * NoopOrExtend (const SCEV *S, Type *Ty, ScalarEvolution &SE, bool Signed)
 If the type of S matches with Ty, return S.
static std::optional< LoopConstrainer::SubRanges > calculateSubRanges (const ScalarOptions &Opts, ScalarEvolution &SE, const Loop &L, InductiveRangeCheck::Range &Range, const LoopStructure &MainLoopStructure)
static std::optional< InductiveRangeCheck::Range > IntersectSignedRange (ScalarEvolution &SE, const std::optional< InductiveRangeCheck::Range > &R1, const InductiveRangeCheck::Range &R2)
static std::optional< InductiveRangeCheck::Range > IntersectUnsignedRange (ScalarEvolution &SE, const std::optional< InductiveRangeCheck::Range > &R1, const InductiveRangeCheck::Range &R2)

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "irce"

Definition at line 98 of file InductiveRangeCheckElimination.cpp.

Function Documentation

◆ calculateSubRanges()

◆ IntersectSignedRange()

◆ IntersectUnsignedRange()

◆ NoopOrExtend()

const SCEV * NoopOrExtend ( const SCEV * S,
Type * Ty,
ScalarEvolution & SE,
bool Signed )
static

If the type of S matches with Ty, return S.

Otherwise, return signed or unsigned extension of S to type Ty.

Definition at line 535 of file InductiveRangeCheckElimination.cpp.

References llvm::ScalarEvolution::getNoopOrSignExtend(), llvm::ScalarEvolution::getNoopOrZeroExtend(), and Signed.

Referenced by calculateSubRanges().