LLVM API Documentation

Public Member Functions | Static Public Member Functions | Public Attributes
BaseIndexOffset Struct Reference
Collaboration diagram for BaseIndexOffset:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 BaseIndexOffset ()
 BaseIndexOffset (SDValue Base, SDValue Index, int64_t Offset, bool IsIndexSignExt)
bool equalBaseIndex (const BaseIndexOffset &Other)

Static Public Member Functions

static BaseIndexOffset match (SDValue Ptr)
 Parses tree in Ptr for base, index, offset addresses.

Public Attributes

SDValue Base
SDValue Index
int64_t Offset
bool IsIndexSignExt

Detailed Description

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 9043 of file DAGCombiner.cpp.


Constructor & Destructor Documentation

Definition at line 9049 of file DAGCombiner.cpp.

BaseIndexOffset::BaseIndexOffset ( SDValue  Base,
SDValue  Index,
int64_t  Offset,
bool  IsIndexSignExt 
) [inline]

Definition at line 9051 of file DAGCombiner.cpp.


Member Function Documentation

Definition at line 9055 of file DAGCombiner.cpp.

References Base, Index, and IsIndexSignExt.

static BaseIndexOffset BaseIndexOffset::match ( SDValue  Ptr) [inline, static]

Parses tree in Ptr for base, index, offset addresses.

Definition at line 9061 of file DAGCombiner.cpp.

References ADD, llvm::SDNode::getOpcode(), llvm::SDNode::getOperand(), llvm::ISD::MUL, and llvm::ISD::SIGN_EXTEND.


Member Data Documentation

Definition at line 9044 of file DAGCombiner.cpp.

Referenced by equalBaseIndex().

Definition at line 9045 of file DAGCombiner.cpp.

Referenced by equalBaseIndex().

Definition at line 9047 of file DAGCombiner.cpp.

Referenced by equalBaseIndex().

Definition at line 9046 of file DAGCombiner.cpp.


The documentation for this struct was generated from the following file: