Helper struct to parse and store a memory address as base + index + offset.
Declared in <llvm/CodeGen/SelectionDAGAddressAnalysis.h>
class BaseIndexOffset;
We ignore sign extensions when it is safe to do so. The following two expressions are not equivalent. To differentiate we need to store whether there was a sign extension involved in the index computation. (load (i64 add (i64 copyfromreg %c) (i64 signextend (add (i8 load %index) (i8 1)))) vs
(load (i64 add (i64 copyfromreg %c) (i64 signextend (i32 add (i32 signextend (i8 load %index)) (i32 1)))))
| Name | Description |
|---|---|
BaseIndexOffset [constructor] | Constructors |
addToOffset | Add VectorOff to the stored constant offset. |
contains | Return true if Other is fully contained in *this. |
dump | Dump this address to the debug stream. |
equalBaseIndex | Return true if Other and *this are offsets from the same base. |
getBase | Return the base pointer of the address. |
getIndex | Return the index value of the address. |
getOffset | Return the constant offset from the base and index. |
hasValidOffset | Return true if this address has a known constant offset. |
print | Print this address to OS. |
| Name | Description |
|---|---|
computeAliasing | Return true if aliasing between Op0 and Op1 can be proven. |
match | Parses tree in N for base, index, offset addresses. |