LLVM 22.0.0git
StraightLineStrengthReduce.cpp File Reference

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "slsr"

Functions

 DEBUG_COUNTER (StraightLineStrengthReduceCounter, "slsr-counter", "Controls whether rewriteCandidate is executed.")
 INITIALIZE_PASS_BEGIN (StraightLineStrengthReduceLegacyPass, "slsr", "Straight line strength reduction", false, false) INITIALIZE_PASS_END(StraightLineStrengthReduceLegacyPass
static void unifyBitWidth (APInt &A, APInt &B)
static bool isGEPFoldable (GetElementPtrInst *GEP, const TargetTransformInfo *TTI)
static bool isAddFoldable (const SCEV *Base, ConstantInt *Index, Value *Stride, TargetTransformInfo *TTI)
static bool matchesAdd (Value *A, Value *&B, ConstantInt *&C)
static bool matchesOr (Value *A, Value *&B, ConstantInt *&C)

Variables

static const unsigned UnknownAddressSpace
 slsr
Straight line strength reduction
Straight line strength false

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "slsr"

Definition at line 110 of file StraightLineStrengthReduce.cpp.

Function Documentation

◆ DEBUG_COUNTER()

DEBUG_COUNTER ( StraightLineStrengthReduceCounter ,
"slsr-counter" ,
"Controls whether rewriteCandidate is executed."  )

◆ INITIALIZE_PASS_BEGIN()

INITIALIZE_PASS_BEGIN ( StraightLineStrengthReduceLegacyPass ,
"slsr" ,
"Straight line strength reduction" ,
false ,
false  )

◆ isAddFoldable()

bool isAddFoldable ( const SCEV * Base,
ConstantInt * Index,
Value * Stride,
TargetTransformInfo * TTI )
static

Definition at line 913 of file StraightLineStrengthReduce.cpp.

References llvm::sampleprof::Base, and UnknownAddressSpace.

◆ isGEPFoldable()

bool isGEPFoldable ( GetElementPtrInst * GEP,
const TargetTransformInfo * TTI )
static

Definition at line 905 of file StraightLineStrengthReduce.cpp.

References GEP, and llvm::TargetTransformInfo::TCC_Free.

◆ matchesAdd()

◆ matchesOr()

◆ unifyBitWidth()

void unifyBitWidth ( APInt & A,
APInt & B )
static

Definition at line 620 of file StraightLineStrengthReduce.cpp.

References A(), and B().

Variable Documentation

◆ false

Straight line strength false

Definition at line 613 of file StraightLineStrengthReduce.cpp.

◆ reduction

Straight line strength reduction

Definition at line 613 of file StraightLineStrengthReduce.cpp.

◆ slsr

slsr

Definition at line 612 of file StraightLineStrengthReduce.cpp.

◆ UnknownAddressSpace

const unsigned UnknownAddressSpace
static
Initial value:
=
std::numeric_limits<unsigned>::max()

Definition at line 112 of file StraightLineStrengthReduce.cpp.

Referenced by isAddFoldable().