|
LLVM
7.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, int64_t Offset, bool IsIndexSignExt) | |
| SDValue | getBase () |
| SDValue | getIndex () |
| bool | equalBaseIndex (BaseIndexOffset &Other, const SelectionDAG &DAG) |
| bool | equalBaseIndex (BaseIndexOffset &Other, const SelectionDAG &DAG, int64_t &Off) |
Static Public Member Functions | |
| static BaseIndexOffset | match (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 50 of file SelectionDAGAddressAnalysis.h.
References match(), N, and Other.
Referenced by calculateByteProvider(), replaceShuffleOfInsert(), and ShrinkLoadReplaceStoreWithStore().
| bool BaseIndexOffset::equalBaseIndex | ( | BaseIndexOffset & | Other, |
| const SelectionDAG & | DAG, | ||
| int64_t & | Off | ||
| ) |
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 replaceShuffleOfInsert(), and ShrinkLoadReplaceStoreWithStore().
|
inline |
Definition at line 48 of file SelectionDAGAddressAnalysis.h.
Referenced by replaceShuffleOfInsert().
|
static |
Parses tree in Ptr for base, index, offset addresses.
Definition at line 78 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, Ptr, llvm::ISD::SIGN_EXTEND, llvm::ISD::STORE, and llvm::TargetLowering::unwrapAddress().
Referenced by llvm::SelectionDAG::areNonVolatileConsecutiveLoads(), calculateByteProvider(), equalBaseIndex(), replaceShuffleOfInsert(), and ShrinkLoadReplaceStoreWithStore().
1.8.13