LLVM  12.0.0git
Namespaces | Macros | Functions | Variables
TargetRegisterInfo.cpp File Reference
#include "llvm/CodeGen/TargetRegisterInfo.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/BitVector.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallSet.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/CodeGen/MachineFrameInfo.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/CodeGen/LiveInterval.h"
#include "llvm/CodeGen/TargetFrameLowering.h"
#include "llvm/CodeGen/TargetInstrInfo.h"
#include "llvm/CodeGen/TargetSubtargetInfo.h"
#include "llvm/CodeGen/VirtRegMap.h"
#include "llvm/Config/llvm-config.h"
#include "llvm/IR/Attributes.h"
#include "llvm/IR/Function.h"
#include "llvm/MC/MCRegisterInfo.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/MachineValueType.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/Printable.h"
#include "llvm/Support/raw_ostream.h"
#include <cassert>
#include <utility>
Include dependency graph for TargetRegisterInfo.cpp:

Go to the source code of this file.

Namespaces

 llvm
 This class represents lattice values for constants.
 

Macros

#define DEBUG_TYPE   "target-reg-info"
 

Functions

Printable llvm::printReg (Register Reg, const TargetRegisterInfo *TRI=nullptr, unsigned SubIdx=0, const MachineRegisterInfo *MRI=nullptr)
 Prints virtual and physical registers with or without a TRI instance. More...
 
Printable llvm::printRegUnit (unsigned Unit, const TargetRegisterInfo *TRI)
 Create Printable object to print register units on a raw_ostream. More...
 
Printable llvm::printVRegOrUnit (unsigned VRegOrUnit, const TargetRegisterInfo *TRI)
 Create Printable object to print virtual registers and physical registers on a raw_ostream. More...
 
Printable llvm::printRegClassOrBank (Register Reg, const MachineRegisterInfo &RegInfo, const TargetRegisterInfo *TRI)
 Create Printable object to print register classes or register banks on a raw_ostream. More...
 
static void getAllocatableSetForRC (const MachineFunction &MF, const TargetRegisterClass *RC, BitVector &R)
 getAllocatableSetForRC - Toggle the bits that represent allocatable registers for the specific register class. More...
 
static const TargetRegisterClassfirstCommonClass (const uint32_t *A, const uint32_t *B, const TargetRegisterInfo *TRI)
 
static bool shareSameRegisterFile (const TargetRegisterInfo &TRI, const TargetRegisterClass *DefRC, unsigned DefSubReg, const TargetRegisterClass *SrcRC, unsigned SrcSubReg)
 Check if the registers defined by the pair (RegisterClass, SubReg) share the same register file. More...
 

Variables

static cl::opt< unsignedHugeSizeForSplit ("huge-size-for-split", cl::Hidden, cl::desc("A threshold of live range size which may cause " "high compile time cost in global splitting."), cl::init(5000))
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "target-reg-info"

Definition at line 41 of file TargetRegisterInfo.cpp.

Function Documentation

◆ firstCommonClass()

static const TargetRegisterClass* firstCommonClass ( const uint32_t A,
const uint32_t B,
const TargetRegisterInfo TRI 
)
inlinestatic

◆ getAllocatableSetForRC()

static void getAllocatableSetForRC ( const MachineFunction MF,
const TargetRegisterClass RC,
BitVector R 
)
static

getAllocatableSetForRC - Toggle the bits that represent allocatable registers for the specific register class.

Definition at line 229 of file TargetRegisterInfo.cpp.

References assert(), llvm::TargetRegisterClass::getRawAllocationOrder(), llvm::TargetRegisterClass::isAllocatable(), and llvm::BitVector::set().

Referenced by llvm::TargetRegisterInfo::getAllocatableSet().

◆ shareSameRegisterFile()

static bool shareSameRegisterFile ( const TargetRegisterInfo TRI,
const TargetRegisterClass DefRC,
unsigned  DefSubReg,
const TargetRegisterClass SrcRC,
unsigned  SrcSubReg 
)
static

Check if the registers defined by the pair (RegisterClass, SubReg) share the same register file.

Definition at line 362 of file TargetRegisterInfo.cpp.

References llvm::TargetRegisterInfo::getCommonSubClass(), llvm::TargetRegisterInfo::getCommonSuperRegClass(), llvm::TargetRegisterInfo::getMatchingSuperRegClass(), and std::swap().

Referenced by llvm::TargetRegisterInfo::shouldRewriteCopySrc().

Variable Documentation

◆ HugeSizeForSplit

cl::opt<unsigned> HugeSizeForSplit("huge-size-for-split", cl::Hidden, cl::desc("A threshold of live range size which may cause " "high compile time cost in global splitting."), cl::init(5000))
static