21 for (
Use &
U :
I.uses()) {
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
This file provides a collection of visitors which walk the (instruction) uses of a pointer.
Class for arbitrary precision integers.
APInt sextOrTrunc(unsigned width) const
Sign extend or truncate to width.
an instruction for type-safe pointer arithmetic to access elements of arrays and structs
bool accumulateConstantOffset(const DataLayout &DL, APInt &Offset) const
Accumulate the constant address offset of this GEP if possible.
A Use represents the edge between a Value definition and its users.
Type * getType() const
All values are typed, get the type of this value.
APInt Offset
The constant offset of the use if that is known.
void enqueueUsers(Instruction &I)
Enqueue the users of this instruction in the visit worklist.
SmallVector< UseToVisit, 8 > Worklist
The worklist of to-visit uses.
bool IsOffsetKnown
True if we have a known constant offset for the use currently being visited.
bool adjustOffsetForGEP(GetElementPtrInst &GEPI)
Walk the operands of a GEP and adjust the offset as appropriate.
Use * U
The use currently being visited.
SmallPtrSet< Use *, 8 > VisitedUses
A set of visited uses to break cycles in unreachable code.
This is an optimization pass for GlobalISel generic memory operations.
A struct of the data needed to visit a particular use.
PointerIntPair< Use *, 1, bool > UseAndIsOffsetKnownPair