LLVM: include/llvm/ADT/IntEqClasses.h Source File (original) (raw)
Go to the documentation of this file.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21#ifndef LLVM_ADT_INTEQCLASSES_H
22#define LLVM_ADT_INTEQCLASSES_H
23
26
27namespace llvm {
28
30
31
32
33
34
36
37
38
39 unsigned NumClasses = 0;
40
41public:
42
44
45
46
47
49
50
51
53 EC.clear();
54 NumClasses = 0;
55 }
56
57
58
59
60 LLVM_ABI unsigned join(unsigned a, unsigned b);
61
62
63
64
66
67
68
70
71
72
74
75
76
78 assert(NumClasses && "operator[] called before compress()");
79 return EC[a];
80 }
81
82
83
85};
86
87}
88
89#endif
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
This file defines the SmallVector class.
LLVM_ABI unsigned findLeader(unsigned a) const
findLeader - Compute the leader of a's equivalence class.
IntEqClasses(unsigned N=0)
IntEqClasses - Create an equivalence class mapping for 0 .. N-1.
Definition IntEqClasses.h:43
LLVM_ABI void compress()
compress - Compress equivalence classes by numbering them 0 .
unsigned getNumClasses() const
getNumClasses - Return the number of equivalence classes after compress() was called.
Definition IntEqClasses.h:73
void clear()
clear - Clear all classes so that grow() will assign a unique class to every integer.
Definition IntEqClasses.h:52
unsigned operator[](unsigned a) const
operator[] - Return a's equivalence class number, 0 .
Definition IntEqClasses.h:77
LLVM_ABI void uncompress()
uncompress - Change back to the uncompressed representation that allows editing.
LLVM_ABI unsigned join(unsigned a, unsigned b)
Join the equivalence classes of a and b.
LLVM_ABI void grow(unsigned N)
grow - Increase capacity to hold 0 .
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
This is an optimization pass for GlobalISel generic memory operations.