LLVM  4.0.0
Classes | Namespaces | Macros | Functions | Variables
ScheduleDAGInstrs.cpp File Reference
#include "llvm/CodeGen/ScheduleDAGInstrs.h"
#include "llvm/ADT/IntEqClasses.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallSet.h"
#include "llvm/Analysis/AliasAnalysis.h"
#include "llvm/Analysis/ValueTracking.h"
#include "llvm/CodeGen/LiveIntervalAnalysis.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/MachineFrameInfo.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/CodeGen/MachineMemOperand.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/CodeGen/PseudoSourceValue.h"
#include "llvm/CodeGen/RegisterPressure.h"
#include "llvm/CodeGen/ScheduleDFS.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/Type.h"
#include "llvm/IR/Operator.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/Format.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Target/TargetInstrInfo.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/Target/TargetRegisterInfo.h"
#include "llvm/Target/TargetSubtargetInfo.h"
Include dependency graph for ScheduleDAGInstrs.cpp:

Go to the source code of this file.

Classes

class  llvm::ScheduleDAGInstrs::Value2SUsMap
 
class  llvm::SchedDFSImpl
 Internal state used to compute SchedDFSResult. More...
 

Namespaces

 llvm
 Compute iterated dominance frontiers using a linear time algorithm.
 

Macros

#define DEBUG_TYPE   "misched"
 

Functions

static unsigned getReductionSize ()
 
static void dumpSUList (ScheduleDAGInstrs::SUList &L)
 
static const ValuegetUnderlyingObjectFromInt (const Value *V)
 getUnderlyingObjectFromInt - This is the function that does the work of looking through basic ptrtoint+arithmetic+inttoptr sequences. More...
 
static void getUnderlyingObjects (const Value *V, SmallVectorImpl< Value * > &Objects, const DataLayout &DL)
 getUnderlyingObjects - This is a wrapper around GetUnderlyingObjects and adds support for basic ptrtoint+arithmetic+inttoptr sequences. More...
 
static void getUnderlyingObjectsForInstr (const MachineInstr *MI, const MachineFrameInfo &MFI, UnderlyingObjectsVector &Objects, const DataLayout &DL)
 getUnderlyingObjectsForInstr - If this machine instr has memory reference information and it can be tracked to a normal reference to a known object, return the Value for that object. More...
 
static bool isGlobalMemoryObject (AliasAnalysis *AA, MachineInstr *MI)
 Return true if MI is an instruction we are unable to reason about (like a call or something with unmodeled side effects). More...
 
static bool MIsNeedChainEdge (AliasAnalysis *AA, const MachineFrameInfo *MFI, const DataLayout &DL, MachineInstr *MIa, MachineInstr *MIb)
 This returns true if the two MIs need a chain edge between them. More...
 
static void toggleBundleKillFlag (MachineInstr *MI, unsigned Reg, bool NewKillState, const TargetRegisterInfo *TRI)
 If we change a kill flag on the bundle instruction implicit register operands, then we also need to propagate that to any instructions inside the bundle which had the same kill state. More...
 
static bool hasDataSucc (const SUnit *SU)
 
raw_ostreamllvm::operator<< (raw_ostream &OS, const ILPValue &Val)
 

Variables

static cl::opt< boolEnableAASchedMI ("enable-aa-sched-mi", cl::Hidden, cl::ZeroOrMore, cl::init(false), cl::desc("Enable use of AA during MI DAG construction"))
 
static cl::opt< boolUseTBAA ("use-tbaa-in-sched-mi", cl::Hidden, cl::init(true), cl::desc("Enable use of TBAA during MI DAG construction"))
 
static cl::opt< unsignedHugeRegion ("dag-maps-huge-region", cl::Hidden, cl::init(1000), cl::desc("The limit to use while constructing the DAG ""prior to scheduling, at which point a trade-off ""is made to avoid excessive compile time."))
 
static cl::opt< unsignedReductionSize ("dag-maps-reduction-size", cl::Hidden, cl::desc("A huge scheduling region will have maps reduced by this many ""nodes at a time. Defaults to HugeRegion / 2."))
 

Macro Definition Documentation

#define DEBUG_TYPE   "misched"

Definition at line 44 of file ScheduleDAGInstrs.cpp.

Function Documentation

static void dumpSUList ( ScheduleDAGInstrs::SUList L)
static

