14 #ifndef LLVM_LIB_CODEGEN_LIVERANGEUTILS_H 15 #define LLVM_LIB_CODEGEN_LIVERANGEUTILS_H 26 template<
typename LiveRangeT,
typename EqClassesT>
28 EqClassesT VNIClasses) {
30 typename LiveRangeT::iterator J = LR.begin(),
E = LR.end();
31 while (J !=
E && VNIClasses[J->valno->id] == 0)
33 for (
typename LiveRangeT::iterator
I = J;
I !=
E; ++
I) {
34 if (
unsigned eq = VNIClasses[
I->valno->id]) {
35 assert((SplitLRs[eq-1]->
empty() || SplitLRs[eq-1]->expiredAt(
I->start)) &&
36 "New intervals should be empty");
37 SplitLRs[eq-1]->segments.push_back(*
I);
41 LR.segments.erase(J,
E);
44 unsigned j = 0, e = LR.getNumValNums();
45 while (j != e && VNIClasses[j] == 0)
47 for (
unsigned i = j; i != e; ++i) {
48 VNInfo *VNI = LR.getValNumInfo(i);
49 if (
unsigned eq = VNIClasses[i]) {
50 VNI->
id = SplitLRs[eq-1]->getNumValNums();
51 SplitLRs[eq-1]->valnos.push_back(VNI);
This class represents lattice values for constants.
VNInfo - Value Number Information.
static void DistributeRange(LiveRangeT &LR, LiveRangeT *SplitLRs[], EqClassesT VNIClasses)
Helper function that distributes live range value numbers and the corresponding segments of a master ...
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
constexpr bool empty(const T &RangeOrContainer)
Test whether RangeOrContainer is empty. Similar to C++17 std::empty.
unsigned id
The ID number of this value.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())