LLVM: lib/Target/ARM/ARMBasicBlockInfo.h Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12
13#ifndef LLVM_LIB_TARGET_ARM_ARMBASICBLOCKINFO_H
14#define LLVM_LIB_TARGET_ARM_ARMBASICBLOCKINFO_H
15
19#include
20#include
21
22namespace llvm {
23
26
27
28
29
30
31
32
38
39
40
42
43
44
45
46
47
48
49
50
52
53
54
55
56
57
59
60
61
63
64
65
66
68
69
70
72
74
75
76
77
80
81
82 if (Size & ((1u << Bits) - 1))
84 return Bits;
85 }
86
87
88
89
93 if (PA == Align(1))
94 return PO;
95
97 }
98
99
100
101
102
103
107};
108
110
111private:
113 bool isThumb = false;
116
117public:
119 TII =
120 static_cast<const ARMBaseInstrInfo*>(MF.getSubtarget().getInstrInfo());
122 }
123
125 BBInfo.resize(MF.getNumBlockIDs());
128 }
129
131
133
135 return BBInfo[MBB->getNumber()].Offset;
136 }
137
139
141 BBInfo[MBB->getNumber()].Size += Size;
142 }
143
145 unsigned MaxDisp) const;
146
148 BBInfo.insert(BBInfo.begin() + BBNum, BBI);
149 }
150
151 void clear() { BBInfo.clear(); }
152
154
155};
156
157}
158
159#endif
bool isBBInRange(MachineInstr *MI, MachineBasicBlock *DestBB, unsigned MaxDisp) const
isBBInRange - Returns true if the distance between specific MI and specific BB can fit in MI's displa...
ARMBasicBlockUtils(MachineFunction &MF)
Definition ARMBasicBlockInfo.h:118
void computeAllBlockSizes()
Definition ARMBasicBlockInfo.h:124
void insert(unsigned BBNum, BasicBlockInfo BBI)
Definition ARMBasicBlockInfo.h:147
void adjustBBOffsetsAfter(MachineBasicBlock *MBB)
void computeBlockSize(MachineBasicBlock *MBB)
unsigned getOffsetOf(MachineBasicBlock *MBB) const
Definition ARMBasicBlockInfo.h:134
unsigned getOffsetOf(MachineInstr *MI) const
getOffsetOf - Return the current offset of the specified machine instruction from the start of the fu...
BBInfoVector & getBBInfo()
Definition ARMBasicBlockInfo.h:153
void clear()
Definition ARMBasicBlockInfo.h:151
void adjustBBSize(MachineBasicBlock *MBB, int Size)
Definition ARMBasicBlockInfo.h:140
ARMFunctionInfo - This class is derived from MachineFunctionInfo and contains private ARM-specific in...
bool isThumbFunction() const
Representation of each machine instruction.
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
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.
int countr_zero(T Val)
Count number of 0's from the least significant bit to the most stopping at the first 1.
unsigned UnknownPadding(Align Alignment, unsigned KnownBits)
UnknownPadding - Return the worst case padding that could result from unknown offset bits.
Definition ARMBasicBlockInfo.h:33
SmallVectorImpl< BasicBlockInfo > BBInfoVector
Definition ARMBasicBlockInfo.h:25
unsigned Log2(Align A)
Returns the log2 of the alignment.
This struct is a compact representation of a valid (non-zero power of two) alignment.
constexpr uint64_t value() const
This is a hole in the type system and should not be abused.
BasicBlockInfo - Information about the offset and size of a single basic block.
Definition ARMBasicBlockInfo.h:41
unsigned Size
Size - Size of the basic block in bytes.
Definition ARMBasicBlockInfo.h:58
Align PostAlign
PostAlign - When > 1, the block terminator contains a .align directive, so the end of the block is al...
Definition ARMBasicBlockInfo.h:71
uint8_t KnownBits
KnownBits - The number of low bits in Offset that are known to be exact.
Definition ARMBasicBlockInfo.h:62
unsigned internalKnownBits() const
Compute the number of known offset bits internally to this block.
Definition ARMBasicBlockInfo.h:78
unsigned postOffset(Align Alignment=Align(1)) const
Compute the offset immediately following this block.
Definition ARMBasicBlockInfo.h:90
unsigned postKnownBits(Align Align=llvm::Align(1)) const
Compute the number of known low bits of postOffset.
Definition ARMBasicBlockInfo.h:104
uint8_t Unalign
Unalign - When non-zero, the block contains instructions (inline asm) of unknown size.
Definition ARMBasicBlockInfo.h:67
unsigned Offset
Offset - Distance from the beginning of the function to the beginning of this basic block.
Definition ARMBasicBlockInfo.h:51