LLVM  10.0.0svn
Classes | Namespaces | Macros | Functions | Variables
ScheduleDAGInstrs.cpp File Reference
#include "llvm/CodeGen/ScheduleDAGInstrs.h"
#include "llvm/ADT/IntEqClasses.h"
#include "llvm/ADT/MapVector.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/SparseSet.h"
#include "llvm/ADT/iterator_range.h"
#include "llvm/Analysis/AliasAnalysis.h"
#include "llvm/Analysis/ValueTracking.h"
#include "llvm/CodeGen/LiveIntervals.h"
#include "llvm/CodeGen/LivePhysRegs.h"
#include "llvm/CodeGen/MachineBasicBlock.h"
#include "llvm/CodeGen/MachineFrameInfo.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineInstr.h"
#include "llvm/CodeGen/MachineInstrBundle.h"
#include "llvm/CodeGen/MachineMemOperand.h"
#include "llvm/CodeGen/MachineOperand.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/CodeGen/PseudoSourceValue.h"
#include "llvm/CodeGen/RegisterPressure.h"
#include "llvm/CodeGen/ScheduleDAG.h"
#include "llvm/CodeGen/ScheduleDFS.h"
#include "llvm/CodeGen/SlotIndexes.h"
#include "llvm/CodeGen/TargetRegisterInfo.h"
#include "llvm/CodeGen/TargetSubtargetInfo.h"
#include "llvm/Config/llvm-config.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/Instruction.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/Operator.h"
#include "llvm/IR/Type.h"
#include "llvm/IR/Value.h"
#include "llvm/MC/LaneBitmask.h"
#include "llvm/MC/MCRegisterInfo.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Compiler.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 <string>
#include <utility>
#include <vector>
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
 This class represents lattice values for constants.
 

Macros

#define DEBUG_TYPE   "machine-scheduler"
 

Functions

static unsigned getReductionSize ()
 
static void dumpSUList (ScheduleDAGInstrs::SUList &L)
 
static bool getUnderlyingObjectsForInstr (const MachineInstr *MI, const MachineFrameInfo &MFI, UnderlyingObjectsVector &Objects, const DataLayout &DL)
 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)
 Returns true if MI is an instruction we are unable to reason about (like a call or something with unmodeled side effects). More...
 
static void toggleKills (const MachineRegisterInfo &MRI, LivePhysRegs &LiveRegs, MachineInstr &MI, bool addToLiveRegs)
 
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

◆ DEBUG_TYPE

#define DEBUG_TYPE   "machine-scheduler"

Definition at line 66 of file ScheduleDAGInstrs.cpp.

Function Documentation

◆ dumpSUList()

static void dumpSUList ( ScheduleDAGInstrs::SUList L)
static

Definition at line 99 of file ScheduleDAGInstrs.cpp.

References llvm::dbgs().

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

◆ getReductionSize()

static unsigned getReductionSize ( )
static

Definition at line 91 of file ScheduleDAGInstrs.cpp.

References HugeRegion, and ReductionSize.

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

◆ getUnderlyingObjectsForInstr()

static bool getUnderlyingObjectsForInstr ( const MachineInstr MI,
const MachineFrameInfo MFI,
UnderlyingObjectsVector Objects,
const DataLayout DL 
)
static

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.

This function returns false the memory location is unknown or may alias anything.

Definition at line 128 of file ScheduleDAGInstrs.cpp.

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

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

◆ hasDataSucc()

static bool hasDataSucc ( const SUnit SU)
static

◆ isGlobalMemoryObject()

static bool isGlobalMemoryObject ( AliasAnalysis AA,
MachineInstr MI 
)
inlinestatic

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

Definition at line 535 of file ScheduleDAGInstrs.cpp.

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

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

◆ toggleKills()

static void toggleKills ( const MachineRegisterInfo MRI,
LivePhysRegs LiveRegs,
MachineInstr MI,
bool  addToLiveRegs 
)
static

Variable Documentation

◆ EnableAASchedMI

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

◆ HugeRegion

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

◆ ReductionSize

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().

◆ UseTBAA

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