LLVM 19.0.0git
Classes | Namespaces | Macros | Typedefs | Functions
MachineSSAUpdater.cpp File Reference
#include "llvm/CodeGen/MachineSSAUpdater.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/CodeGen/MachineBasicBlock.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineInstr.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/CodeGen/MachineOperand.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/CodeGen/TargetInstrInfo.h"
#include "llvm/CodeGen/TargetOpcodes.h"
#include "llvm/CodeGen/TargetSubtargetInfo.h"
#include "llvm/IR/DebugLoc.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Transforms/Utils/SSAUpdaterImpl.h"
#include <utility>

Go to the source code of this file.

Classes

class  llvm::SSAUpdaterTraits< MachineSSAUpdater >
 SSAUpdaterTraits<MachineSSAUpdater> - Traits for the SSAUpdaterImpl template, specialized for MachineSSAUpdater. More...
 
class  llvm::SSAUpdaterTraits< MachineSSAUpdater >::PHI_iterator
 Iterator for PHI operands. More...
 

Namespaces

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

Macros

#define DEBUG_TYPE   "machine-ssaupdater"
 

Typedefs

using AvailableValsTy = DenseMap< MachineBasicBlock *, Register >
 

Functions

static AvailableValsTygetAvailableVals (void *AV)
 
static Register LookForIdenticalPHI (MachineBasicBlock *BB, SmallVectorImpl< std::pair< MachineBasicBlock *, Register > > &PredValues)
 
static MachineInstrBuilder InsertNewDef (unsigned Opcode, MachineBasicBlock *BB, MachineBasicBlock::iterator I, MachineRegisterInfo::VRegAttrs RegAttrs, MachineRegisterInfo *MRI, const TargetInstrInfo *TII)
 InsertNewDef - Insert an empty PHI or IMPLICIT_DEF instruction which define a value of the given register class at the start of the specified basic block.
 
static MachineBasicBlockfindCorrespondingPred (const MachineInstr *MI, MachineOperand *U)
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "machine-ssaupdater"

Definition at line 35 of file MachineSSAUpdater.cpp.

Typedef Documentation

◆ AvailableValsTy

Definition at line 37 of file MachineSSAUpdater.cpp.

Function Documentation

◆ findCorrespondingPred()

static MachineBasicBlock * findCorrespondingPred ( const MachineInstr MI,
MachineOperand U 
)
static

Definition at line 217 of file MachineSSAUpdater.cpp.

References llvm_unreachable, and MI.

Referenced by llvm::MachineSSAUpdater::RewriteUse().

◆ getAvailableVals()

static AvailableValsTy & getAvailableVals ( void *  AV)
static

◆ InsertNewDef()

static MachineInstrBuilder InsertNewDef ( unsigned  Opcode,
MachineBasicBlock BB,
MachineBasicBlock::iterator  I,
MachineRegisterInfo::VRegAttrs  RegAttrs,
MachineRegisterInfo MRI,
const TargetInstrInfo TII 
)
static

InsertNewDef - Insert an empty PHI or IMPLICIT_DEF instruction which define a value of the given register class at the start of the specified basic block.

It returns the virtual register defined by the instruction.

Definition at line 114 of file MachineSSAUpdater.cpp.

References llvm::BuildMI(), I, MRI, and TII.

Referenced by llvm::SSAUpdaterTraits< MachineSSAUpdater >::CreateEmptyPHI(), llvm::SSAUpdaterTraits< MachineSSAUpdater >::GetUndefVal(), and llvm::MachineSSAUpdater::GetValueInMiddleOfBlock().

◆ LookForIdenticalPHI()

static Register LookForIdenticalPHI ( MachineBasicBlock BB,
SmallVectorImpl< std::pair< MachineBasicBlock *, Register > > &  PredValues 
)
static