LLVM API Documentation

Classes | Defines | Functions
AArch64ISelDAGToDAG.cpp File Reference
#include "AArch64TargetMachine.h"
#include "MCTargetDesc/AArch64AddressingModes.h"
#include "llvm/ADT/APSInt.h"
#include "llvm/CodeGen/SelectionDAGISel.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/GlobalValue.h"
#include "llvm/IR/Intrinsics.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/raw_ostream.h"
#include "AArch64GenDAGISel.inc"
Include dependency graph for AArch64ISelDAGToDAG.cpp:

Go to the source code of this file.

Classes

class  WidenVector

Defines

#define DEBUG_TYPE   "aarch64-isel"

Functions

static bool isIntImmediate (const SDNode *N, uint64_t &Imm)
static bool isIntImmediate (SDValue N, uint64_t &Imm)
static bool isOpcWithIntImmediate (const SDNode *N, unsigned Opc, uint64_t &Imm)
static AArch64_AM::ShiftExtendType getShiftTypeForNode (SDValue N)
static AArch64_AM::ShiftExtendType getExtendTypeForNode (SDValue N, bool IsLoadStore=false)
static bool checkHighLaneIndex (SDNode *DL, SDValue &LaneOp, int &LaneIdx)
static bool checkV64LaneV128 (SDValue Op0, SDValue Op1, SDValue &StdOp, SDValue &LaneOp, int &LaneIdx)
static SDValue narrowIfNeeded (SelectionDAG *CurDAG, SDValue N)
static SDValue Widen (SelectionDAG *CurDAG, SDValue N)
static SDValue NarrowVector (SDValue V128Reg, SelectionDAG &DAG)
static bool isBitfieldExtractOpFromAnd (SelectionDAG *CurDAG, SDNode *N, unsigned &Opc, SDValue &Opd0, unsigned &LSB, unsigned &MSB, unsigned NumberOfIgnoredLowBits, bool BiggerPattern)
static bool isSeveralBitsExtractOpFromShr (SDNode *N, unsigned &Opc, SDValue &Opd0, unsigned &LSB, unsigned &MSB)
static bool isBitfieldExtractOpFromShr (SDNode *N, unsigned &Opc, SDValue &Opd0, unsigned &LSB, unsigned &MSB, bool BiggerPattern)
static bool isBitfieldExtractOp (SelectionDAG *CurDAG, SDNode *N, unsigned &Opc, SDValue &Opd0, unsigned &LSB, unsigned &MSB, unsigned NumberOfIgnoredLowBits=0, bool BiggerPattern=false)
static bool isBitfieldDstMask (uint64_t DstMask, APInt BitsToBeInserted, unsigned NumberOfIgnoredHighBits, EVT VT)
static void getUsefulBits (SDValue Op, APInt &UsefulBits, unsigned Depth=0)
static void getUsefulBitsFromAndWithImmediate (SDValue Op, APInt &UsefulBits, unsigned Depth)
static void getUsefulBitsFromBitfieldMoveOpd (SDValue Op, APInt &UsefulBits, uint64_t Imm, uint64_t MSB, unsigned Depth)
static void getUsefulBitsFromUBFM (SDValue Op, APInt &UsefulBits, unsigned Depth)
static void getUsefulBitsFromOrWithShiftedReg (SDValue Op, APInt &UsefulBits, unsigned Depth)
static void getUsefulBitsFromBFM (SDValue Op, SDValue Orig, APInt &UsefulBits, unsigned Depth)
static void getUsefulBitsForUse (SDNode *UserNode, APInt &UsefulBits, SDValue Orig, unsigned Depth)
static SDValue getLeftShift (SelectionDAG *CurDAG, SDValue Op, int ShlAmount)
static bool isBitfieldPositioningOp (SelectionDAG *CurDAG, SDValue Op, SDValue &Src, int &ShiftAmount, int &MaskWidth)
static bool isBitfieldInsertOpFromOr (SDNode *N, unsigned &Opc, SDValue &Dst, SDValue &Src, unsigned &ImmR, unsigned &ImmS, SelectionDAG *CurDAG)

Define Documentation

#define DEBUG_TYPE   "aarch64-isel"

Definition at line 28 of file AArch64ISelDAGToDAG.cpp.


Function Documentation

static bool checkHighLaneIndex ( SDNode DL,
SDValue LaneOp,
int LaneIdx 
) [static]
static bool checkV64LaneV128 ( SDValue  Op0,
SDValue  Op1,
SDValue StdOp,
SDValue LaneOp,
int LaneIdx 
) [static]
static AArch64_AM::ShiftExtendType getExtendTypeForNode ( SDValue  N,
bool  IsLoadStore = false 
) [static]
static SDValue getLeftShift ( SelectionDAG CurDAG,
SDValue  Op,
int  ShlAmount 
) [static]

Create a machine node performing a notional SHL of Op by ShlAmount. If ShlAmount is negative, do a (logical) right-shift instead. If ShlAmount is 0, return Op unchanged.

Definition at line 1753 of file AArch64ISelDAGToDAG.cpp.

References llvm::SelectionDAG::getMachineNode(), llvm::EVT::getSizeInBits(), llvm::SelectionDAG::getTargetConstant(), and llvm::SDValue::getValueType().

