|
LLVM
5.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 () | |
| 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 (SDValue Ptr, 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.
|
inline |
Definition at line 41 of file SelectionDAGAddressAnalysis.h.
Referenced by match().
|
inline |
Definition at line 43 of file SelectionDAGAddressAnalysis.h.
|
inline |
Definition at line 51 of file SelectionDAGAddressAnalysis.h.
| bool llvm::BaseIndexOffset::equalBaseIndex | ( | BaseIndexOffset & | Other, |
| const SelectionDAG & | DAG, | ||
| int64_t & | Off | ||
| ) |
Definition at line 20 of file SelectionDAGAddressAnalysis.cpp.
References A, B, llvm::MachineFunction::getFrameInfo(), llvm::SelectionDAG::getMachineFunction(), llvm::MachineFrameInfo::getObjectOffset(), and llvm::MachineFrameInfo::isFixedObjectIndex().
|
inline |
Definition at line 48 of file SelectionDAGAddressAnalysis.h.
|
inline |
Definition at line 49 of file SelectionDAGAddressAnalysis.h.
|
static |
Parses tree in Ptr for base, index, offset addresses.
Definition at line 56 of file SelectionDAGAddressAnalysis.cpp.
References llvm::ISD::ADD, BaseIndexOffset(), C, llvm::SDNode::getOpcode(), llvm::SDNode::getOperand(), llvm::SelectionDAG::MaskedValueIsZero(), llvm::ISD::MUL, llvm::ISD::OR, Ptr, and llvm::ISD::SIGN_EXTEND.
Referenced by llvm::SelectionDAG::areNonVolatileConsecutiveLoads().
1.8.6