LLVM 20.0.0git
|
#include "llvm/CodeGen/ExpandLargeDivRem.h"
#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"
Go to the source code of this file.
Functions | |
static bool | isConstantPowerOfTwo (llvm::Value *V, bool SignedOp) |
static bool | isSigned (unsigned int Opcode) |
static void | scalarize (BinaryOperator *BO, SmallVectorImpl< BinaryOperator * > &Replace) |
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 |
INITIALIZE_PASS_BEGIN | ( | ExpandLargeDivRemLegacyPass | , |
"expand-large-div-rem" | , | ||
"Expand large div/rem" | , | ||
false | , | ||
false | |||
) |
|
static |
Definition at line 42 of file ExpandLargeDivRem.cpp.
References llvm::CallingConv::C, llvm::APInt::isNegative(), and llvm::APInt::isPowerOf2().
Referenced by runImpl().
Definition at line 53 of file ExpandLargeDivRem.cpp.
Referenced by llvm::APInt::APInt(), llvm::detail::IEEEFloat::convertFromAPInt(), llvm::detail::IEEEFloat::convertFromSignExtendedInteger(), llvm::detail::IEEEFloat::convertFromZeroExtendedInteger(), llvm::detail::IEEEFloat::convertToInteger(), llvm::IRBuilderBase::CreateIntCast(), llvm::CastInst::CreateIntegerCast(), DecodeBFLabelOperand(), llvm::InstCombinerImpl::EvaluateInDifferentType(), llvm::TargetLowering::expandMULO(), llvm::TargetLowering::expandREM(), llvm::ConstantInt::get(), llvm::ScalarEvolution::getConstant(), getDivRemArgList(), getDivRemLibcall(), llvm::APSInt::getExtValue(), llvm::HexagonInstrInfo::getMaxValue(), llvm::HexagonInstrInfo::getMinValue(), llvm::InstCombinerImpl::insertRangeTest(), isDivRemLibcallAvailable(), isExtendedBUILD_VECTOR(), llvm::ARMBaseRegisterInfo::isFrameOffsetLegal(), llvm::APSInt::isNegative(), llvm::APSInt::isRepresentableByInt64(), llvm::TargetTransformInfoImplBase::minRequiredElementSize(), PerformVCVTCombine(), PerformVMulVCTPCombine(), llvm::APInt::print(), llvm::APInt::roundToDouble(), runImpl(), llvm::APFloatBase::semanticsIntSizeInBits(), llvm::APSInt::toString(), and llvm::InstCombinerImpl::tryFoldInstWithCtpopWithNot().
|
static |
Definition at line 80 of file ExpandLargeDivRem.cpp.
References llvm::SmallVectorBase< Size_T >::empty(), llvm::expandDivision(), ExpandDivRemBits, llvm::expandRemainder(), F, llvm::TargetLoweringBase::getMaxDivRemBitWidthSupported(), I, instructions, isConstantPowerOfTwo(), isSigned(), llvm::IntegerType::MAX_INT_BITS, Modified, llvm::SmallVectorImpl< T >::pop_back_val(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), and scalarize().
Referenced by llvm::ExpandLargeDivRemPass::run(), llvm::ExpandLargeFpConvertPass::run(), llvm::ReplaceWithVeclib::run(), llvm::AggressiveInstCombinePass::run(), llvm::AnnotationRemarksPass::run(), llvm::CorrelatedValuePropagationPass::run(), llvm::InstSimplifyPass::run(), llvm::LoopDistributePass::run(), llvm::MergeICmpsPass::run(), llvm::ScalarizeMaskedMemIntrinPass::run(), llvm::InjectTLIMappings::run(), llvm::LowerInvokePass::run(), llvm::UnifyLoopExitsPass::run(), llvm::SLPVectorizerPass::run(), llvm::ExpandMemCmpPass::run(), llvm::IndirectBrExpandPass::run(), llvm::LibCallsShrinkWrapPass::run(), llvm::LoopVersioningPass::run(), llvm::ObjCARCExpandPass::run(), llvm::FinalizeISelPass::run(), llvm::DeadMachineInstructionElimPass::run(), llvm::ObjCARCAPElimPass::run(), llvm::LowerGlobalDtorsPass::run(), llvm::RewriteSymbolPass::run(), llvm::AMDGPUAttributorPass::run(), llvm::JMCInstrumenterPass::run(), and llvm::ReplaceWithVeclibLegacy::runOnFunction().
|
static |
Definition at line 57 of file ExpandLargeDivRem.cpp.
References llvm::IRBuilderBase::CreateBinOp(), llvm::IRBuilderBase::CreateExtractElement(), llvm::IRBuilderBase::CreateInsertElement(), llvm::User::dropAllReferences(), llvm::Instruction::eraseFromParent(), llvm::PoisonValue::get(), llvm::BinaryOperator::getOpcode(), llvm::User::getOperand(), llvm::Value::getType(), Idx, LHS, llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::Value::replaceAllUsesWith(), and RHS.
Referenced by runImpl(), and llvm::SPIRVLegalizerInfo::SPIRVLegalizerInfo().
|
static |
Referenced by runImpl().
expand large div Expand large div false |
Definition at line 179 of file ExpandLargeDivRem.cpp.
expand large div Expand large div rem |
Definition at line 178 of file ExpandLargeDivRem.cpp.
Referenced by llvm::SchedBoundary::init().