LLVM API Documentation
#include "ScheduleDAGSDNodes.h"
#include "InstrEmitter.h"
#include "SDNodeDbgValue.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallSet.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/CodeGen/SelectionDAG.h"
#include "llvm/MC/MCInstrItineraries.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Target/TargetInstrInfo.h"
#include "llvm/Target/TargetLowering.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/Target/TargetRegisterInfo.h"
#include "llvm/Target/TargetSubtargetInfo.h"
Go to the source code of this file.
Defines | |
#define | DEBUG_TYPE "pre-RA-sched" |
Functions | |
STATISTIC (LoadsClustered,"Number of loads clustered together") | |
static void | CheckForPhysRegDependency (SDNode *Def, SDNode *User, unsigned Op, const TargetRegisterInfo *TRI, const TargetInstrInfo *TII, unsigned &PhysReg, int &Cost) |
static void | CloneNodeWithValues (SDNode *N, SelectionDAG *DAG, SmallVectorImpl< EVT > &VTs, SDValue ExtraOper=SDValue()) |
static bool | AddGlue (SDNode *N, SDValue Glue, bool AddGlue, SelectionDAG *DAG) |
static void | RemoveUnusedGlue (SDNode *N, SelectionDAG *DAG) |
static void | ProcessSDDbgValues (SDNode *N, SelectionDAG *DAG, InstrEmitter &Emitter, SmallVectorImpl< std::pair< unsigned, MachineInstr * > > &Orders, DenseMap< SDValue, unsigned > &VRBaseMap, unsigned Order) |
ProcessSDDbgValues - Process SDDbgValues associated with this node. | |
static void | ProcessSourceNode (SDNode *N, SelectionDAG *DAG, InstrEmitter &Emitter, DenseMap< SDValue, unsigned > &VRBaseMap, SmallVectorImpl< std::pair< unsigned, MachineInstr * > > &Orders, SmallSet< unsigned, 8 > &Seen) |
Variables | |
static cl::opt< int > | HighLatencyCycles ("sched-high-latency-cycles", cl::Hidden, cl::init(10), cl::desc("Roughly estimate the number of cycles that 'long latency'""instructions take for targets with no itinerary")) |
#define DEBUG_TYPE "pre-RA-sched" |
Definition at line 37 of file ScheduleDAGSDNodes.cpp.
Definition at line 163 of file ScheduleDAGSDNodes.cpp.
References CloneNodeWithValues(), llvm::SDValue::getNode(), llvm::SDNode::getNumOperands(), llvm::SDNode::getNumValues(), llvm::SDNode::getOperand(), llvm::SDNode::getValueType(), llvm::MVT::Glue, I, and llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back().
static void CheckForPhysRegDependency | ( | SDNode * | Def, |
SDNode * | User, | ||
unsigned | Op, | ||
const TargetRegisterInfo * | TRI, | ||
const TargetInstrInfo * | TII, | ||
unsigned & | PhysReg, | ||
int & | Cost | ||
) | [static] |
CheckForPhysRegDependency - Check if the dependency between def and use of a specified operand is a physical register dependency. If so, returns the register and the cost of copying the register.
Definition at line 111 of file ScheduleDAGSDNodes.cpp.
References llvm::ISD::CopyToReg, llvm::MCInstrInfo::get(), llvm::TargetRegisterClass::getCopyCost(), llvm::SDNode::getMachineOpcode(), llvm::TargetRegisterInfo::getMinimalPhysRegClass(), llvm::MCInstrDesc::getNumDefs(), llvm::SDNode::getOpcode(), llvm::SDNode::getOperand(), getReg(), llvm::SDValue::getResNo(), llvm::SDNode::getValueType(), llvm::MCInstrDesc::ImplicitDefs, llvm::SDNode::isMachineOpcode(), and llvm::TargetRegisterInfo::isVirtualRegister().
static void CloneNodeWithValues | ( | SDNode * | N, |
SelectionDAG * | DAG, | ||
SmallVectorImpl< EVT > & | VTs, | ||
SDValue | ExtraOper = SDValue() |
||
) | [static] |
Definition at line 136 of file ScheduleDAGSDNodes.cpp.
References llvm::dyn_cast(), llvm::SDNode::getNumOperands(), llvm::SDNode::getOpcode(), llvm::SDNode::getOperand(), llvm::SelectionDAG::getVTList(), I, llvm::MachineSDNode::memoperands_begin(), llvm::MachineSDNode::memoperands_end(), llvm::SelectionDAG::MorphNodeTo(), llvm::SmallVectorTemplateBase< T, isPodLike >::push_back(), and llvm::MachineSDNode::setMemRefs().
Referenced by AddGlue(), and RemoveUnusedGlue().
static void ProcessSDDbgValues | ( | SDNode * | N, |
SelectionDAG * | DAG, | ||
InstrEmitter & | Emitter, | ||
SmallVectorImpl< std::pair< unsigned, MachineInstr * > > & | Orders, | ||
DenseMap< SDValue, unsigned > & | VRBaseMap, | ||
unsigned | Order | ||
) | [static] |
ProcessSDDbgValues - Process SDDbgValues associated with this node.
Definition at line 701 of file ScheduleDAGSDNodes.cpp.
References llvm::ScheduleDAGSDNodes::BB, llvm::InstrEmitter::EmitDbgValue(), llvm::InstrEmitter::getBlock(), llvm::SelectionDAG::GetDbgValues(), llvm::SDNode::getHasDebugValue(), llvm::InstrEmitter::getInsertPos(), llvm::MachineBasicBlock::insert(), and llvm::ArrayRef< T >::size().
Referenced by ProcessSourceNode().
static void ProcessSourceNode | ( | SDNode * | N, |
SelectionDAG * | DAG, | ||
InstrEmitter & | Emitter, | ||
DenseMap< SDValue, unsigned > & | VRBaseMap, | ||
SmallVectorImpl< std::pair< unsigned, MachineInstr * > > & | Orders, | ||
SmallSet< unsigned, 8 > & | Seen | ||
) | [static] |
Definition at line 731 of file ScheduleDAGSDNodes.cpp.
References llvm::MachineBasicBlock::back(), llvm::ScheduleDAGSDNodes::BB, llvm::MachineBasicBlock::begin(), llvm::InstrEmitter::getBlock(), llvm::InstrEmitter::getInsertPos(), llvm::SDNode::getIROrder(), llvm::SmallSet< T, N, C >::insert(), llvm::MachineInstr::isPHI(), ProcessSDDbgValues(), and llvm::MachineBasicBlock::push_back().
Referenced by llvm::ScheduleDAGSDNodes::EmitSchedule().
static void RemoveUnusedGlue | ( | SDNode * | N, |
SelectionDAG * | DAG | ||
) | [static] |
Definition at line 191 of file ScheduleDAGSDNodes.cpp.
References CloneNodeWithValues(), llvm::SDNode::getNumValues(), llvm::SDNode::getValueType(), llvm::MVT::Glue, llvm::SDNode::hasAnyUseOfValue(), I, and llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back().
STATISTIC | ( | LoadsClustered | , |
"Number of loads clustered together" | |||
) |
cl::opt<int> HighLatencyCycles("sched-high-latency-cycles", cl::Hidden, cl::init(10), cl::desc("Roughly estimate the number of cycles that 'long latency'""instructions take for targets with no itinerary")) [static] |
Referenced by llvm::ScheduleDAGSDNodes::computeLatency().