LLVM
8.0.1
|
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, int64_t Offset, bool IsIndexSignExt) | |
SDValue | getBase () |
SDValue | getBase () const |
SDValue | getIndex () |
SDValue | getIndex () const |
bool | equalBaseIndex (const BaseIndexOffset &Other, const SelectionDAG &DAG) const |
bool | equalBaseIndex (const BaseIndexOffset &Other, const SelectionDAG &DAG, int64_t &Off) const |
Static Public Member Functions | |
static BaseIndexOffset | match (const LSBaseSDNode *N, const SelectionDAG &DAG) |
Parses tree in Ptr 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 33 of file SelectionDAGAddressAnalysis.h.
|
default |
Referenced by match().
|
inline |
Definition at line 42 of file SelectionDAGAddressAnalysis.h.
|
inline |
Definition at line 52 of file SelectionDAGAddressAnalysis.h.
References match(), N, and Other.
Referenced by calculateByteProvider(), numVectorEltsOrZero(), operator!=(), replaceShuffleOfInsert(), 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(), and llvm::MachineFrameInfo::isFixedObjectIndex().
|
inline |
Definition at line 47 of file SelectionDAGAddressAnalysis.h.
Referenced by operator!=(), replaceShuffleOfInsert(), and ShrinkLoadReplaceStoreWithStore().
|
inline |
Definition at line 48 of file SelectionDAGAddressAnalysis.h.
|
inline |
Definition at line 49 of file SelectionDAGAddressAnalysis.h.
Referenced by replaceShuffleOfInsert().
|
inline |
Definition at line 50 of file SelectionDAGAddressAnalysis.h.
|
static |
Parses tree in Ptr for base, index, offset addresses.
Definition at line 79 of file SelectionDAGAddressAnalysis.cpp.
References llvm::ISD::ADD, BaseIndexOffset(), C, llvm::LSBaseSDNode::getAddressingMode(), llvm::MemSDNode::getBasePtr(), llvm::SDValue::getNode(), llvm::LSBaseSDNode::getOffset(), llvm::SDNode::getOpcode(), llvm::SDNode::getOperand(), llvm::SDValue::getResNo(), llvm::SelectionDAG::getTargetLoweringInfo(), llvm::ISD::LOAD, llvm::SelectionDAG::MaskedValueIsZero(), llvm::ISD::MUL, llvm::ISD::OR, llvm::ISD::POST_DEC, llvm::ISD::PRE_DEC, llvm::ISD::PRE_INC, llvm::ISD::SIGN_EXTEND, llvm::ISD::STORE, and llvm::TargetLowering::unwrapAddress().
Referenced by llvm::SelectionDAG::areNonVolatileConsecutiveLoads(), calculateByteProvider(), equalBaseIndex(), numVectorEltsOrZero(), operator!=(), replaceShuffleOfInsert(), and ShrinkLoadReplaceStoreWithStore().