LLVM API Documentation

Defines | Functions | Variables
RegisterCoalescer.cpp File Reference
#include "RegisterCoalescer.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallSet.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/Analysis/AliasAnalysis.h"
#include "llvm/CodeGen/LiveIntervalAnalysis.h"
#include "llvm/CodeGen/LiveRangeEdit.h"
#include "llvm/CodeGen/MachineFrameInfo.h"
#include "llvm/CodeGen/MachineInstr.h"
#include "llvm/CodeGen/MachineLoopInfo.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/CodeGen/Passes.h"
#include "llvm/CodeGen/RegisterClassInfo.h"
#include "llvm/CodeGen/VirtRegMap.h"
#include "llvm/IR/Value.h"
#include "llvm/Pass.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Target/TargetInstrInfo.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/Target/TargetRegisterInfo.h"
#include "llvm/Target/TargetSubtargetInfo.h"
#include <algorithm>
#include <cmath>
Include dependency graph for RegisterCoalescer.cpp:

Go to the source code of this file.

Defines

#define DEBUG_TYPE   "regalloc"

Functions

 STATISTIC (numJoins,"Number of interval joins performed")
 STATISTIC (numCrossRCs,"Number of cross class joins performed")
 STATISTIC (numCommutes,"Number of instruction commuting performed")
 STATISTIC (numExtends,"Number of copies extended")
 STATISTIC (NumReMats,"Number of instructions re-materialized")
 STATISTIC (NumInflated,"Number of register classes inflated")
 STATISTIC (NumLaneConflicts,"Number of dead lane conflicts tested")
 STATISTIC (NumLaneResolves,"Number of dead lane conflicts resolved")
 INITIALIZE_PASS_BEGIN (RegisterCoalescer,"simple-register-coalescing","Simple Register Coalescing", false, false) INITIALIZE_PASS_END(RegisterCoalescer
static bool isMoveInstr (const TargetRegisterInfo &tri, const MachineInstr *MI, unsigned &Src, unsigned &Dst, unsigned &SrcSub, unsigned &DstSub)
static bool isSplitEdge (const MachineBasicBlock *MBB)
static int compareMBBPriority (const MBBPriorityInfo *LHS, const MBBPriorityInfo *RHS)
static bool isLocalCopy (MachineInstr *Copy, const LiveIntervals *LIS)

Variables

static cl::opt< boolEnableJoining ("join-liveintervals", cl::desc("Coalesce copies (default=true)"), cl::init(true))
static cl::opt< boolEnableJoinSplits ("join-splitedges", cl::desc("Coalesce copies on split edges (default=subtarget)"), cl::Hidden)
static cl::opt< cl::boolOrDefaultEnableGlobalCopies ("join-globalcopies", cl::desc("Coalesce copies that span blocks (default=subtarget)"), cl::init(cl::BOU_UNSET), cl::Hidden)
static cl::opt< boolVerifyCoalescing ("verify-coalescing", cl::desc("Verify machine instrs before and after register coalescing"), cl::Hidden)
simple register coalescing
simple register Simple Register Coalescing
simple register Simple Register false

Define Documentation

#define DEBUG_TYPE   "regalloc"

Definition at line 44 of file RegisterCoalescer.cpp.


Function Documentation

static int compareMBBPriority ( const MBBPriorityInfo *  LHS,
const MBBPriorityInfo *  RHS 
) [static]

Definition at line 2076 of file RegisterCoalescer.cpp.

INITIALIZE_PASS_BEGIN ( RegisterCoalescer  ,
"simple-register-coalescing ,
"Simple Register Coalescing ,
false  ,
false   
)
static bool isLocalCopy ( MachineInstr Copy,
const LiveIntervals LIS 
) [static]
static bool isMoveInstr ( const TargetRegisterInfo tri,
const MachineInstr MI,
unsigned Src,
unsigned Dst,
unsigned SrcSub,
unsigned DstSub 
) [static]
static bool isSplitEdge ( const MachineBasicBlock MBB) [static]
STATISTIC ( numJoins  ,
"Number of interval joins performed"   
)
STATISTIC ( numCrossRCs  ,
"Number of cross class joins performed"   
)
STATISTIC ( numCommutes  ,
"Number of instruction commuting performed"   
)
STATISTIC ( numExtends  ,
"Number of copies extended"   
)
STATISTIC ( NumReMats  ,
"Number of instructions re-materialized"   
)
STATISTIC ( NumInflated  ,
"Number of register classes inflated"   
)
STATISTIC ( NumLaneConflicts  ,
"Number of dead lane conflicts tested"   
)
STATISTIC ( NumLaneResolves  ,
"Number of dead lane conflicts resolved"   
)

Variable Documentation

simple register coalescing

Definition at line 211 of file RegisterCoalescer.cpp.

simple register Simple Register Coalescing

Definition at line 211 of file RegisterCoalescer.cpp.

cl::opt<cl::boolOrDefault> EnableGlobalCopies("join-globalcopies", cl::desc("Coalesce copies that span blocks (default=subtarget)"), cl::init(cl::BOU_UNSET), cl::Hidden) [static]
cl::opt<bool> EnableJoining("join-liveintervals", cl::desc("Coalesce copies (default=true)"), cl::init(true)) [static]
cl::opt<bool> EnableJoinSplits("join-splitedges", cl::desc("Coalesce copies on split edges (default=subtarget)"), cl::Hidden) [static]
simple register Simple Register false

Definition at line 211 of file RegisterCoalescer.cpp.

cl::opt<bool> VerifyCoalescing("verify-coalescing", cl::desc("Verify machine instrs before and after register coalescing"), cl::Hidden) [static]