LLVM  5.0.0
Functions
LivePhysRegs.cpp File Reference
#include "llvm/CodeGen/LivePhysRegs.h"
#include "llvm/CodeGen/MachineFrameInfo.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineInstrBundle.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
Include dependency graph for LivePhysRegs.cpp:

Go to the source code of this file.

Functions

static void addCalleeSavedRegs (LivePhysRegs &LiveRegs, const MachineFunction &MF)
 Adds all callee saved registers to LiveRegs. More...
 
static void addPristines (LivePhysRegs &LiveRegs, const MachineFunction &MF)
 Adds pristine registers to the given LiveRegs. More...
 

Function Documentation

static void addCalleeSavedRegs ( LivePhysRegs &  LiveRegs,
const MachineFunction &  MF 
)
static

Adds all callee saved registers to LiveRegs.

Definition at line 162 of file LivePhysRegs.cpp.

References llvm::LivePhysRegs::addReg(), llvm::MachineRegisterInfo::getCalleeSavedRegs(), llvm::MachineFunction::getRegInfo(), and MRI.

Referenced by llvm::LivePhysRegs::addLiveOuts(), and addPristines().

static void addPristines ( LivePhysRegs &  LiveRegs,
const MachineFunction &  MF 
)
static

Adds pristine registers to the given LiveRegs.

Pristine registers are callee saved registers that are unused in the function.

Add all callee saved regs, then remove the ones that are saved+restored.

Remove the ones that are not saved/restored; they are pristine.

Definition at line 171 of file LivePhysRegs.cpp.

References addCalleeSavedRegs(), llvm::MachineFrameInfo::getCalleeSavedInfo(), llvm::MachineFunction::getFrameInfo(), llvm::MachineFrameInfo::isCalleeSavedInfoValid(), and llvm::LivePhysRegs::removeReg().

Referenced by llvm::LivePhysRegs::addLiveIns(), and llvm::LivePhysRegs::addLiveOuts().