LLVM API Documentation
#include <LiveInterval.h>
Public Member Functions | |
ConnectedVNInfoEqClasses (LiveIntervals &lis) | |
unsigned | Classify (const LiveInterval *LI) |
unsigned | getEqClass (const VNInfo *VNI) const |
void | Distribute (LiveInterval *LIV[], MachineRegisterInfo &MRI) |
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 653 of file LiveInterval.h.
llvm::ConnectedVNInfoEqClasses::ConnectedVNInfoEqClasses | ( | LiveIntervals & | lis | ) | [inline, explicit] |
Definition at line 663 of file LiveInterval.h.
Classify - Classify the values in LI into connected components. Return the number of connected components.
Definition at line 855 of file LiveInterval.cpp.
References llvm::VNInfo::def, llvm::LiveRange::getNumValNums(), llvm::LiveRange::getVNInfoBefore(), I, llvm::VNInfo::id, llvm::VNInfo::isPHIDef(), llvm::VNInfo::isUnused(), llvm::MachineBasicBlock::pred_begin(), llvm::MachineBasicBlock::pred_end(), llvm::LiveRange::vni_begin(), and llvm::LiveRange::vni_end().
Referenced by llvm::LiveRangeEdit::eliminateDeadDefs(), and llvm::SplitEditor::finish().
void ConnectedVNInfoEqClasses::Distribute | ( | LiveInterval * | LIV[], |
MachineRegisterInfo & | MRI | ||
) |
Distribute - Distribute values in LIV[0] into a separate LiveInterval for each connected component. LIV must have a LiveInterval for each connected component. The LiveIntervals in Liv[1..] must be empty. Instructions using LIV[0] are rewritten.
Definition at line 900 of file LiveInterval.cpp.
References llvm::LiveRange::begin(), llvm::LiveRange::empty(), llvm::LiveRange::end(), llvm::SmallVectorImpl< T >::erase(), llvm::LiveRange::expiredAt(), llvm::LiveRange::getNumValNums(), llvm::LiveRange::getValNumInfo(), I, llvm::VNInfo::id, llvm::MachineInstr::isDebugValue(), LI, llvm::AArch64CC::MI, llvm::SmallVectorTemplateBase< T, isPodLike >::push_back(), llvm::LiveRange::Query(), llvm::MachineOperand::readsReg(), llvm::LiveInterval::reg, llvm::MachineRegisterInfo::reg_begin(), llvm::MachineRegisterInfo::reg_end(), llvm::SmallVectorImpl< T >::resize(), llvm::LiveRange::segments, llvm::MachineOperand::setReg(), llvm::LiveRange::valnos, llvm::LiveQueryResult::valueDefined(), and llvm::LiveQueryResult::valueIn().
Referenced by llvm::LiveRangeEdit::eliminateDeadDefs(), and llvm::SplitEditor::finish().
unsigned llvm::ConnectedVNInfoEqClasses::getEqClass | ( | const VNInfo * | VNI | ) | const [inline] |
getEqClass - Classify creates equivalence classes numbered 0..N. Return the equivalence class assigned the VNI.
Definition at line 671 of file LiveInterval.h.
References llvm::VNInfo::id.