| 
    LLVM 22.0.0git
    
   | 
 
#include "llvm/Transforms/Scalar/StraightLineStrengthReduce.h"#include "llvm/ADT/APInt.h"#include "llvm/ADT/DepthFirstIterator.h"#include "llvm/ADT/SmallVector.h"#include "llvm/Analysis/ScalarEvolution.h"#include "llvm/Analysis/TargetTransformInfo.h"#include "llvm/Analysis/ValueTracking.h"#include "llvm/IR/Constants.h"#include "llvm/IR/DataLayout.h"#include "llvm/IR/DerivedTypes.h"#include "llvm/IR/Dominators.h"#include "llvm/IR/GetElementPtrTypeIterator.h"#include "llvm/IR/IRBuilder.h"#include "llvm/IR/Instruction.h"#include "llvm/IR/Instructions.h"#include "llvm/IR/Module.h"#include "llvm/IR/Operator.h"#include "llvm/IR/PatternMatch.h"#include "llvm/IR/Type.h"#include "llvm/IR/Value.h"#include "llvm/InitializePasses.h"#include "llvm/Pass.h"#include "llvm/Support/Casting.h"#include "llvm/Support/DebugCounter.h"#include "llvm/Support/ErrorHandling.h"#include "llvm/Transforms/Scalar.h"#include "llvm/Transforms/Utils/Local.h"#include <cassert>#include <cstdint>#include <limits>#include <list>#include <vector>Go to the source code of this file.
Functions | |
| DEBUG_COUNTER (StraightLineStrengthReduceCounter, "slsr-counter", "Controls whether rewriteCandidateWithBasis is executed.") | |
| INITIALIZE_PASS_BEGIN (StraightLineStrengthReduceLegacyPass, "slsr", "Straight line strength reduction", false, false) INITIALIZE_PASS_END(StraightLineStrengthReduceLegacyPass | |
| static bool | isGEPFoldable (GetElementPtrInst *GEP, const TargetTransformInfo *TTI) | 
| static bool | isAddFoldable (const SCEV *Base, ConstantInt *Index, Value *Stride, TargetTransformInfo *TTI) | 
| static bool | hasOnlyOneNonZeroIndex (GetElementPtrInst *GEP) | 
| static bool | matchesAdd (Value *A, Value *&B, ConstantInt *&C) | 
| static bool | matchesOr (Value *A, Value *&B, ConstantInt *&C) | 
| static void | unifyBitWidth (APInt &A, APInt &B) | 
Variables | |
| static const unsigned | UnknownAddressSpace | 
| slsr | |
| Straight line strength | reduction | 
| Straight line strength | false | 
| DEBUG_COUNTER | ( | StraightLineStrengthReduceCounter | , | 
| "slsr-counter" | , | ||
| "Controls whether rewriteCandidateWithBasis is executed." | ) | 
References DL, and llvm::PassRegistry::getPassRegistry().
      
  | 
  static | 
Definition at line 312 of file StraightLineStrengthReduce.cpp.
References llvm::dyn_cast(), GEP, and llvm::ConstantInt::isZero().
| INITIALIZE_PASS_BEGIN | ( | StraightLineStrengthReduceLegacyPass | , | 
| "slsr" | , | ||
| "Straight line strength reduction" | , | ||
| false | , | ||
| false | ) | 
References INITIALIZE_PASS_DEPENDENCY.
      
  | 
  static | 
Definition at line 293 of file StraightLineStrengthReduce.cpp.
References llvm::sampleprof::Base, and UnknownAddressSpace.
      
  | 
  static | 
Definition at line 285 of file StraightLineStrengthReduce.cpp.
References GEP, and llvm::TargetTransformInfo::TCC_Free.
      
  | 
  static | 
Definition at line 431 of file StraightLineStrengthReduce.cpp.
References A(), B(), llvm::CallingConv::C, llvm::PatternMatch::m_c_Add(), llvm::PatternMatch::m_ConstantInt(), llvm::PatternMatch::m_Value(), and llvm::PatternMatch::match().
      
  | 
  static | 
Definition at line 436 of file StraightLineStrengthReduce.cpp.
References A(), B(), llvm::CallingConv::C, llvm::PatternMatch::m_c_Or(), llvm::PatternMatch::m_ConstantInt(), llvm::PatternMatch::m_Value(), and llvm::PatternMatch::match().
Definition at line 572 of file StraightLineStrengthReduce.cpp.
| Straight line strength false | 
Definition at line 266 of file StraightLineStrengthReduce.cpp.
| Straight line strength reduction | 
Definition at line 266 of file StraightLineStrengthReduce.cpp.
| slsr | 
Definition at line 265 of file StraightLineStrengthReduce.cpp.
Definition at line 94 of file StraightLineStrengthReduce.cpp.
Referenced by isAddFoldable().