|
LLVM
10.0.0
|
Helper struct to parse and store a memory address as base + index + offset. More...
#include "llvm/CodeGen/SelectionDAGAddressAnalysis.h"
Public Member Functions | |
| BaseIndexOffset ()=default | |
| BaseIndexOffset (SDValue Base, SDValue Index, bool IsIndexSignExt) | |
| BaseIndexOffset (SDValue Base, SDValue Index, int64_t Offset, bool IsIndexSignExt) | |
| SDValue | getBase () |
| SDValue | getBase () const |
| SDValue | getIndex () |
| SDValue | getIndex () const |
| bool | hasValidOffset () const |
| bool | equalBaseIndex (const BaseIndexOffset &Other, const SelectionDAG &DAG, int64_t &Off) const |
| bool | equalBaseIndex (const BaseIndexOffset &Other, const SelectionDAG &DAG) const |
| bool | contains (const SelectionDAG &DAG, int64_t BitSize, const BaseIndexOffset &Other, int64_t OtherBitSize, int64_t &BitOffset) const |
| bool | contains (const SelectionDAG &DAG, int64_t BitSize, const BaseIndexOffset &Other, int64_t OtherBitSize) const |
| void | print (raw_ostream &OS) const |
| void | dump () const |
Static Public Member Functions | |
| static bool | computeAliasing (const SDNode *Op0, const Optional< int64_t > NumBytes0, const SDNode *Op1, const Optional< int64_t > NumBytes1, const SelectionDAG &DAG, bool &IsAlias) |
| static BaseIndexOffset | match (const SDNode *N, const SelectionDAG &DAG) |
| Parses tree in N for base, index, offset addresses. More... | |
Helper struct to parse and store a memory address as base + index + offset.
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)))))
Definition at line 32 of file SelectionDAGAddressAnalysis.h.
|
default |
Referenced by match(), and matchLSNode().
Definition at line 41 of file SelectionDAGAddressAnalysis.h.
|
inline |
Definition at line 43 of file SelectionDAGAddressAnalysis.h.
|
static |
Definition at line 85 of file SelectionDAGAddressAnalysis.cpp.
References B, equalBaseIndex(), getBase(), llvm::MachineFunction::getFrameInfo(), getIndex(), llvm::SelectionDAG::getMachineFunction(), llvm::SDValue::getNode(), llvm::Optional< T >::hasValue(), llvm::MachineFrameInfo::isFixedObjectIndex(), and match().
Referenced by contains().
| bool BaseIndexOffset::contains | ( | const SelectionDAG & | DAG, |
| int64_t | BitSize, | ||
| const BaseIndexOffset & | Other, | ||
| int64_t | OtherBitSize, | ||
| int64_t & | BitOffset | ||
| ) | const |
Definition at line 146 of file SelectionDAGAddressAnalysis.cpp.
References equalBaseIndex().
Referenced by contains(), equalBaseIndex(), and ShrinkLoadReplaceStoreWithStore().
|
inline |
Definition at line 72 of file SelectionDAGAddressAnalysis.h.
References computeAliasing(), contains(), dump(), match(), N, and print().
| LLVM_DUMP_METHOD void BaseIndexOffset::dump | ( | ) | const |
Definition at line 285 of file SelectionDAGAddressAnalysis.cpp.
References llvm::dbgs(), and print().
Referenced by contains(), and ShrinkLoadReplaceStoreWithStore().
| bool BaseIndexOffset::equalBaseIndex | ( | const BaseIndexOffset & | Other, |
| const SelectionDAG & | DAG, | ||
| int64_t & | Off | ||
| ) | const |
Definition at line 22 of file SelectionDAGAddressAnalysis.cpp.
References B, llvm::MachineFunction::getFrameInfo(), llvm::SelectionDAG::getMachineFunction(), llvm::SDValue::getNode(), llvm::MachineFrameInfo::getObjectOffset(), hasValidOffset(), and llvm::MachineFrameInfo::isFixedObjectIndex().
Referenced by computeAliasing(), contains(), equalBaseIndex(), hasValidOffset(), numVectorEltsOrZero(), ShrinkLoadReplaceStoreWithStore(), and stripTruncAndExt().
|
inline |
Definition at line 60 of file SelectionDAGAddressAnalysis.h.
References contains(), and equalBaseIndex().
|
inline |
Definition at line 48 of file SelectionDAGAddressAnalysis.h.
Referenced by computeAliasing(), and ShrinkLoadReplaceStoreWithStore().
|
inline |
Definition at line 49 of file SelectionDAGAddressAnalysis.h.
|
inline |
Definition at line 50 of file SelectionDAGAddressAnalysis.h.
Referenced by computeAliasing().
|
inline |
Definition at line 51 of file SelectionDAGAddressAnalysis.h.
|
inline |
Definition at line 52 of file SelectionDAGAddressAnalysis.h.
References equalBaseIndex(), llvm::Optional< T >::hasValue(), and llvm::Other.
Referenced by equalBaseIndex().
|
static |
Parses tree in N for base, index, offset addresses.
Definition at line 270 of file SelectionDAGAddressAnalysis.cpp.
References BaseIndexOffset(), and matchLSNode().
Referenced by llvm::SelectionDAG::areNonVolatileConsecutiveLoads(), computeAliasing(), contains(), numVectorEltsOrZero(), ShrinkLoadReplaceStoreWithStore(), and stripTruncAndExt().
| void BaseIndexOffset::print | ( | raw_ostream & | OS | ) | const |
Definition at line 289 of file SelectionDAGAddressAnalysis.cpp.
References llvm::SDNode::print().
Referenced by contains(), and dump().
1.8.13