LLVM  3.7.0
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 #include "HexagonTargetMachine.h"
15 using namespace llvm;
16 
17 #define DEBUG_TYPE "hexagon-selectiondag-info"
18 
20 
21 SDValue
24  SDValue Dst, SDValue Src, SDValue Size, unsigned Align,
25  bool isVolatile, bool AlwaysInline,
26  MachinePointerInfo DstPtrInfo,
27  MachinePointerInfo SrcPtrInfo) const {
28  flag_aligned_memcpy = false;
29  if ((Align & 0x3) == 0) {
30  ConstantSDNode *ConstantSize = dyn_cast<ConstantSDNode>(Size);
31  if (ConstantSize) {
32  uint64_t SizeVal = ConstantSize->getZExtValue();
33  if ((SizeVal > 32) && ((SizeVal % 8) == 0))
34  flag_aligned_memcpy = true;
35  }
36  }
37 
38  return SDValue();
39 }
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 override
EmitTargetCodeForMemcpy - Emit target-specific code that performs a memcpy.
MachinePointerInfo - This class contains a discriminated union of information about pointers in memor...
This is used to represent a portion of an LLVM function in a low-level Data Dependence DAG representa...
Definition: SelectionDAG.h:179
Wrapper class for IR location info (IR ordering and DebugLoc) to be passed into SDNode creation funct...
static cl::opt< AlignMode > Align(cl::desc("Load/store alignment support"), cl::Hidden, cl::init(NoStrictAlign), cl::values(clEnumValN(StrictAlign,"aarch64-strict-align","Disallow all unaligned memory accesses"), clEnumValN(NoStrictAlign,"aarch64-no-strict-align","Allow unaligned memory accesses"), clEnumValEnd))
LLVM_ATTRIBUTE_UNUSED_RESULT std::enable_if< !is_simple_type< Y >::value, typename cast_retty< X, const Y >::ret_type >::type dyn_cast(const Y &Val)
Definition: Casting.h:285
static bool isVolatile(Instruction *Inst)
Unlike LLVM values, Selection DAG nodes may return multiple values as the result of a computation...
uint64_t getZExtValue() const