13#ifndef LLVM_LIB_CODEGEN_LIVERANGEUTILS_H
14#define LLVM_LIB_CODEGEN_LIVERANGEUTILS_H
25template<
typename LiveRangeT,
typename EqClassesT>
27 EqClassesT VNIClasses) {
29 typename LiveRangeT::iterator J = LR.begin(),
E = LR.end();
30 while (J !=
E && VNIClasses[J->valno->id] == 0)
32 for (
typename LiveRangeT::iterator
I = J;
I !=
E; ++
I) {
33 if (
unsigned eq = VNIClasses[
I->valno->id]) {
34 assert((SplitLRs[eq-1]->empty() || SplitLRs[eq-1]->expiredAt(
I->start)) &&
35 "New intervals should be empty");
36 SplitLRs[eq-1]->segments.push_back(*
I);
40 LR.segments.erase(J,
E);
43 unsigned j = 0, e = LR.getNumValNums();
44 while (j != e && VNIClasses[j] == 0)
46 for (
unsigned i = j; i != e; ++i) {
47 VNInfo *VNI = LR.getValNumInfo(i);
48 if (
unsigned eq = VNIClasses[i]) {
49 VNI->
id = SplitLRs[eq-1]->getNumValNums();
50 SplitLRs[eq-1]->valnos.push_back(VNI);
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
VNInfo - Value Number Information.
unsigned id
The ID number of this value.
This is an optimization pass for GlobalISel generic memory operations.
static void DistributeRange(LiveRangeT &LR, LiveRangeT *SplitLRs[], EqClassesT VNIClasses)
Helper function that distributes live range value numbers and the corresponding segments of a primary...