LLVM  16.0.0git
Classes | Functions | Variables
ExpandLargeDivRem.cpp File Reference
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/Analysis/GlobalsModRef.h"
#include "llvm/CodeGen/Passes.h"
#include "llvm/CodeGen/TargetLowering.h"
#include "llvm/CodeGen/TargetPassConfig.h"
#include "llvm/CodeGen/TargetSubtargetInfo.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/InstIterator.h"
#include "llvm/IR/PassManager.h"
#include "llvm/InitializePasses.h"
#include "llvm/Pass.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/Transforms/Utils/IntegerDivision.h"
Include dependency graph for ExpandLargeDivRem.cpp:

Go to the source code of this file.

Classes

class  ExpandLargeDivRemLegacyPass
 

Functions

static bool isConstantPowerOfTwo (llvm::Value *V, bool SignedOp)
 
static bool isSigned (unsigned int Opcode)
 
static bool runImpl (Function &F, const TargetLowering &TLI)
 
 INITIALIZE_PASS_BEGIN (ExpandLargeDivRemLegacyPass, "expand-large-div-rem", "Expand large div/rem", false, false) INITIALIZE_PASS_END(ExpandLargeDivRemLegacyPass
 

Variables

static cl::opt< unsigned > ExpandDivRemBits ("expand-div-rem-bits", cl::Hidden, cl::init(llvm::IntegerType::MAX_INT_BITS), cl::desc("div and rem instructions on integers with " "more than <N> bits are expanded."))
 
expand large div rem
 
expand large div Expand large div false
 

Function Documentation

◆ INITIALIZE_PASS_BEGIN()

INITIALIZE_PASS_BEGIN ( ExpandLargeDivRemLegacyPass  ,
"expand-large-div-rem ,
"Expand large div/rem ,
false  ,
false   
)

◆ isConstantPowerOfTwo()

static bool isConstantPowerOfTwo ( llvm::Value V,
bool  SignedOp 
)
static

Definition at line 41 of file ExpandLargeDivRem.cpp.

References llvm::APInt::isNegative(), and llvm::APInt::isPowerOf2().

Referenced by runImpl().

◆ isSigned()

static bool isSigned ( unsigned int  Opcode)
static

◆ runImpl()

static bool runImpl ( Function F,
const TargetLowering TLI 
)
static

Variable Documentation

◆ ExpandDivRemBits

cl::opt<unsigned> ExpandDivRemBits("expand-div-rem-bits", cl::Hidden, cl::init(llvm::IntegerType::MAX_INT_BITS), cl::desc("div and rem instructions on integers with " "more than <N> bits are expanded."))
static

Referenced by runImpl().

◆ false

expand large div Expand large div false

Definition at line 133 of file ExpandLargeDivRem.cpp.

◆ rem

expand large div Expand large div rem

Definition at line 132 of file ExpandLargeDivRem.cpp.

Referenced by llvm::SchedBoundary::init().