LLVM
8.0.1
|
#include "PPC.h"
#include "PPCSubtarget.h"
#include "PPCTargetMachine.h"
#include "PPCTargetTransformInfo.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/Analysis/AssumptionCache.h"
#include "llvm/Analysis/CFG.h"
#include "llvm/Analysis/CodeMetrics.h"
#include "llvm/Analysis/LoopInfo.h"
#include "llvm/Analysis/LoopIterator.h"
#include "llvm/Analysis/ScalarEvolutionExpander.h"
#include "llvm/Analysis/TargetLibraryInfo.h"
#include "llvm/Analysis/TargetTransformInfo.h"
#include "llvm/Transforms/Utils/Local.h"
#include "llvm/CodeGen/TargetPassConfig.h"
#include "llvm/CodeGen/TargetSchedule.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/Dominators.h"
#include "llvm/IR/InlineAsm.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/ValueHandle.h"
#include "llvm/PassSupport.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Transforms/Scalar.h"
#include "llvm/Transforms/Utils.h"
#include "llvm/Transforms/Utils/BasicBlockUtils.h"
#include "llvm/Transforms/Utils/LoopUtils.h"
#include "llvm/CodeGen/MachineDominators.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
Go to the source code of this file.
Namespaces | |
llvm | |
This class represents lattice values for constants. | |
Macros | |
#define | DEBUG_TYPE "ctrloops" |
Functions | |
STATISTIC (NumCTRLoops, "Number of loops converted to CTR loops") | |
void | llvm::initializePPCCTRLoopsPass (PassRegistry &) |
void | llvm::initializePPCCTRLoopsVerifyPass (PassRegistry &) |
INITIALIZE_PASS_BEGIN (PPCCTRLoops, "ppc-ctr-loops", "PowerPC CTR Loops", false, false) INITIALIZE_PASS_END(PPCCTRLoops | |
INITIALIZE_PASS_BEGIN (PPCCTRLoopsVerify, "ppc-ctr-loops-verify", "PowerPC CTR Loops Verify", false, false) INITIALIZE_PASS_END(PPCCTRLoopsVerify | |
static bool | isLargeIntegerTy (bool Is32Bit, Type *Ty) |
static bool | memAddrUsesCTR (const PPCTargetMachine &TM, const Value *MemAddr) |
static bool | asmClobbersCTR (InlineAsm *IA) |
static bool | clobbersCTR (const MachineInstr &MI) |
static bool | verifyCTRBranch (MachineBasicBlock *MBB, MachineBasicBlock::iterator I) |
Variables | |
static cl::opt< int > | CTRLoopLimit ("ppc-max-ctrloop", cl::Hidden, cl::init(-1)) |
static cl::opt< unsigned > | SmallCTRLoopThreshold ("min-ctr-loop-threshold", cl::init(4), cl::Hidden, cl::desc("Loops with a constant trip count smaller than " "this value will not use the count register.")) |
ppc ctr | loops |
ppc ctr PowerPC CTR | Loops |
ppc ctr PowerPC CTR | false |
ppc ctr loops | verify |
ppc ctr loops PowerPC CTR Loops | Verify |
#define DEBUG_TYPE "ctrloops" |
Definition at line 69 of file PPCCTRLoops.cpp.
Definition at line 248 of file PPCCTRLoops.cpp.
References llvm::CodeMetrics::analyzeBasicBlock(), llvm::LoopBase< BlockT, LoopT >::begin(), llvm::BasicBlock::begin(), llvm::LoopBase< BlockT, LoopT >::block_begin(), llvm::LoopBase< BlockT, LoopT >::block_end(), llvm::LoopBase< BlockT, LoopT >::blocks(), C, llvm::Intrinsic::ceil, llvm::InlineAsm::ConstraintInfo::Codes, llvm::CodeMetrics::collectEphemeralValues(), llvm::LoopBase< BlockT, LoopT >::contains(), llvm::Intrinsic::copysign, llvm::Intrinsic::cos, llvm::IRBuilder< T, Inserter >::CreateCall(), CTRLoopLimit, llvm::dbgs(), llvm::DeleteDeadPHIs(), E, llvm::Intrinsic::eh_sjlj_setjmp, llvm::LoopBase< BlockT, LoopT >::end(), llvm::BasicBlock::end(), llvm::StringRef::equals_lower(), llvm::Intrinsic::exp, llvm::Intrinsic::exp2, llvm::SCEVExpander::expandCodeFor(), llvm::ISD::FCEIL, llvm::ISD::FFLOOR, llvm::Intrinsic::floor, llvm::ISD::FMAXNUM, llvm::ISD::FMINNUM, llvm::ISD::FNEARBYINT, llvm::ISD::FRINT, llvm::ISD::FROUND, llvm::ISD::FSQRT, llvm::ISD::FTRUNC, llvm::BranchInst::getCondition(), llvm::Value::getContext(), llvm::Intrinsic::getDeclaration(), llvm::CastInst::getDestTy(), llvm::LoopBase< BlockT, LoopT >::getExitingBlocks(), llvm::LoopBase< BlockT, LoopT >::getHeader(), llvm::Type::getInt32Ty(), llvm::Type::getInt64Ty(), llvm::Function::getIntrinsicID(), llvm::LoopBase< BlockT, LoopT >::getLoopPreheader(), llvm::Value::getName(), llvm::Loop::getName(), llvm::BasicBlock::getParent(), llvm::GlobalValue::getParent(), llvm::EVT::getScalarType(), llvm::Type::getScalarType(), llvm::CastInst::getSrcTy(), llvm::BranchInst::getSuccessor(), llvm::BasicBlock::getTerminator(), llvm::SCEV::getType(), llvm::GlobalValue::hasLocalLinkage(), llvm::Value::hasName(), I, llvm::ARM_PROC::IE, llvm::InsertPreheaderForLoop(), llvm::InlineAsm::isInput, isLargeIntegerTy(), llvm::Type::isPointerTy(), llvm::Type::isPPC_FP128Ty(), llvm::EVT::isVector(), LLVM_DEBUG, llvm::Intrinsic::log, llvm::Intrinsic::log10, llvm::Intrinsic::log2, llvm::Intrinsic::longjmp, llvm::Intrinsic::maxnum, memAddrUsesCTR(), llvm::Intrinsic::memcpy, llvm::Intrinsic::memmove, llvm::Intrinsic::memset, Metrics, llvm::Intrinsic::minnum, llvm::Intrinsic::nearbyint, llvm::Intrinsic::not_intrinsic, llvm::CodeMetrics::NumInsts, llvm::MVT::Other, llvm::InlineAsm::ParseConstraints(), llvm::LoopBlocksRPO::perform(), llvm::Intrinsic::pow, llvm::Intrinsic::powi, llvm::Intrinsic::ppc_is_decremented_ctr_nonzero, llvm::Intrinsic::ppc_mtctr, llvm::pred_begin(), llvm::pred_end(), llvm::RecursivelyDeleteTriviallyDeadInstructions(), llvm::Intrinsic::rint, llvm::Intrinsic::round, llvm::BranchInst::setCondition(), llvm::Intrinsic::setjmp, SI, llvm::Intrinsic::sin, SmallCTRLoopThreshold, llvm::Intrinsic::smul_with_overflow, llvm::ISD::SMULO, llvm::Intrinsic::sqrt, llvm::BranchInst::swapSuccessors(), llvm::SystemZISD::TM, llvm::Intrinsic::trunc, llvm::InlineAsm::ConstraintInfo::Type, llvm::Intrinsic::umul_with_overflow, and llvm::ISD::UMULO.
|
static |
Definition at line 692 of file PPCCTRLoops.cpp.
References llvm::MachineOperand::clobbersPhysReg(), llvm::MachineInstr::getNumOperands(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::MachineOperand::isDef(), llvm::MachineOperand::isReg(), and llvm::MachineOperand::isRegMask().
Referenced by verifyCTRBranch().
Referenced by llvm::createPPCCTRLoops().
INITIALIZE_PASS_BEGIN | ( | PPCCTRLoopsVerify | , |
"ppc-ctr-loops-verify" | , | ||
"PowerPC CTR Loops Verify" | , | ||
false | , | ||
false | |||
) |
Definition at line 219 of file PPCCTRLoops.cpp.
Referenced by asmClobbersCTR().
|
static |
Definition at line 228 of file PPCCTRLoops.cpp.
References llvm::dyn_cast(), llvm::TLSModel::GeneralDynamic, llvm::TargetMachine::getTLSModel(), and llvm::TLSModel::LocalDynamic.
Referenced by asmClobbersCTR().
|
static |
Definition at line 707 of file PPCCTRLoops.cpp.
References llvm::PPCISD::BDNZ, llvm::PPCISD::BDZ, llvm::MachineBasicBlock::begin(), llvm::MachineFunction::begin(), clobbersCTR(), llvm::SmallSet< T, N, C >::count(), llvm::dbgs(), llvm::SmallVectorBase::empty(), llvm::MachineBasicBlock::end(), llvm::MachineFunction::end(), llvm::MachineBasicBlock::getFirstTerminator(), llvm::MachineBasicBlock::getFullName(), llvm::MachineBasicBlock::getLastNonDebugInstr(), llvm::MachineBasicBlock::getParent(), I, llvm::ARM_PROC::IE, llvm::SmallSet< T, N, C >::insert(), LLVM_DEBUG, llvm_unreachable, llvm::SmallVectorImpl< T >::pop_back_val(), llvm::MachineBasicBlock::pred_begin(), llvm::MachineBasicBlock::pred_end(), llvm::printMBBReference(), and llvm::SmallVectorTemplateBase< T >::push_back().
|
static |
Referenced by asmClobbersCTR().
Definition at line 169 of file PPCCTRLoops.cpp.
ppc ctr PowerPC CTR Loops |
Definition at line 169 of file PPCCTRLoops.cpp.
ppc ctr loops |
Definition at line 169 of file PPCCTRLoops.cpp.
|
static |
Referenced by asmClobbersCTR().
ppc ctr loops verify |
Definition at line 178 of file PPCCTRLoops.cpp.
Referenced by INITIALIZE_PASS(), llvm::MachineFunction::verify(), and llvm::LiveInterval::verify().
static void Verify |
Definition at line 178 of file PPCCTRLoops.cpp.
Referenced by llvm::TargetPassConfig::addVerifyPass(), llvm::ExecutionEngine::setVerifyModules(), and llvm::EngineBuilder::setVerifyModules().