Referenced by isBitfieldPositioningOp().

static void getUsefulBits ( SDValue  Op,
APInt UsefulBits,
unsigned  Depth = 0 
) [static]
static void getUsefulBitsForUse ( SDNode UserNode,
APInt UsefulBits,
SDValue  Orig,
unsigned  Depth 
) [static]
static void getUsefulBitsFromAndWithImmediate ( SDValue  Op,
APInt UsefulBits,
unsigned  Depth 
) [static]
static void getUsefulBitsFromBFM ( SDValue  Op,
SDValue  Orig,
APInt UsefulBits,
unsigned  Depth 
) [static]
static void getUsefulBitsFromBitfieldMoveOpd ( SDValue  Op,
APInt UsefulBits,
uint64_t  Imm,
uint64_t  MSB,
unsigned  Depth 
) [static]
static void getUsefulBitsFromOrWithShiftedReg ( SDValue  Op,
APInt UsefulBits,
unsigned  Depth 
) [static]
static void getUsefulBitsFromUBFM ( SDValue  Op,
APInt UsefulBits,
unsigned  Depth 
) [static]
static bool isBitfieldDstMask ( uint64_t  DstMask,
APInt  BitsToBeInserted,
unsigned  NumberOfIgnoredHighBits,
EVT  VT 
) [static]

Does DstMask form a complementary pair with the mask provided by BitsToBeInserted, suitable for use in a BFI instruction. Roughly speaking, this asks whether DstMask zeroes precisely those bits that will be set by the other half.

Definition at line 1562 of file AArch64ISelDAGToDAG.cpp.

References llvm::EVT::getSizeInBits(), llvm::MVT::i32, llvm::MVT::i64, and llvm::APInt::zextOrTrunc().

Referenced by isBitfieldInsertOpFromOr().

static bool isBitfieldExtractOp ( SelectionDAG CurDAG,
SDNode N,
unsigned Opc,
SDValue Opd0,
unsigned LSB,
unsigned MSB,
unsigned  NumberOfIgnoredLowBits = 0,
bool  BiggerPattern = false 
) [static]
static bool isBitfieldExtractOpFromAnd ( SelectionDAG CurDAG,
SDNode N,
unsigned Opc,
SDValue Opd0,
unsigned LSB,
unsigned MSB,
unsigned  NumberOfIgnoredLowBits,
bool  BiggerPattern 
) [static]
static bool isBitfieldExtractOpFromShr ( SDNode N,
unsigned Opc,
SDValue Opd0,
unsigned LSB,
unsigned MSB,
bool  BiggerPattern 
) [static]
static bool isBitfieldInsertOpFromOr ( SDNode N,
unsigned Opc,
SDValue Dst,
SDValue Src,
unsigned ImmR,
unsigned ImmS,
SelectionDAG CurDAG 
) [static]
static bool isBitfieldPositioningOp ( SelectionDAG CurDAG,
SDValue  Op,
SDValue Src,
int ShiftAmount,
int MaskWidth 
) [static]
static bool isIntImmediate ( const SDNode N,
uint64_t &  Imm 
) [static]

isIntImmediate - This method tests to see if the node is a constant operand. If so Imm will receive the 32-bit value.

Definition at line 192 of file AArch64ISelDAGToDAG.cpp.

References llvm::CallingConv::C.

Referenced by isBitfieldExtractOpFromShr(), isIntImmediate(), isOpcWithIntImmediate(), and isSeveralBitsExtractOpFromShr().

static bool isIntImmediate ( SDValue  N,
uint64_t &  Imm 
) [static]

Definition at line 202 of file AArch64ISelDAGToDAG.cpp.

References llvm::SDValue::getNode(), and isIntImmediate().

static bool isOpcWithIntImmediate ( const SDNode N,
unsigned  Opc,
uint64_t &  Imm 
) [static]
static bool isSeveralBitsExtractOpFromShr ( SDNode N,
unsigned Opc,
SDValue Opd0,
unsigned LSB,
unsigned MSB 
) [static]
static SDValue narrowIfNeeded ( SelectionDAG CurDAG,
SDValue  N 
) [static]

Instructions that accept extend modifiers like UXTW expect the register being extended to be a GPR32, but the incoming DAG might be acting on a GPR64 (either via SEXT_INREG or AND). Extract the appropriate low bits if this is the case.

Definition at line 522 of file AArch64ISelDAGToDAG.cpp.

References llvm::TargetOpcode::EXTRACT_SUBREG, llvm::SelectionDAG::getMachineNode(), llvm::SelectionDAG::getTargetConstant(), llvm::SDValue::getValueType(), llvm::MVT::i32, and Node.

static SDValue NarrowVector ( SDValue  V128Reg,
SelectionDAG DAG 
) [static]

NarrowVector - Given a value in the V128 register class, produce the equivalent value in the V64 register class.

Definition at line 1114 of file AArch64ISelDAGToDAG.cpp.

References llvm::EVT::getSimpleVT(), llvm::SelectionDAG::getTargetExtractSubreg(), llvm::SDValue::getValueType(), llvm::EVT::getVectorElementType(), llvm::EVT::getVectorNumElements(), and llvm::MVT::getVectorVT().

static SDValue Widen ( SelectionDAG CurDAG,
SDValue  N 
) [static]