Definition at line 77 of file ScheduleDAGInstrs.cpp.

References llvm::dbgs().

Referenced by llvm::ScheduleDAGInstrs::Value2SUsMap::dump().

static unsigned getReductionSize ( )
static

Definition at line 69 of file ScheduleDAGInstrs.cpp.

References HugeRegion, and ReductionSize.

Referenced by llvm::ScheduleDAGInstrs::buildSchedGraph().

static const Value* getUnderlyingObjectFromInt ( const Value V)
static

getUnderlyingObjectFromInt - This is the function that does the work of looking through basic ptrtoint+arithmetic+inttoptr sequences.

Definition at line 106 of file ScheduleDAGInstrs.cpp.

References llvm::MCID::Add, assert(), llvm::Operator::getOpcode(), llvm::Value::getType(), and llvm::Type::isIntegerTy().

Referenced by getUnderlyingObjects().

static void getUnderlyingObjects ( const Value V,
SmallVectorImpl< Value * > &  Objects,
const DataLayout DL 
)
static
static void getUnderlyingObjectsForInstr ( const MachineInstr MI,
const MachineFrameInfo MFI,
UnderlyingObjectsVector Objects,
const DataLayout DL 
)
static

getUnderlyingObjectsForInstr - If this machine instr has memory reference information and it can be tracked to a normal reference to a known object, return the Value for that object.

Definition at line 164 of file ScheduleDAGInstrs.cpp.

References llvm::SmallVectorImpl< T >::clear(), getUnderlyingObjects(), llvm::MachineFrameInfo::hasTailCall(), llvm::isIdentifiedObject(), llvm::MayAlias, llvm::MachineInstr::memoperands(), and llvm::SmallVectorTemplateBase< T, isPodLike >::push_back().

Referenced by llvm::ScheduleDAGInstrs::buildSchedGraph().

static bool hasDataSucc ( const SUnit SU)
static
static bool isGlobalMemoryObject ( AliasAnalysis AA,
MachineInstr MI 
)
inlinestatic

Return true if MI is an instruction we are unable to reason about (like a call or something with unmodeled side effects).

Definition at line 550 of file ScheduleDAGInstrs.cpp.

References llvm::MachineInstr::hasOrderedMemoryRef(), llvm::MachineInstr::hasUnmodeledSideEffects(), llvm::MachineInstr::isCall(), and llvm::MachineInstr::isDereferenceableInvariantLoad().

Referenced by llvm::ScheduleDAGInstrs::buildSchedGraph().

static bool MIsNeedChainEdge ( AliasAnalysis AA,
const MachineFrameInfo MFI,
const DataLayout DL,
MachineInstr MIa,
MachineInstr MIb 
)
static
static void toggleBundleKillFlag ( MachineInstr MI,
unsigned  Reg,
bool  NewKillState,
const TargetRegisterInfo TRI 
)
static

If we change a kill flag on the bundle instruction implicit register operands, then we also need to propagate that to any instructions inside the bundle which had the same kill state.

Definition at line 1164 of file ScheduleDAGInstrs.cpp.

References llvm::WebAssembly::End, llvm::getBundleEnd(), llvm::ilist_node_impl< OptionsT >::getIterator(), and llvm::MachineInstr::getOpcode().

Referenced by llvm::ScheduleDAGInstrs::toggleKillFlag().

Variable Documentation

cl::opt<bool> EnableAASchedMI("enable-aa-sched-mi", cl::Hidden, cl::ZeroOrMore, cl::init(false), cl::desc("Enable use of AA during MI DAG construction"))
static
cl::opt<unsigned> HugeRegion("dag-maps-huge-region", cl::Hidden, cl::init(1000), cl::desc("The limit to use while constructing the DAG ""prior to scheduling, at which point a trade-off ""is made to avoid excessive compile time."))
static
cl::opt<unsigned> ReductionSize("dag-maps-reduction-size", cl::Hidden, cl::desc("A huge scheduling region will have maps reduced by this many ""nodes at a time. Defaults to HugeRegion / 2."))
static

Referenced by getReductionSize().

cl::opt<bool> UseTBAA("use-tbaa-in-sched-mi", cl::Hidden, cl::init(true), cl::desc("Enable use of TBAA during MI DAG construction"))
static

Referenced by MIsNeedChainEdge().