|
LLVM
10.0.0
|
#include "PPC.h"#include "PPCSubtarget.h"#include "PPCTargetMachine.h"#include "llvm/ADT/DepthFirstIterator.h"#include "llvm/ADT/SmallPtrSet.h"#include "llvm/ADT/SmallSet.h"#include "llvm/ADT/SmallVector.h"#include "llvm/ADT/Statistic.h"#include "llvm/Analysis/LoopInfo.h"#include "llvm/Analysis/ScalarEvolution.h"#include "llvm/Analysis/ScalarEvolutionExpander.h"#include "llvm/Analysis/ScalarEvolutionExpressions.h"#include "llvm/IR/BasicBlock.h"#include "llvm/IR/CFG.h"#include "llvm/IR/Dominators.h"#include "llvm/IR/Instruction.h"#include "llvm/IR/Instructions.h"#include "llvm/IR/IntrinsicInst.h"#include "llvm/IR/Module.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/CommandLine.h"#include "llvm/Support/Debug.h"#include "llvm/Transforms/Scalar.h"#include "llvm/Transforms/Utils.h"#include "llvm/Transforms/Utils/BasicBlockUtils.h"#include "llvm/Transforms/Utils/Local.h"#include "llvm/Transforms/Utils/LoopUtils.h"#include <cassert>#include <iterator>#include <utility>Go to the source code of this file.
Macros | |
| #define | DEBUG_TYPE "ppc-loop-instr-form-prep" |
Enumerations | |
| enum | InstrForm |
Functions | |
| STATISTIC (PHINodeAlreadyExistsUpdate, "PHI node already in pre-increment form") | |
| STATISTIC (PHINodeAlreadyExistsDS, "PHI node already in DS form") | |
| STATISTIC (PHINodeAlreadyExistsDQ, "PHI node already in DQ form") | |
| STATISTIC (DSFormChainRewritten, "Num of DS form chain rewritten") | |
| STATISTIC (DQFormChainRewritten, "Num of DQ form chain rewritten") | |
| STATISTIC (UpdFormChainRewritten, "Num of update form chain rewritten") | |
| static bool | IsPtrInBounds (Value *BasePtr) |
| static std::string | getInstrName (const Value *I, const std::string Suffix) |
| static Value * | GetPointerOperand (Value *MemI) |
Variables | |
| static cl::opt< unsigned > | MaxVarsPrep ("ppc-formprep-max-vars", cl::Hidden, cl::init(16), cl::desc("Potential common base number threshold per function for PPC loop " "prep")) |
| static cl::opt< bool > | PreferUpdateForm ("ppc-formprep-prefer-update", cl::init(true), cl::Hidden, cl::desc("prefer update form when ds form is also a update form")) |
| static cl::opt< unsigned > | MaxVarsUpdateForm ("ppc-preinc-prep-max-vars", cl::Hidden, cl::init(3), cl::desc("Potential PHI threshold per loop for PPC loop prep of update " "form")) |
| static cl::opt< unsigned > | MaxVarsDSForm ("ppc-dsprep-max-vars", cl::Hidden, cl::init(3), cl::desc("Potential PHI threshold per loop for PPC loop prep of DS form")) |
| static cl::opt< unsigned > | MaxVarsDQForm ("ppc-dqprep-max-vars", cl::Hidden, cl::init(3), cl::desc("Potential PHI threshold per loop for PPC loop prep of DQ form")) |
| static cl::opt< unsigned > | DispFormPrepMinThreshold ("ppc-dispprep-min-threshold", cl::Hidden, cl::init(2), cl::desc("Minimal common base load/store instructions triggering DS/DQ form " "preparation")) |
| static const char * | name = "Prepare loop for ppc preferred instruction forms" |
| static const std::string | PHINodeNameSuffix = ".phi" |
| static const std::string | CastNodeNameSuffix = ".cast" |
| static const std::string | GEPNodeIncNameSuffix = ".inc" |
| static const std::string | GEPNodeOffNameSuffix = ".off" |
| #define DEBUG_TYPE "ppc-loop-instr-form-prep" |
Definition at line 44 of file PPCLoopInstrFormPrep.cpp.
| enum InstrForm |
Definition at line 149 of file PPCLoopInstrFormPrep.cpp.
Definition at line 266 of file PPCLoopInstrFormPrep.cpp.
References assert(), llvm::Value::getName(), and llvm::Value::hasName().
Referenced by GetPointerOperand().
Definition at line 274 of file PPCLoopInstrFormPrep.cpp.
References llvm::PHINode::addIncoming(), llvm::any_of(), assert(), B, llvm::LoopBase< BlockT, LoopT >::blocks(), CastNodeNameSuffix, llvm::SmallSet< T, N, C >::count(), llvm::SmallPtrSetImpl< PtrType >::count(), llvm::GetElementPtrInst::Create(), llvm::PHINode::Create(), llvm::dbgs(), llvm::DeleteDeadPHIs(), llvm::df_begin(), llvm::df_end(), DispFormPrepMinThreshold, llvm::dyn_cast(), E, llvm::SmallVectorBase::empty(), llvm::LoopBase< BlockT, LoopT >::empty(), llvm::DenseMapBase< DenseMap< KeyT, ValueT, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >::end(), F(), llvm::DenseMapBase< DenseMap< KeyT, ValueT, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >::find(), function, GEPNodeIncNameSuffix, GEPNodeOffNameSuffix, llvm::SCEVConstant::getAPInt(), llvm::Module::getDataLayout(), llvm::BasicBlock::getFirstInsertionPt(), llvm::BasicBlock::getFirstNonPHI(), llvm::LoopBase< BlockT, LoopT >::getHeader(), llvm::PHINode::getIncomingBlock(), getInstrName(), llvm::Type::getInt8PtrTy(), llvm::Type::getInt8Ty(), llvm::SCEVAddRecExpr::getLoop(), llvm::LoopBase< BlockT, LoopT >::getLoopLatch(), llvm::LoopBase< BlockT, LoopT >::getLoopPredecessor(), llvm::BasicBlock::getModule(), llvm::PHINode::getNumIncomingValues(), llvm::Instruction::getParent(), getParent(), llvm::Type::getPointerAddressSpace(), llvm::Type::getPointerElementType(), llvm::SCEVAddRecExpr::getStart(), llvm::SCEVAddRecExpr::getStepRecurrence(), llvm::BasicBlock::getTerminator(), llvm::Value::getType(), llvm::SCEVConstant::getValue(), I, llvm::ARM_PROC::IE, llvm::SmallSet< T, N, C >::insert(), llvm::SmallPtrSetImpl< PtrType >::insert(), llvm::Instruction::insertAfter(), llvm::InsertPreheaderForLoop(), llvm::SCEVAddRecExpr::isAffine(), llvm::Type::isDoubleTy(), llvm::Type::isFloatTy(), llvm::Type::isIntegerTy(), llvm::Loop::isLoopInvariant(), IsPtrInBounds(), llvm::isSafeToExpand(), llvm::APInt::isSignedIntN(), llvm::Type::isVoidTy(), llvm::LCSSAID, llvm::AArch64CC::LE, LLVM_DEBUG, MaxVarsDQForm, MaxVarsDSForm, MaxVarsPrep, MaxVarsUpdateForm, PHINodeNameSuffix, llvm::BasicBlock::phis(), llvm::pred_size(), llvm::predecessors(), PreferUpdateForm, prefetch, llvm::RecursivelyDeleteTriviallyDeadInstructions(), llvm::Value::replaceAllUsesWith(), runOnFunction(), second, llvm::GetElementPtrInst::setIsInBounds(), llvm::APInt::srem(), llvm::ARM_MB::ST, std::swap(), llvm::SystemZISD::TM, llvm::APInt::urem(), and llvm::Value::users().
Definition at line 256 of file PPCLoopInstrFormPrep.cpp.
References GEP.
Referenced by GetPointerOperand().
| STATISTIC | ( | PHINodeAlreadyExistsUpdate | , |
| "PHI node already in pre-increment form" | |||
| ) |
| STATISTIC | ( | PHINodeAlreadyExistsDS | , |
| "PHI node already in DS form" | |||
| ) |
| STATISTIC | ( | PHINodeAlreadyExistsDQ | , |
| "PHI node already in DQ form" | |||
| ) |
| STATISTIC | ( | DSFormChainRewritten | , |
| "Num of DS form chain rewritten" | |||
| ) |
| STATISTIC | ( | DQFormChainRewritten | , |
| "Num of DQ form chain rewritten" | |||
| ) |
| STATISTIC | ( | UpdFormChainRewritten | , |
| "Num of update form chain rewritten" | |||
| ) |
|
static |
Definition at line 248 of file PPCLoopInstrFormPrep.cpp.
Referenced by GetPointerOperand().
|
static |
Referenced by GetPointerOperand().
|
static |
Definition at line 249 of file PPCLoopInstrFormPrep.cpp.
Referenced by GetPointerOperand().
|
static |
Definition at line 250 of file PPCLoopInstrFormPrep.cpp.
Referenced by GetPointerOperand().
|
static |
Referenced by GetPointerOperand().
|
static |
Referenced by GetPointerOperand().
|
static |
Referenced by GetPointerOperand().
|
static |
Referenced by GetPointerOperand().
Definition at line 241 of file PPCLoopInstrFormPrep.cpp.
Referenced by llvm::RISCVMCExpr::classof(), llvm::SparcMCExpr::classof(), llvm::object::Archive::classof(), llvm::LTOCodeGenerator::compileOptimized(), computeAddrSpace(), llvm::NVPTXAsmPrinter::doFinalization(), llvm::pdb::DIARawSymbol::dump(), FunctionNumber(), llvm::LTOModule::getAsmUndefinedRefs(), llvm::sys::Process::getPageSizeEstimate(), llvm::SparcTargetLowering::getRegForInlineAsmConstraint(), llvm::LTOModule::getSymbolName(), llvm::MCSymbolXCOFF::getUnqualifiedName(), llvm::RISCVMCExpr::getVariantKindForName(), hasGOTReference(), isOptimizingForSize(), llvm::LTOModule::makeBuffer(), llvm::detail::PassModel< IRUnitT, PassT, PreservedAnalysesT, AnalysisManagerT, ExtraArgTs >::name(), llvm::detail::AnalysisPassModel< IRUnitT, PassT, PreservedAnalysesT, InvalidatorT, ExtraArgTs >::name(), llvm::OProfileWrapper::OProfileWrapper(), and llvm::SparcMCExpr::parseVariantKind().
|
static |
Definition at line 247 of file PPCLoopInstrFormPrep.cpp.
Referenced by GetPointerOperand().
|
static |
Referenced by GetPointerOperand().
1.8.13