LLVM  8.0.1
Namespaces | Macros | Functions | Variables
PPCLoopPreIncPrep.cpp File Reference
#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/Transforms/Utils/Local.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/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/LoopUtils.h"
#include <cassert>
#include <iterator>
#include <utility>
Include dependency graph for PPCLoopPreIncPrep.cpp:

Go to the source code of this file.

Namespaces

 llvm
 This class represents lattice values for constants.
 

Macros

#define DEBUG_TYPE   "ppc-loop-preinc-prep"
 

Functions

 STATISTIC (PHINodeAlreadyExists, "PHI node already in pre-increment form")
 
void llvm::initializePPCLoopPreIncPrepPass (PassRegistry &)
 
static bool IsPtrInBounds (Value *BasePtr)
 
static ValueGetPointerOperand (Value *MemI)
 

Variables

static cl::opt< unsignedMaxVars ("ppc-preinc-prep-max-vars", cl::Hidden, cl::init(16), cl::desc("Potential PHI threshold for PPC preinc loop prep"))
 
static const charname = "Prepare loop for pre-inc. addressing modes"
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "ppc-loop-preinc-prep"

Definition at line 22 of file PPCLoopPreIncPrep.cpp.

Function Documentation

◆ GetPointerOperand()

static Value* GetPointerOperand ( Value MemI)
static

Definition at line 155 of file PPCLoopPreIncPrep.cpp.

References llvm::PHINode::addIncoming(), assert(), B, llvm::SmallVectorTemplateCommon< T >::begin(), llvm::LoopBase< BlockT, LoopT >::block_begin(), llvm::LoopBase< BlockT, LoopT >::block_end(), llvm::SmallPtrSetImpl< PtrType >::count(), llvm::GetElementPtrInst::Create(), llvm::PHINode::Create(), llvm::dbgs(), llvm::DeleteDeadPHIs(), llvm::df_begin(), llvm::df_end(), llvm::dyn_cast(), E, llvm::SmallVectorBase::empty(), llvm::LoopBase< BlockT, LoopT >::empty(), llvm::SmallVectorTemplateCommon< T >::end(), F(), llvm::Module::getDataLayout(), llvm::BasicBlock::getFirstInsertionPt(), llvm::BasicBlock::getFirstNonPHI(), llvm::LoopBase< BlockT, LoopT >::getHeader(), llvm::PHINode::getIncomingBlock(), llvm::Type::getInt8PtrTy(), llvm::Type::getInt8Ty(), llvm::SCEVAddRecExpr::getLoop(), llvm::LoopBase< BlockT, LoopT >::getLoopLatch(), llvm::LoopBase< BlockT, LoopT >::getLoopPredecessor(), llvm::BasicBlock::getModule(), llvm::Value::getName(), llvm::PHINode::getNumIncomingValues(), llvm::Instruction::getParent(), llvm::BasicBlock::getParent(), getParent(), llvm::Type::getPointerAddressSpace(), llvm::Type::getPointerElementType(), llvm::SCEVAddRecExpr::getStart(), llvm::SCEVAddRecExpr::getStepRecurrence(), llvm::BasicBlock::getTerminator(), llvm::Value::getType(), llvm::SCEVConstant::getValue(), llvm::PPCSubtarget::hasAltivec(), llvm::Value::hasName(), I, llvm::ARM_PROC::IE, llvm::SmallPtrSetImpl< PtrType >::insert(), llvm::Instruction::insertAfter(), llvm::InsertPreheaderForLoop(), llvm::SCEVAddRecExpr::isAffine(), llvm::Type::isIntegerTy(), llvm::Loop::isLoopInvariant(), IsPtrInBounds(), llvm::isSafeToExpand(), llvm::APInt::isSignedIntN(), llvm::Type::isVectorTy(), llvm::Type::isVoidTy(), llvm::LCSSAID, llvm::AArch64CC::LE, LLVM_DEBUG, MaxVars, llvm::BasicBlock::phis(), llvm::pred_begin(), llvm::pred_end(), llvm::pred_size(), llvm::Intrinsic::prefetch, llvm::RecursivelyDeleteTriviallyDeadInstructions(), llvm::Value::replaceAllUsesWith(), runOnFunction(), llvm::GetElementPtrInst::setIsInBounds(), llvm::SmallVectorBase::size(), llvm::APInt::srem(), llvm::ARM_MB::ST, std::swap(), and llvm::SystemZISD::TM.

◆ IsPtrInBounds()

static bool IsPtrInBounds ( Value BasePtr)
static

Definition at line 145 of file PPCLoopPreIncPrep.cpp.

References GEP.

Referenced by GetPointerOperand().

◆ STATISTIC()

STATISTIC ( PHINodeAlreadyExists  ,
"PHI node already in pre-increment form"   
)

Variable Documentation

◆ MaxVars

cl::opt<unsigned> MaxVars("ppc-preinc-prep-max-vars", cl::Hidden, cl::init(16), cl::desc("Potential PHI threshold for PPC preinc loop prep"))
static

Referenced by GetPointerOperand().

◆ name

const char* name = "Prepare loop for pre-inc. addressing modes"
static