LLVM 20.0.0git
|
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. | |
unsigned | getEqClass (const VNInfo *VNI) const |
getEqClass - Classify creates equivalence classes numbered 0..N. | |
void | Distribute (LiveInterval &LI, LiveInterval *LIV[], MachineRegisterInfo &MRI) |
Distribute values in LI into a separate LiveIntervals for each connected component. | |
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 1007 of file LiveInterval.h.
|
inlineexplicit |
Definition at line 1012 of file LiveInterval.h.
Classify the values in LR
into connected components.
Returns the number of connected components.
Definition at line 1329 of file LiveInterval.cpp.
References assert(), llvm::VNInfo::def, llvm::LiveRange::getNumValNums(), llvm::LiveRange::getVNInfoBefore(), llvm::VNInfo::id, llvm::VNInfo::isPHIDef(), llvm::VNInfo::isUnused(), MBB, llvm::MachineBasicBlock::predecessors(), and llvm::LiveRange::valnos.
Referenced by 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 1371 of file LiveInterval.cpp.
References Allocator, assert(), llvm::SmallVectorImpl< T >::clear(), llvm::LiveInterval::createSubRange(), llvm::SmallVectorTemplateCommon< T, typename >::data(), llvm::VNInfo::def, llvm::DistributeRange(), llvm::LiveRange::getVNInfoAt(), llvm::LiveInterval::hasSubRanges(), I, Idx, llvm::VNInfo::isUnused(), llvm::make_early_inc_range(), MI, MRI, llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::LiveRange::Query(), llvm::LiveInterval::reg(), llvm::LiveInterval::removeEmptySubRanges(), llvm::SmallVectorImpl< T >::reserve(), llvm::SmallVectorImpl< T >::resize(), 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 1020 of file LiveInterval.h.
References llvm::VNInfo::id.