LLVM
8.0.1
|
#include "llvm/CodeGen/MachineTraceMetrics.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/Optional.h"
#include "llvm/ADT/PostOrderIterator.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/SparseSet.h"
#include "llvm/CodeGen/MachineBasicBlock.h"
#include "llvm/CodeGen/MachineBranchProbabilityInfo.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineInstr.h"
#include "llvm/CodeGen/MachineLoopInfo.h"
#include "llvm/CodeGen/MachineOperand.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/CodeGen/TargetRegisterInfo.h"
#include "llvm/CodeGen/TargetSchedule.h"
#include "llvm/CodeGen/TargetSubtargetInfo.h"
#include "llvm/MC/MCRegisterInfo.h"
#include "llvm/Pass.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/Format.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
#include <cassert>
#include <iterator>
#include <tuple>
#include <utility>
Go to the source code of this file.
Classes | |
class | llvm::po_iterator_storage< LoopBounds, true > |
Namespaces | |
llvm | |
This class represents lattice values for constants. | |
Macros | |
#define | DEBUG_TYPE "machine-trace-metrics" |
Typedefs | |
using | MIHeightMap = DenseMap< const MachineInstr *, unsigned > |
Variables | |
DEBUG_TYPE | |
Machine Trace | Metrics |
Machine Trace | false |
#define DEBUG_TYPE "machine-trace-metrics" |
Definition at line 42 of file MachineTraceMetrics.cpp.
using MIHeightMap = DenseMap<const MachineInstr *, unsigned> |
Definition at line 949 of file MachineTraceMetrics.cpp.
|
static |
Definition at line 651 of file MachineTraceMetrics.cpp.
References E, llvm::MachineInstr::getOperandNo(), llvm::MachineOperand::getReg(), I, llvm::MachineInstr::isDebugInstr(), llvm::TargetRegisterInfo::isPhysicalRegister(), llvm::MachineOperand::isReg(), llvm::MachineInstr::operands_begin(), llvm::MachineInstr::operands_end(), llvm::SmallVectorTemplateBase< T >::push_back(), llvm::MachineOperand::readsReg(), and Reg.
Referenced by pushDepHeight(), and llvm::MachineTraceMetrics::Ensemble::updateDepth().
|
static |
Definition at line 681 of file MachineTraceMetrics.cpp.
References assert(), llvm::MachineOperand::getMBB(), llvm::MachineInstr::getNumOperands(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::MachineInstr::isPHI(), llvm::SmallVectorTemplateBase< T >::push_back(), and Reg.
Referenced by llvm::MachineTraceMetrics::Trace::getPHIDepth(), pushDepHeight(), and llvm::MachineTraceMetrics::Ensemble::updateDepth().
INITIALIZE_PASS_BEGIN | ( | MachineTraceMetrics | , |
DEBUG_TYPE | , | ||
"Machine Trace Metrics" | , | ||
false | , | ||
true | |||
) |
|
static |
Definition at line 304 of file MachineTraceMetrics.cpp.
References llvm::LoopBase< BlockT, LoopT >::contains(), llvm::Depth, llvm::MachineTraceMetrics::Ensemble, llvm::MachineTraceMetrics::Ensemble::getDepthResources(), llvm::LoopBase< BlockT, LoopT >::getHeader(), llvm::MachineTraceMetrics::Ensemble::getHeightResources(), llvm::MachineTraceMetrics::Ensemble::getLoopFor(), llvm::MachineTraceMetrics::Ensemble::getName(), llvm::MachineTraceMetrics::getResources(), llvm::MachineTraceMetrics::FixedBlockInfo::InstrCount, llvm::MachineTraceMetrics::TraceBlockInfo::InstrDepth, llvm::MachineTraceMetrics::TraceBlockInfo::InstrHeight, llvm::MachineTraceMetrics::Ensemble::MTM, llvm::MachineTraceMetrics::Ensemble::pickTracePred(), llvm::MachineTraceMetrics::Ensemble::pickTraceSucc(), llvm::MachineBasicBlock::pred_empty(), llvm::MachineBasicBlock::predecessors(), and llvm::MachineBasicBlock::successors().
Referenced by llvm::po_iterator_storage< LoopBounds, true >::insertEdge().
|
static |
Definition at line 953 of file MachineTraceMetrics.cpp.
References llvm::addLiveIns(), assert(), llvm::SmallVectorTemplateCommon< T >::back(), llvm::SparseSet< ValueT, KeyFunctorT, SparseT >::begin(), llvm::MachineBasicBlock::begin(), llvm::SmallVectorImpl< T >::clear(), llvm::TargetSchedModel::computeOperandLatency(), llvm::dbgs(), DefMI, llvm::SmallVectorBase::empty(), llvm::ArrayRef< T >::empty(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::end(), llvm::SparseSet< ValueT, KeyFunctorT, SparseT >::end(), llvm::MachineBasicBlock::end(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::erase(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::find(), llvm::format(), llvm::SmallVectorTemplateCommon< T >::front(), getDataDeps(), llvm::LoopBase< BlockT, LoopT >::getHeader(), llvm::MachineTraceMetrics::Ensemble::getLoopFor(), llvm::MachineBasicBlock::getNumber(), llvm::MCRegisterInfo::getNumRegUnits(), llvm::MachineInstr::getOperand(), llvm::MachineInstr::getParent(), getPHIDeps(), llvm::TargetSchedModel::getProcResource(), llvm::MachineTraceMetrics::Ensemble::getProcResourceHeights(), llvm::MachineOperand::getReg(), llvm::TargetSchedModel::getResourceFactor(), llvm::MachineRegisterInfo::getVRegDef(), I, llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::insert(), llvm::MachineInstr::isPHI(), llvm::MachineBasicBlock::isSuccessor(), llvm::TargetRegisterInfo::isVirtualRegister(), LLVM_DEBUG, llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::lookup(), llvm::max(), MI, llvm::MachineTraceMetrics::Ensemble::MTM, llvm::MCProcResourceDesc::Name, llvm::SmallVectorTemplateBase< T >::pop_back(), llvm::printMBBReference(), llvm::printReg(), llvm::printRegUnit(), llvm::SmallVectorTemplateBase< T >::push_back(), Reg, llvm::SparseSet< ValueT, KeyFunctorT, SparseT >::setUniverse(), llvm::ArrayRef< T >::size(), and updatePhysDepsUpwards().
|
static |
Definition at line 700 of file MachineTraceMetrics.cpp.
References assert(), DefMI, llvm::SparseSet< ValueT, KeyFunctorT, SparseT >::end(), llvm::SparseSet< ValueT, KeyFunctorT, SparseT >::erase(), llvm::SparseSet< ValueT, KeyFunctorT, SparseT >::find(), llvm::MachineBasicBlock::getNumber(), llvm::MachineInstr::getOperand(), llvm::MachineInstr::getOperandNo(), llvm::MachineInstr::getParent(), llvm::MachineOperand::getReg(), llvm::MachineRegisterInfo::getVRegDef(), I, llvm::MachineOperand::isDead(), llvm::MachineOperand::isDef(), llvm::MachineOperand::isKill(), llvm::TargetRegisterInfo::isPhysicalRegister(), llvm::MachineOperand::isReg(), llvm::MCRegisterInfo::DiffListIterator::isValid(), llvm::TargetRegisterInfo::isVirtualRegister(), llvm::RegState::Kill, llvm::max(), llvm::LiveRegUnit::MI, MI, llvm::MachineTraceMetrics::Ensemble::MTM, llvm::LiveRegUnit::Op, llvm::MachineInstr::operands_begin(), llvm::MachineInstr::operands_end(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::SmallVectorTemplateBase< T >::push_back(), llvm::MachineOperand::readsReg(), Reg, llvm::MachineTraceMetrics::Ensemble::updateDepth(), and UseMI.
Referenced by llvm::MachineTraceMetrics::Ensemble::updateDepth().
|
static |
Definition at line 893 of file MachineTraceMetrics.cpp.
References llvm::TargetSchedModel::computeOperandLatency(), llvm::LiveRegUnit::Cycle, llvm::SparseSet< ValueT, KeyFunctorT, SparseT >::end(), llvm::SparseSet< ValueT, KeyFunctorT, SparseT >::erase(), llvm::SparseSet< ValueT, KeyFunctorT, SparseT >::find(), llvm::MachineInstr::getOperand(), llvm::MachineInstr::getOperandNo(), llvm::MachineOperand::getReg(), I, llvm::MachineOperand::isDef(), llvm::TargetRegisterInfo::isPhysicalRegister(), llvm::MachineOperand::isReg(), llvm::MachineInstr::isTransient(), llvm::MCRegisterInfo::DiffListIterator::isValid(), llvm::max(), llvm::LiveRegUnit::MI, MI, llvm::LiveRegUnit::Op, llvm::MachineInstr::operands_begin(), llvm::MachineInstr::operands_end(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::MachineOperand::readsReg(), Reg, and llvm::SmallVectorBase::size().
Referenced by pushDepHeight().
DEBUG_TYPE |
Definition at line 52 of file MachineTraceMetrics.cpp.
Definition at line 52 of file MachineTraceMetrics.cpp.
Definition at line 52 of file MachineTraceMetrics.cpp.
Referenced by llvm::ApproximateLoopSize(), asmClobbersCTR(), llvm::LoopDataPrefetchPass::run(), and shouldRotateLoopExitingLatch().