LLVM 20.0.0git
Classes | Namespaces | Macros | Typedefs | Functions | Variables
MachineTraceMetrics.cpp File Reference
#include "llvm/CodeGen/MachineTraceMetrics.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/DenseMap.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/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/InitializePasses.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 <tuple>
#include <utility>

Go to the source code of this file.

Classes

class  llvm::po_iterator_storage< LoopBounds, true >
 

Namespaces

namespace  llvm
 This is an optimization pass for GlobalISel generic memory operations.
 

Macros

#define DEBUG_TYPE   "machine-trace-metrics"
 

Typedefs

using MIHeightMap = DenseMap< const MachineInstr *, unsigned >
 

Functions

 INITIALIZE_PASS_BEGIN (MachineTraceMetricsWrapperPass, DEBUG_TYPE, "Machine Trace Metrics", false, true) INITIALIZE_PASS_END(MachineTraceMetricsWrapperPass
 
static bool isExitingLoop (const MachineLoop *From, const MachineLoop *To)
 
static bool getDataDeps (const MachineInstr &UseMI, SmallVectorImpl< DataDep > &Deps, const MachineRegisterInfo *MRI)
 
static void getPHIDeps (const MachineInstr &UseMI, SmallVectorImpl< DataDep > &Deps, const MachineBasicBlock *Pred, const MachineRegisterInfo *MRI)
 
static void updatePhysDepsDownwards (const MachineInstr *UseMI, SmallVectorImpl< DataDep > &Deps, SparseSet< LiveRegUnit > &RegUnits, const TargetRegisterInfo *TRI)
 
static unsigned updatePhysDepsUpwards (const MachineInstr &MI, unsigned Height, SparseSet< LiveRegUnit > &RegUnits, const TargetSchedModel &SchedModel, const TargetInstrInfo *TII, const TargetRegisterInfo *TRI)
 
static bool pushDepHeight (const DataDep &Dep, const MachineInstr &UseMI, unsigned UseHeight, MIHeightMap &Heights, const TargetSchedModel &SchedModel, const TargetInstrInfo *TII)
 

Variables

 DEBUG_TYPE
 
Machine Trace Metrics
 
Machine Trace false
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "machine-trace-metrics"

Definition at line 38 of file MachineTraceMetrics.cpp.

Typedef Documentation

◆ MIHeightMap

Definition at line 987 of file MachineTraceMetrics.cpp.

Function Documentation

◆ getDataDeps()

static bool getDataDeps ( const MachineInstr UseMI,
SmallVectorImpl< DataDep > &  Deps,
const MachineRegisterInfo MRI 
)
static

◆ getPHIDeps()

static void getPHIDeps ( const MachineInstr UseMI,
SmallVectorImpl< DataDep > &  Deps,
const MachineBasicBlock Pred,
const MachineRegisterInfo MRI 
)
static

◆ INITIALIZE_PASS_BEGIN()

INITIALIZE_PASS_BEGIN ( MachineTraceMetricsWrapperPass  ,
DEBUG_TYPE  ,
"Machine Trace Metrics"  ,
false  ,
true   
)

◆ isExitingLoop()

static bool isExitingLoop ( const MachineLoop From,
const MachineLoop To 
)
static

Definition at line 317 of file MachineTraceMetrics.cpp.

References From.

Referenced by llvm::po_iterator_storage< LoopBounds, true >::insertEdge().

◆ pushDepHeight()

static bool pushDepHeight ( const DataDep &  Dep,
const MachineInstr UseMI,
unsigned  UseHeight,
MIHeightMap Heights,
const TargetSchedModel SchedModel,
const TargetInstrInfo TII 
)
static

◆ updatePhysDepsDownwards()

static void updatePhysDepsDownwards ( const MachineInstr UseMI,
SmallVectorImpl< DataDep > &  Deps,
SparseSet< LiveRegUnit > &  RegUnits,
const TargetRegisterInfo TRI 
)
static

◆ updatePhysDepsUpwards()

static unsigned updatePhysDepsUpwards ( const MachineInstr MI,
unsigned  Height,
SparseSet< LiveRegUnit > &  RegUnits,
const TargetSchedModel SchedModel,
const TargetInstrInfo TII,
const TargetRegisterInfo TRI 
)
static

Variable Documentation

◆ DEBUG_TYPE

DEBUG_TYPE

Definition at line 62 of file MachineTraceMetrics.cpp.

◆ false

Machine Trace false

Definition at line 63 of file MachineTraceMetrics.cpp.

◆ Metrics

Machine Trace Metrics