LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HexagonSelectionDAGInfo.cpp
Go to the documentation of this file.
1 //===-- HexagonSelectionDAGInfo.cpp - Hexagon SelectionDAG Info -----------===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file implements the HexagonSelectionDAGInfo class.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #define DEBUG_TYPE "hexagon-selectiondag-info"
15 #include "HexagonTargetMachine.h"
16 using namespace llvm;
17 
19 
21  &TM)
23 }
24 
26 }
27 
28 SDValue
31  SDValue Dst, SDValue Src, SDValue Size, unsigned Align,
32  bool isVolatile, bool AlwaysInline,
33  MachinePointerInfo DstPtrInfo,
34  MachinePointerInfo SrcPtrInfo) const {
35  flag_aligned_memcpy = false;
36  if ((Align & 0x3) == 0) {
37  ConstantSDNode *ConstantSize = dyn_cast<ConstantSDNode>(Size);
38  if (ConstantSize) {
39  uint64_t SizeVal = ConstantSize->getZExtValue();
40  if ((SizeVal > 32) && ((SizeVal % 8) == 0))
41  flag_aligned_memcpy = true;
42  }
43  }
44 
45  return SDValue();
46 }
virtual SDValue EmitTargetCodeForMemcpy(SelectionDAG &DAG, SDLoc dl, SDValue Chain, SDValue Dst, SDValue Src, SDValue Size, unsigned Align, bool isVolatile, bool AlwaysInline, MachinePointerInfo DstPtrInfo, MachinePointerInfo SrcPtrInfo) const
enable_if_c<!is_simple_type< Y >::value, typename cast_retty< X, const Y >::ret_type >::type dyn_cast(const Y &Val)
Definition: Casting.h:266
static cl::opt< AlignMode > Align(cl::desc("Load/store alignment support"), cl::Hidden, cl::init(DefaultAlign), cl::values(clEnumValN(DefaultAlign,"arm-default-align","Generate unaligned accesses only on hardware/OS ""combinations that are known to support them"), clEnumValN(StrictAlign,"arm-strict-align","Disallow all unaligned memory accesses"), clEnumValN(NoStrictAlign,"arm-no-strict-align","Allow unaligned memory accesses"), clEnumValEnd))
HexagonSelectionDAGInfo(const HexagonTargetMachine &TM)
uint64_t getZExtValue() const