21 for (
Use &U :
I.uses()) {
22 if (VisitedUses.insert(&U).second) {
27 Worklist.push_back(std::move(NewU));
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.
void enqueueUsers(Instruction &I)
Enqueue the users of this instruction in the visit worklist.
bool adjustOffsetForGEP(GetElementPtrInst &GEPI)
Walk the operands of a GEP and adjust the offset as appropriate.
This is an optimization pass for GlobalISel generic memory operations.
A struct of the data needed to visit a particular use.