LLVM API Documentation
#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>
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< 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 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 > | VerifyCoalescing ("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 DEBUG_TYPE "regalloc" |
Definition at line 44 of file RegisterCoalescer.cpp.
| 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] |
Definition at line 2098 of file RegisterCoalescer.cpp.
References llvm::LiveIntervals::getInterval(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::LiveIntervals::intervalIsInOneMBB(), llvm::MachineInstr::isCopy(), llvm::TargetRegisterInfo::isPhysicalRegister(), and llvm::MachineOperand::isUndef().
| static bool isMoveInstr | ( | const TargetRegisterInfo & | tri, |
| const MachineInstr * | MI, | ||
| unsigned & | Src, | ||
| unsigned & | Dst, | ||
| unsigned & | SrcSub, | ||
| unsigned & | DstSub | ||
| ) | [static] |
Definition at line 216 of file RegisterCoalescer.cpp.
Referenced by llvm::CoalescerPair::isCoalescable(), and llvm::CoalescerPair::setRegisters().
| static bool isSplitEdge | ( | const MachineBasicBlock * | MBB | ) | [static] |
Definition at line 240 of file RegisterCoalescer.cpp.
References llvm::AArch64CC::MI, llvm::MachineBasicBlock::pred_size(), and llvm::MachineBasicBlock::succ_size().
| 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" | |||
| ) |
| 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] |
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] |