LLVM: include/llvm/Transforms/Utils/SimplifyIndVar.h Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15#ifndef LLVM_TRANSFORMS_UTILS_SIMPLIFYINDVAR_H

16#define LLVM_TRANSFORMS_UTILS_SIMPLIFYINDVAR_H

17

18#include

19

20namespace llvm {

21

23class WeakTrackingVH;

24template class SmallVectorImpl;

25class CastInst;

26class DominatorTree;

27class Loop;

28class LoopInfo;

29class PHINode;

30class ScalarEvolution;

31class SCEVExpander;

32class TargetTransformInfo;

33

34

35

37protected:

39

40 virtual void anchor();

41

42public:

45

48};

49

50

51

52

53

54

61

62

63

67

68

69

70

73

74

76

77

79};

80

81

82

86 unsigned &NumElimExt, unsigned &NumWidened,

88

89}

90

91#endif

static cl::opt< bool > UsePostIncrementRanges("indvars-post-increment-ranges", cl::Hidden, cl::desc("Use post increment control-dependent ranges in IndVarSimplify"), cl::init(true))

This is the base class for all instructions that perform data casts.

Concrete subclass of DominatorTreeBase that is used to compute a normal dominator tree.

Interface for visiting interesting IV users that are recognized but not simplified by this utility.

virtual ~IVVisitor()=default

virtual void visitCast(CastInst *Cast)=0

const DominatorTree * getDomTree() const

Represents a single loop in the control flow graph.

This class uses information about analyze scalars to rewrite expressions in canonical form.

The main scalar evolution driver.

This class consists of common code factored out of the SmallVector class to reduce code duplication b...

This pass provides access to the codegen interfaces that are needed for IR-level transformations.

The instances of the Type class are immutable: once they are created, they are never changed.

This is an optimization pass for GlobalISel generic memory operations.

PHINode * createWideIV(const WideIVInfo &WI, LoopInfo *LI, ScalarEvolution *SE, SCEVExpander &Rewriter, DominatorTree *DT, SmallVectorImpl< WeakTrackingVH > &DeadInsts, unsigned &NumElimExt, unsigned &NumWidened, bool HasGuards, bool UsePostIncrementRanges)

Widen Induction Variables - Extend the width of an IV to cover its widest uses.

bool simplifyLoopIVs(Loop *L, ScalarEvolution *SE, DominatorTree *DT, LoopInfo *LI, const TargetTransformInfo *TTI, SmallVectorImpl< WeakTrackingVH > &Dead)

SimplifyLoopIVs - Simplify users of induction variables within this loop.

std::pair< bool, bool > simplifyUsersOfIV(PHINode *CurrIV, ScalarEvolution *SE, DominatorTree *DT, LoopInfo *LI, const TargetTransformInfo *TTI, SmallVectorImpl< WeakTrackingVH > &Dead, SCEVExpander &Rewriter, IVVisitor *V=nullptr)

simplifyUsersOfIV - Simplify instructions that use this induction variable by using ScalarEvolution t...

Collect information about induction variables that are used by sign/zero extend operations.