LLVM
8.0.1
|
ConnectedVNInfoEqClasses - Helper class that can divide VNInfos in a LiveInterval into equivalence clases of connected components. More...
#include "llvm/CodeGen/LiveInterval.h"
Public Member Functions | |
ConnectedVNInfoEqClasses (LiveIntervals &lis) | |
unsigned | Classify (const LiveRange &LR) |
Classify the values in LR into connected components. More... | |
unsigned | getEqClass (const VNInfo *VNI) const |
getEqClass - Classify creates equivalence classes numbered 0..N. More... | |
void | Distribute (LiveInterval &LI, LiveInterval *LIV[], MachineRegisterInfo &MRI) |
Distribute values in LI into a separate LiveIntervals for each connected component. More... | |
ConnectedVNInfoEqClasses - Helper class that can divide VNInfos in a LiveInterval into equivalence clases of connected components.
A LiveInterval that has multiple connected components can be broken into multiple LiveIntervals.
Given a LiveInterval that may have multiple connected components, run:
unsigned numComps = ConEQ.Classify(LI); if (numComps > 1) { // allocate numComps-1 new LiveIntervals into LIS[1..] ConEQ.Distribute(LIS); }
Definition at line 918 of file LiveInterval.h.
|
inlineexplicit |
Definition at line 923 of file LiveInterval.h.
Classify the values in LR
into connected components.
Returns the number of connected components.
Definition at line 1262 of file LiveInterval.cpp.
References assert(), llvm::VNInfo::def, llvm::LiveRange::getNumValNums(), llvm::LiveRange::getVNInfoBefore(), llvm::VNInfo::id, llvm::VNInfo::isPHIDef(), llvm::VNInfo::isUnused(), llvm::MachineBasicBlock::pred_begin(), llvm::MachineBasicBlock::pred_end(), and llvm::LiveRange::valnos.
Referenced by matchPair(), and llvm::LiveIntervals::splitSeparateComponents().
void ConnectedVNInfoEqClasses::Distribute | ( | LiveInterval & | LI, |
LiveInterval * | LIV[], | ||
MachineRegisterInfo & | MRI | ||
) |
Distribute values in LI
into a separate LiveIntervals for each connected component.
LIV must have an empty LiveInterval for each additional connected component. The first connected component is left in LI
.
Definition at line 1305 of file LiveInterval.cpp.
References assert(), llvm::SmallVectorImpl< T >::clear(), llvm::LiveInterval::createSubRange(), llvm::SmallVectorTemplateCommon< T >::data(), llvm::VNInfo::def, llvm::DistributeRange(), llvm::LiveRange::getVNInfoAt(), llvm::LiveInterval::hasSubRanges(), I, llvm::MachineInstr::isDebugValue(), llvm::VNInfo::isUnused(), MI, llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::LiveRange::Query(), llvm::MachineOperand::readsReg(), llvm::LiveInterval::reg, llvm::MachineRegisterInfo::reg_begin(), llvm::MachineRegisterInfo::reg_end(), llvm::LiveInterval::removeEmptySubRanges(), llvm::SmallVectorImpl< T >::reserve(), llvm::SmallVectorImpl< T >::resize(), llvm::MachineOperand::setReg(), llvm::LiveInterval::subranges(), llvm::LiveQueryResult::valueDefined(), llvm::LiveQueryResult::valueIn(), and llvm::LiveQueryResult::valueOut().
Referenced by llvm::LiveIntervals::splitSeparateComponents().
getEqClass - Classify creates equivalence classes numbered 0..N.
Return the equivalence class assigned the VNI.
Definition at line 931 of file LiveInterval.h.
References llvm::VNInfo::id, and MRI.
Referenced by matchPair().