|
LLVM 24.0.0git
|
Helper struct to parse and store a memory address as base + index + offset. More...
#include "llvm/CodeGen/SelectionDAGAddressAnalysis.h"
Static Public Member Functions | |
| static LLVM_ABI bool | computeAliasing (const SDNode *Op0, const LocationSize NumBytes0, const SDNode *Op1, const LocationSize NumBytes1, const SelectionDAG &DAG, bool &IsAlias) |
| static LLVM_ABI BaseIndexOffset | match (const SDNode *N, const SelectionDAG &DAG) |
| Parses tree in N for base, index, and fixed/scalable offsets. | |
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 35 of file SelectionDAGAddressAnalysis.h.
|
default |
Referenced by BaseIndexOffset(), computeAliasing(), contains(), contains(), equalBaseIndex(), equalBaseIndex(), equalBaseIndex(), and match().
Definition at line 44 of file SelectionDAGAddressAnalysis.h.
|
inline |
Definition at line 46 of file SelectionDAGAddressAnalysis.h.
References BaseIndexOffset().
|
inline |
Definition at line 50 of file SelectionDAGAddressAnalysis.h.
|
inline |
Definition at line 59 of file SelectionDAGAddressAnalysis.h.
References llvm::StackOffset::getFixed(), and llvm::StackOffset::getFixed().
|
static |
Definition at line 103 of file SelectionDAGAddressAnalysis.cpp.
References A(), B(), BaseIndexOffset(), llvm::cast(), llvm::dyn_cast(), equalBaseIndex(), getBase(), llvm::MachineFunction::getFrameInfo(), llvm::SelectionDAG::getMachineFunction(), llvm::SDValue::getNode(), llvm::LocationSize::getValue(), llvm::LocationSize::hasValue(), llvm::isa(), llvm::MachineFrameInfo::isFixedObjectIndex(), llvm::LocationSize::isScalable(), and match().
|
inline |
Definition at line 94 of file SelectionDAGAddressAnalysis.h.
References BaseIndexOffset(), contains(), and llvm::Other.
| bool BaseIndexOffset::contains | ( | const SelectionDAG & | DAG, |
| int64_t | BitSize, | ||
| const BaseIndexOffset & | Other, | ||
| int64_t | OtherBitSize, | ||
| int64_t & | BitOffset ) const |
Definition at line 187 of file SelectionDAGAddressAnalysis.cpp.
References BaseIndexOffset(), equalBaseIndex(), and llvm::Other.
Referenced by contains().
| LLVM_DUMP_METHOD void BaseIndexOffset::dump | ( | ) | const |
Definition at line 327 of file SelectionDAGAddressAnalysis.cpp.
References llvm::dbgs(), LLVM_DUMP_METHOD, and print().
|
inline |
Definition at line 82 of file SelectionDAGAddressAnalysis.h.
References BaseIndexOffset(), equalBaseIndex(), llvm::Off, and llvm::Other.
| bool BaseIndexOffset::equalBaseIndex | ( | const BaseIndexOffset & | Other, |
| const SelectionDAG & | DAG, | ||
| int64_t & | Off ) const |
Definition at line 24 of file SelectionDAGAddressAnalysis.cpp.
References BaseIndexOffset(), equalBaseIndex(), llvm::StackOffset::getFixed(), llvm::StackOffset::getScalable(), llvm::Off, and llvm::Other.
| bool BaseIndexOffset::equalBaseIndex | ( | const BaseIndexOffset & | Other, |
| const SelectionDAG & | DAG, | ||
| StackOffset & | Off ) const |
Definition at line 34 of file SelectionDAGAddressAnalysis.cpp.
References A(), B(), BaseIndexOffset(), llvm::dyn_cast(), llvm::StackOffset::getFixed(), llvm::MachineFunction::getFrameInfo(), llvm::SelectionDAG::getMachineFunction(), llvm::MachineFrameInfo::getObjectOffset(), hasValidStackOffset(), llvm::MachineFrameInfo::isFixedObjectIndex(), llvm::Off, and llvm::Other.
Referenced by computeAliasing(), contains(), equalBaseIndex(), equalBaseIndex(), and performCONCAT_VECTORSCombine().
|
inline |
Definition at line 55 of file SelectionDAGAddressAnalysis.h.
Referenced by computeAliasing().
|
inline |
Definition at line 56 of file SelectionDAGAddressAnalysis.h.
|
inline |
Definition at line 57 of file SelectionDAGAddressAnalysis.h.
|
inline |
Definition at line 58 of file SelectionDAGAddressAnalysis.h.
|
inline |
Definition at line 67 of file SelectionDAGAddressAnalysis.h.
References assert(), and hasValidOffset().
|
inline |
Definition at line 64 of file SelectionDAGAddressAnalysis.h.
Referenced by getOffset().
|
inline |
Definition at line 66 of file SelectionDAGAddressAnalysis.h.
Referenced by equalBaseIndex().
|
static |
Parses tree in N for base, index, and fixed/scalable offsets.
Definition at line 315 of file SelectionDAGAddressAnalysis.cpp.
References BaseIndexOffset(), llvm::dyn_cast(), matchLSNode(), and N.
Referenced by areNonVolatileConsecutiveLoadsOrStores(), computeAliasing(), performCONCAT_VECTORSCombine(), and TryDistrubutionADDVecReduce().
| void BaseIndexOffset::print | ( | raw_ostream & | OS | ) | const |
Definition at line 331 of file SelectionDAGAddressAnalysis.cpp.
Referenced by dump().